/* =============================================================
   广西中和瓷纹样素材库与数字化平台 —— 全局样式
   配色：深墨底(#0b1a26 / 影青) + 金(#e3b85a) + 青花蓝(#7fb4d6) + 碧绿(#1e8a6b)
   设计：深色底 + 中和瓷纹样（青花/影青）背景 + 半透明深色遮罩，文字层次清晰
   ============================================================= */

:root {
  --bg-deep: #07131c;        /* 最深背景（墨） */
  --bg: #0b1a26;             /* 主背景（深影青） */
  --bg-soft: #0f2433;        /* 卡片背景 */
  --gold: #e3b85a;           /* 金（主强调色，按钮/强调） */
  --gold-soft: #f3d385;
  --blue: #7fb4d6;           /* 青花蓝 */
  --jade: #1e8a6b;           /* 碧绿 */
  --text: #f6f3ec;           /* 主文字（白） */
  --text-dim: #b6c6d2;       /* 次级文字 */
  --line: rgba(227,184,90,0.28); /* 金色描边 */
  --radius: 14px;
  --maxw: 1200px;
  --nav-h: 64px;      /* 顶栏高度 */
  --nav-2h: 48px;     /* 第二行菜单栏高度 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* 全局氛围底纹：纯 CSS 渐变（不再使用任何图片），增强层次 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(127,180,214,0.06), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ----------------------------- 顶部导航（两行：顶栏 + 居中菜单栏） ----------------------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(6,18,15,0.94), rgba(6,18,15,0.72));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* 第一行：品牌 + 时钟/登录 */
.nav__top {
  height: var(--nav-h); display: flex; align-items: center;
  justify-content: space-between; padding: 0 24px;
}
/* 第二行：菜单栏（整体水平居中，不偏左/右） */
.nav__bar {
  height: var(--nav-2h); display: flex; align-items: center; justify-content: center;
  border-top: 1px solid var(--line); background: rgba(6,18,15,0.35);
  position: relative; /* 供时钟绝对定位于本行右端 */
}
.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 700; color: var(--gold);
  letter-spacing: 1px; white-space: nowrap;
}
.nav__brand .seal {
  width: 30px; height: 30px; border-radius: 6px;
  background: linear-gradient(135deg, var(--jade), var(--gold));
  display: grid; place-items: center; color: #07131c; font-size: 16px; font-weight: 800;
  box-shadow: 0 0 0 2px rgba(227,184,90,0.35);
}
.nav__menu { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav__menu a {
  display: block; padding: 8px 16px; border-radius: 8px;
  color: var(--text-dim); font-size: 15px; transition: .2s;
}
.nav__menu a:hover { color: var(--gold); background: rgba(212,175,55,0.08); }
.nav__menu a.active { color: var(--gold); background: rgba(212,175,55,0.14); font-weight: 600; }

/* 汉堡按钮（移动端显示） */
.nav__toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: 0; padding: 8px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--gold); border-radius: 2px; transition: .3s; }

/* 右侧用户区 */
.nav__user { display: flex; align-items: center; gap: 10px; }

/* 顶栏右侧：时钟与登录按钮横向并排，中间留间隔 */
.nav__right {
  display: flex; align-items: center; gap: 16px;
  white-space: nowrap;
}

/* 导航右上角实时时间（公历 + 农历干支） */
.nav__clock {
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1.3; user-select: none;
}
.nav__clock .d1 { color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: 0.5px; }
.nav__clock .d2 { color: var(--gold-soft); font-size: 13px; opacity: 0.9; }
.user-chip {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(212,175,55,0.06); color: var(--text); font-size: 14px;
}
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--jade), var(--gold)); color: #06120f;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.btn-login {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--gold);
  background: transparent; color: var(--gold); cursor: pointer; font-size: 14px; transition: .2s;
}
.btn-login:hover { background: var(--gold); color: #06120f; }

/* 用户下拉菜单 */
.dropdown {
  position: absolute; top: calc(var(--nav-h) - 6px); right: 16px;
  min-width: 200px; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; display: none; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.dropdown.open { display: block; }
.dropdown button, .dropdown a {
  display: block; width: 100%; text-align: left; padding: 10px 12px;
  background: none; border: 0; color: var(--text); border-radius: 8px; cursor: pointer; font-size: 14px;
}
.dropdown button:hover, .dropdown a:hover { background: rgba(212,175,55,0.1); color: var(--gold); }

/* ----------------------------- 首页英雄区（全屏背景轮播 + 可选视频） ----------------------------- */
.hero {
  position: relative; min-height: 100vh; display: grid; place-items: center;
  text-align: center; padding: calc(var(--nav-h) + var(--nav-2h) + 40px) 20px 90px; overflow: hidden;
}
/* 背景图层：多张瓷纹样交叉淡入淡出 */
.hero__layers { position: absolute; inset: 0; z-index: 0; }
.hero__slide-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease;
}
.hero__slide-bg.active { opacity: 1; }
/* 三款深色调渐变背景（纯 CSS，不再使用任何图片）；底部轮播控件切换不同色调 */
/* 首屏背景：AI 生成的中和瓷主题图（深青蓝×墨绿、影青瓷碗与瓷片暗纹、知识图谱连线） */
.hero__slide-bg.v1 { background: url('../images/hero-bg.jpg') center / cover no-repeat; }
.hero__slide-bg.v2 { background: linear-gradient(160deg, #08161d 0%, #0d2230 55%, #10303f 100%); }
.hero__slide-bg.v3 { background: linear-gradient(160deg, #07131c 0%, #122a2a 55%, #1a3a32 100%); }

/* 视频背景层（默认隐藏，点切换后显示） */
.hero__video {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
body.bg-video .hero__video.is-ready { opacity: 1; }
body.bg-video .hero__layers { opacity: 0; }

/* 半透明深色遮罩（始终覆盖，保证文字可读；背景图本身较暗，遮罩调轻以显露瓷纹细节） */
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(7,19,28,0.28) 0%, rgba(7,19,28,0.42) 55%, rgba(7,19,28,0.72) 100%);
}

.hero__inner { position: relative; z-index: 2; max-width: 880px; }
.hero__eyebrow {
  display: inline-block; padding: 6px 16px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--gold); font-size: 13px; letter-spacing: 2px; margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(30px, 6vw, 58px); font-weight: 800; line-height: 1.2; color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.55);
}
.hero__subtitle {                           /* 黄色副标题 */
  margin-top: 14px; font-size: clamp(18px, 3.4vw, 28px); font-weight: 700;
  color: var(--gold); letter-spacing: 1px; text-shadow: 0 2px 14px rgba(0,0,0,.5);
}
.hero__desc {                                /* 简介文字 */
  margin: 18px auto 0; max-width: 700px; color: var(--text); opacity: .92;
  font-size: clamp(14px, 2.4vw, 18px); text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
.hero__actions { margin-top: 34px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 13px 28px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #07131c; box-shadow: 0 8px 22px rgba(227,184,90,0.32);
}
.btn--ghost { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--gold); }
.btn--ghost:hover { background: rgba(227,184,90,0.12); color: var(--gold); }

/* 背景切换控件（图片/视频）+ 右下角 */
.hero__bg-toggle {
  position: absolute; right: 18px; bottom: 70px; z-index: 3;
  display: flex; gap: 8px;
}
.hero__bg-toggle button {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(7,19,28,0.5); color: var(--text-dim); font-size: 13px; cursor: pointer; transition: .2s;
}
.hero__bg-toggle button.active, .hero__bg-toggle button:hover { color: var(--gold); border-color: var(--gold); background: rgba(227,184,90,0.12); }

/* 底部轮播切换控件（与参考页一致：左右箭头 + 圆点） */
.hero__carousel {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 14px;
}
.hero__carousel button.arrow {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(7,19,28,0.5); color: var(--gold); cursor: pointer; font-size: 18px; transition: .2s;
}
.hero__carousel button.arrow:hover { background: rgba(227,184,90,0.14); }
.hero__carousel .dots { display: flex; gap: 8px; }
.hero__carousel .dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4); cursor: pointer; transition: .2s;
}
.hero__carousel .dots button.active { background: var(--gold); width: 22px; border-radius: 6px; }

/* ----------------------------- 轮播 Banner ----------------------------- */
.section { position: relative; z-index: 2; padding: 60px 0; }
.section__title { text-align: center; margin-bottom: 30px; }
.section__title h2 { font-size: clamp(24px, 4vw, 34px); color: var(--gold); }
.section__title p { color: var(--text-dim); margin-top: 6px; }

.carousel { position: relative; max-width: var(--maxw); margin: 0 auto; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.carousel__track { display: flex; transition: transform .6s ease; }
.slide { min-width: 100%; position: relative; min-height: 360px; display: grid; align-items: center; }
.slide__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
/* 三种色调，复用同一底纹 */
.slide--1 .slide__bg { background-image: linear-gradient(120deg, rgba(181,64,47,.55), rgba(6,18,15,.75)), url("../images/banner-bg.svg"); }
.slide--2 .slide__bg { background-image: linear-gradient(120deg, rgba(30,138,107,.55), rgba(6,18,15,.75)), url("../images/banner-bg.svg"); }
.slide--3 .slide__bg { background-image: linear-gradient(120deg, rgba(212,175,55,.45), rgba(6,18,15,.8)), url("../images/banner-bg.svg"); }
.slide__content { position: relative; z-index: 2; padding: 40px; max-width: 640px; }
.slide__tag { color: var(--gold); font-size: 13px; letter-spacing: 2px; }
.slide__content h3 { font-size: clamp(22px, 4vw, 34px); margin: 8px 0 12px; }
.slide__content p { color: var(--text-dim); }
.slide__content .btn { margin-top: 18px; }

.carousel__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(6,18,15,0.6); color: var(--gold); cursor: pointer; font-size: 18px;
}
.carousel__arrow.prev { left: 14px; } .carousel__arrow.next { right: 14px; }
.carousel__dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.carousel__dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.4); cursor: pointer; }
.carousel__dots button.active { background: var(--gold); width: 22px; border-radius: 6px; }

/* ----------------------------- 卡片网格（标本/特色） ----------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.card__img {
  width: 100%; height: 150px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); margin-bottom: 14px; display: block; background: #0b1a26;
}
/* 通栏大图（制瓷流程等）：金边画框 + 图注 */
.media-frame {
  margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg-soft); box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.media-frame img { width: 100%; display: block; }
.media-frame figcaption {
  padding: 14px 18px; text-align: center; color: var(--gold-soft);
  font-size: 13px; letter-spacing: 1px; border-top: 1px solid var(--line);
}
.ip-note {
  margin-top: 18px; text-align: center; color: var(--text-dim);
  font-size: 14px; line-height: 1.8; max-width: 860px; margin-left: auto; margin-right: auto;
}
.ip-note.one-line {
  max-width: none; white-space: nowrap; font-size: 13px; letter-spacing: 0;
}

/* --------------------------- 标本展示（图版式） --------------------------- */
.spec-block {
  max-width: 1100px; margin: 0 auto 42px; padding: 26px 28px 22px;
  background: rgba(9, 24, 22, 0.55); border: 1px solid var(--line);
  border-radius: 10px;
}
.spec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 16px; }
.spec-no {
  font-size: 12px; letter-spacing: 1px; color: var(--bg-deep);
  background: var(--gold); padding: 3px 10px; border-radius: 3px; font-weight: 700; white-space: nowrap;
}
.spec-head h3 { margin: 0; font-size: clamp(17px, 2.2vw, 21px); color: var(--gold); font-weight: 600; letter-spacing: 1px; }
.spec-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px;
}
.spec-grid figure {
  margin: 0; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column;
}
.spec-grid figure img { width: 100%; display: block; flex: 1; object-fit: cover; }
.spec-grid figcaption {
  padding: 7px 10px; font-size: 12px; text-align: center;
  color: var(--gold-soft); letter-spacing: 0.5px; border-top: 1px solid var(--line);
}
.spec-grid .spec-main { grid-row: span 2; }
.spec-grid .spec-main img { height: 100%; }
/* 文创展示网格（创新坊）：4 列自适应，窄屏 2 列 */
.wk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.wk-grid figure {
  margin: 0; background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s, border-color .2s;
}
.wk-grid figure:hover { transform: translateY(-3px); border-color: var(--gold-soft); }
.wk-grid figure .wk-img { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; min-height: 190px; }
.wk-grid figure img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wk-grid figcaption {
  padding: 8px 10px; font-size: 13px; text-align: center;
  color: var(--gold-soft); letter-spacing: 0.5px; border-top: 1px solid var(--line);
}
@media (max-width: 900px) { .wk-grid { grid-template-columns: repeat(2, 1fr); } }
.spec-desc {
  margin: 16px 0 12px; color: var(--text); font-size: 15px; line-height: 1.9;
  text-indent: 2em;
}
.spec-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-tags span {
  font-size: 12px; color: var(--gold-soft); border: 1px solid var(--line);
  padding: 3px 10px; border-radius: 20px; letter-spacing: 0.5px;
}
@media (max-width: 768px) {
  .spec-block { padding: 18px 14px 16px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .spec-grid .spec-main { grid-column: span 2; grid-row: auto; }
}

/* 《瓷说中和窑》序：左侧正文 + 右侧执壶配图 */
.preface {
  display: grid; grid-template-columns: 1fr 280px; gap: 30px; align-items: start;
}
.preface .media-frame { margin: 0; }
.preface .media-frame img { width: 100%; display: block; }
.preface .sign {
  margin-top: 16px; text-align: right;
  color: var(--gold-soft); font-size: 15px; line-height: 1.9;
}
@media (max-width: 900px) {
  .preface { grid-template-columns: 1fr; }
  .preface .media-frame { max-width: 300px; margin: 0 auto; }
}
/* 正文排版（简介/板块说明页使用） */
.prose {
  max-width: 880px; margin: 0 auto; color: var(--text-dim);
  font-size: 15px; line-height: 2;
}
.prose p { margin-bottom: 14px; text-indent: 2em; }
.prose p:last-child { margin-bottom: 0; }
.prose b { color: var(--gold-soft); font-weight: 600; }
.card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); }
.card .emblem {
  width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(181,64,47,.5), rgba(212,175,55,.5)); color: var(--gold); font-size: 24px; margin-bottom: 14px;
  white-space: nowrap; overflow: hidden;
}
/* 三字徽标缩小字号，保证 56px 圆角块内单行完整显示 */
.card .emblem.em-sm { font-size: 17px; letter-spacing: 1px; }
.card h3 { color: var(--text); font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 14px; }
.card a.more { display: inline-block; margin-top: 12px; color: var(--gold); font-size: 14px; }

/* ----------------------------- 子页面框架 ----------------------------- */
.page-wrap { position: relative; z-index: 2; padding: calc(var(--nav-h) + 50px) 0 70px; min-height: 100vh; }
.page-head { text-align: center; margin-bottom: 36px; }
.page-head h1 { font-size: clamp(26px, 5vw, 40px); color: var(--gold); }
.page-head p { color: var(--text-dim); margin-top: 8px; }
/* 页头标题与副标题并排（同字号、连续一行，副标题金色） */
.page-head--inline { display: flex; align-items: baseline; justify-content: center; gap: 0; flex-wrap: wrap; }
.page-head__sub { font-size: 1em; color: var(--gold); opacity: 0.85; letter-spacing: 1px; white-space: nowrap; }

/* 创新坊 · 文创展示：统一 4:3 格子、整齐对齐、无边框；图片完整居中显示，
   留边用卡片底色（深青，非白边），每格左下角标签 */
.wc-grid { grid-template-columns: repeat(4, 1fr); align-items: stretch; }
.wc-grid figure { border: none; background: transparent; margin: 0; display: block; }
.wc-grid figure:hover { border-color: transparent; transform: none; }
.wc-grid figcaption { display: none; }
.wc-cell {
  position: relative; overflow: hidden; border-radius: 8px;
  background: var(--bg-soft, #0f2433); aspect-ratio: 4 / 3;
}
.wc-grid .wc-cell img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wc-tag {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px);
  background: transparent; border: none;
  color: var(--gold, #d8b46a);
  font-size: 14px; font-weight: 600; letter-spacing: 1px; padding: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75); white-space: nowrap;
}
@media (max-width: 900px) { .wc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .wc-grid { grid-template-columns: repeat(2, 1fr); } .wc-tag { font-size: 12px; padding: 3px 8px; } }
/* 创新坊 · 联系我们：居中联系方式 */
.contact-box { text-align: center; }
.contact-line { font-size: 17px; margin: 8px 0; letter-spacing: 0.5px; }
.contact-line b { color: var(--gold, #d8b46a); font-weight: 600; letter-spacing: 1px; }
.contact-line a { color: inherit; text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }
.contact-name { color: var(--text-dim); font-size: 0.9em; margin-left: 4px; }
/* 用户审批（管理员）列表 */
.appr-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid var(--line);
}
.appr-item:last-child { border-bottom: none; }
.appr-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.appr-info b { color: var(--text); font-size: 14px; }
.appr-info span { color: var(--text-dim); font-size: 12px; }
.appr-actions { display: flex; gap: 8px; flex-shrink: 0; }
.appr-actions button {
  cursor: pointer; font-size: 13px; padding: 5px 14px; border-radius: 6px;
  border: 1px solid var(--line); background: transparent; color: var(--text);
}
.appr-actions button.ok { border-color: var(--gold-soft, #d8b46a); color: var(--gold, #d8b46a); }
.appr-actions button.no { color: var(--text-dim); }
.appr-actions button:hover { filter: brightness(1.2); }
.placeholder {
  max-width: 820px; margin: 0 auto; background: var(--bg-soft);
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--text-dim);
}
.placeholder .icon { font-size: 44px; margin-bottom: 10px; }

/* ----------------------------- 登录弹窗（门禁） ----------------------------- */
.login-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(3,10,8,0.86); backdrop-filter: blur(6px); padding: 20px;
}
.login-overlay.hidden { display: none; }
/* 未登录时锁定页面滚动与交互（默认即锁定，防止内容在登录前闪现） */
body.locked { overflow: hidden; }
body.locked .hero, body.locked .section, body.locked .page-wrap { filter: blur(6px); pointer-events: none; user-select: none; }

.login-card {
  position: relative; width: 100%; max-width: 380px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 18px; padding: 30px 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}
.login-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 18px; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(227,184,90,0.06), transparent 60%);
}
.login-card h2 { text-align: center; color: var(--gold); font-size: 22px; margin-bottom: 4px; position: relative; }
.login-card .sub { text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 20px; position: relative; }
.login-tabs { display: flex; gap: 8px; margin-bottom: 18px; position: relative; }
.login-tabs button {
  flex: 1; padding: 9px; border-radius: 10px; border: 1px solid var(--line); background: transparent;
  color: var(--text-dim); cursor: pointer; font-size: 14px;
}
.login-tabs button.active { background: rgba(212,175,55,0.14); color: var(--gold); border-color: var(--gold); }
.form-group { margin-bottom: 14px; position: relative; }
.form-group label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #081a15; color: var(--text); font-size: 15px; outline: none;
}
.form-group input:focus { border-color: var(--gold); }
.login-submit {
  width: 100%; padding: 12px; margin-top: 6px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: #06120f;
  font-size: 16px; font-weight: 700; cursor: pointer;
}
.login-submit:hover { filter: brightness(1.05); }
.login-msg { min-height: 20px; margin-top: 12px; text-align: center; font-size: 13px; }
.login-msg.err { color: #ff8a7a; }
.login-msg.ok { color: var(--jade); }
.login-hint { margin-top: 14px; font-size: 12px; color: var(--text-dim); text-align: center; }
.login-hint code { color: var(--gold); }

/* 环境自检提示：非 3000 端口（静态预览）打开时的醒目警告条 */
.login-envwarn {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 176, 32, 0.12); border: 1px solid rgba(255, 176, 32, 0.55);
  color: #ffc861; font-size: 12.5px; line-height: 1.7; text-align: center;
}
.login-envwarn b { color: #ffd98a; user-select: all; }

/* 浏览记录列表（个人中心弹窗内） */
.hist-list { max-height: 320px; overflow: auto; text-align: left; }
.hist-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.hist-item .t { color: var(--text); }
.hist-item .time { color: var(--text-dim); font-size: 12px; white-space: nowrap; }

/* 全局轻提示 toast */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px);
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
  padding: 12px 22px; border-radius: 999px; z-index: 200; opacity: 0; transition: .3s; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: var(--jade); }
.toast.err { border-color: var(--red); }

/* 视频弹窗内容 */
.video-frame {
  position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #0b1a26, #07131c); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--text-dim);
}
.video-frame .play { width: 64px; height: 64px; border-radius: 50%; background: var(--gold); color: #06120f; display: grid; place-items: center; font-size: 26px; }

/* ----------------------------- 页脚 ----------------------------- */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 28px 20px; text-align: center; color: var(--text-dim); font-size: 13px; }

/* ----------------------------- 响应式：移动端 ----------------------------- */
@media (max-width: 768px) {
  .nav__top { padding: 0 16px; }
  .nav__brand { font-size: 16px; }
  .nav__toggle { display: flex; }       /* 显示汉堡菜单 */
  .nav__menu {
    position: absolute; top: var(--nav-h); right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
    padding: 10px; display: none; box-shadow: 0 16px 40px rgba(0,0,0,.5);
  }
  .nav__menu.open { display: flex; }
  .nav__menu a { padding: 12px 14px; }
  .nav__clock { display: none; }        /* 窄屏隐藏时钟，避免顶栏拥挤 */
  .hero { min-height: 92vh; }
  .slide { min-height: 300px; }
  .slide__content { padding: 24px; }
  .carousel__arrow { display: none; }   /* 移动端用圆点切换 */
  .cards { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  .nav__brand span.full { display: none; } /* 极窄屏只留印章 */
}

/* 纹样基因库 */
.gene-ok { color: var(--gold, #d8b46a); font-size: 0.7em; font-weight: 400; }
.gene-pending { color: var(--text-dim, #9fb0bd); font-size: 0.7em; font-weight: 400; }
.gene-group { margin: 30px 0 6px; }
.gene-group > h2 { font-size: 19px; color: var(--gold, #d8b46a); letter-spacing: 2px; border-left: 3px solid var(--gold, #d8b46a); padding-left: 10px; margin: 0 0 6px; }
.gene-note { color: var(--text-dim, #9fb0bd); font-size: 13px; line-height: 1.7; margin: 0 0 14px; }
.gene-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gene-card { background: var(--bg-soft, #0f2433); border: 1px solid var(--line, #2a3f50); border-radius: 12px; padding: 16px; }
.gene-card h3 { margin: 0 0 10px; font-size: 16px; color: var(--text, #eaf2f8); }
.gene-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gene-tag { font-size: 12px; color: var(--gold, #d8b46a); border: 1px solid var(--line, #2a3f50); border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.gene-card p { margin: 6px 0; font-size: 13px; color: var(--text-dim, #9fb0bd); line-height: 1.75; }
.gene-src { font-size: 12px; color: var(--text-dim, #9fb0bd); border-top: 1px dashed var(--line, #2a3f50); margin-top: 10px; padding-top: 8px; line-height: 1.6; }
.gene-fig { margin: 0 0 12px; }
.gene-img { width: 100%; height: auto; aspect-ratio: 1 / 1; display: block; border-radius: 8px; background: #fbfaf6; border: 1px solid var(--line, #2a3f50); }
.gene-cap { margin: 6px 0 0; font-size: 11px; color: var(--text-dim, #9fb0bd); text-align: right; letter-spacing: 1px; }
.ref-list p { font-size: 13px; line-height: 1.8; color: var(--text-dim, #9fb0bd); margin: 6px 0; }
@media (max-width: 900px) { .gene-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gene-grid { grid-template-columns: 1fr; } }

/* 合规版纹样基因：图样占位 + 字段定义列表 + 合规横幅 */
.gene-banner { background: rgba(216,180,106,0.08); border: 1px solid var(--line, #2a3f50); border-left: 3px solid var(--gold, #d8b46a); border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; font-size: 13px; line-height: 1.85; color: var(--text-dim, #9fb0bd); }
.gene-banner b { color: var(--gold, #d8b46a); }
.gene-img-block { margin: 0 0 12px; }
.gene-img-pending { width: 100%; aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; background: repeating-linear-gradient(45deg, #11181f, #11181f 10px, #0e151b 10px, #0e151b 20px); border: 1px dashed var(--line, #2a3f50); color: var(--text-dim, #9fb0bd); font-size: 14px; text-align: center; padding: 12px; }
.gene-img-pending span { font-size: 11px; opacity: 0.8; }
.gene-src-link { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--gold, #d8b46a); text-decoration: none; border: 1px solid var(--line, #2a3f50); border-radius: 6px; padding: 4px 10px; }
.gene-src-link:hover { background: rgba(216,180,106,0.12); }
.gene-fields { margin: 0; display: grid; grid-template-columns: 84px 1fr; gap: 4px 10px; }
.gene-fields dt { font-size: 12px; color: var(--gold, #d8b46a); font-weight: 600; line-height: 1.6; }
.gene-fields dd { margin: 0; font-size: 13px; color: var(--text-dim, #9fb0bd); line-height: 1.7; }

/* --- 真实参照图（Open Access CC0）--- */
.gene-ref-img { width: 100%; height: auto; display: block; border-radius: 8px; background: #fbfaf6; border: 1px solid var(--line, #2a3f50); margin: 8px 0 4px; }
.gene-ref-badge { display: inline-block; margin-top: 2px; padding: 3px 12px; border-radius: 999px; border: 1px solid var(--gold, #d8b46a); color: var(--gold, #d8b46a); font-size: 12px; letter-spacing: 1px; }
.gene-ref-cap { font-size: 12px; color: var(--text-dim, #9fb0bd); line-height: 1.75; margin: 4px 0 10px; }
.gene-ref-cap a { color: var(--gold, #d8b46a); text-decoration: none; }
.gene-ref-cap a:hover { text-decoration: underline; }

/* 待开发占位块：居中放大 */
.dev-note {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; min-height: 56vh; background: var(--bg-soft, #0f2433);
  border: 1px dashed var(--line, rgba(216,180,106,0.3)); border-radius: 14px;
  padding: 60px 40px;
}
.dev-note__icon { font-size: 60px; margin-bottom: 18px; line-height: 1; }
.dev-note h2 { font-size: 32px; letter-spacing: 10px; margin: 0 0 14px; color: var(--gold, #d8b46a); }
.dev-note p { font-size: 17px; color: var(--text-dim, #9fb0bd); margin: 0; letter-spacing: 1px; }

/* 教学视频弹窗：按视频真实比例完整显示，不再被 16:9 容器裁切 */
.video-frame.is-video { aspect-ratio: auto; padding: 0; border: 0; background: #000; display: block; }
.video-frame.is-video video { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
