/* 龙巢创生 · 暗金龙巢主题 */
:root {
  --bg: #14121f;
  --bg-2: #1c1930;
  --panel: #221e36;
  --panel-2: #2a2542;
  --gold: #e8b33c;
  --gold-light: #f6d68a;
  --gold-dim: #8a6f2e;
  --gold-rgb: 232, 179, 60;   /* 金色半透明底/边框用，白天主题会切成黑色 */
  --text: #f2eddf;
  --muted: #9c93b8;
  --line: rgba(var(--gold-rgb), 0.22);
  --green: #5dcaa5;
  --orange: #ef9f27;
  --radius: 12px;
  --maxw: 1180px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- 作品 / 角色详情弹窗 ---------- */
.detail-open { cursor: zoom-in; }
.detail-mask {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(10, 8, 20, .62); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.detail-mask[hidden] { display: none; }
.detail-box {
  display: grid; grid-template-columns: 1.15fr 1fr;
  width: min(960px, 100%); max-height: 90vh;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
  animation: detail-in .3s ease;
}
@keyframes detail-in { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.detail-close {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 15px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.detail-close:hover { border-color: var(--gold); color: var(--gold); }
.detail-view {
  position: relative; display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); min-height: 420px; overflow: hidden;
}
.detail-img { max-width: 100%; max-height: 88vh; object-fit: contain; display: block; }
.detail-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(20, 18, 31, .55); color: #fff; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.detail-arrow:hover { background: var(--gold); }
.detail-prev { left: 14px; }
.detail-next { right: 14px; }
.detail-count {
  position: absolute; bottom: 12px; right: 16px;
  background: rgba(20, 18, 31, .55); color: #fff;
  font-size: 12px; padding: 3px 12px; border-radius: 999px;
}
.detail-info { padding: 30px 28px; overflow-y: auto; }
.detail-title { font-size: 24px; margin-bottom: 12px; padding-right: 40px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-props { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.detail-price { margin-bottom: 16px; }
.detail-price .wp-main { color: var(--gold); font-size: 20px; font-weight: 700; }
.detail-price .wp-row {
  display: flex; justify-content: space-between; max-width: 260px;
  font-size: 14px; padding: 3px 0; color: var(--muted);
}
.detail-price .wp-row b { color: var(--gold); font-weight: 700; }
.detail-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.detail-thumb {
  width: 60px; height: 60px; padding: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--line); background: none; cursor: pointer; opacity: .65;
  transition: border-color .2s, opacity .2s;
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-thumb.active { border-color: var(--gold); opacity: 1; }
.detail-desc-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; letter-spacing: 2px; }
.detail-desc { color: var(--text); font-size: 14.5px; line-height: 1.9; white-space: pre-wrap; }
@media (max-width: 760px) {
  .detail-box { grid-template-columns: 1fr; overflow-y: auto; }
  .detail-view { min-height: 280px; }
  .detail-img { max-height: 46vh; }
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-light); text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:hover, a:focus, a:active, a:visited { text-decoration: none; }

/* ---------- 头部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(20, 18, 31, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* Logo 与右侧两行文字块等高：24px 主标题 + 4px 间距 + 12px 副标题 = 40px
   logo 图放大到 56px 保证细节看得清，用负外边距抵掉多出的 16px，header 高度不变 */
.brand img { height: 56px; width: auto; margin: -8px 0; flex-shrink: 0; }
.brand-logo-light { display: none; }
html.theme-light .brand-logo-dark { display: none; }
html.theme-light .brand-logo-light { display: block; }
.brand-name { font-size: 20px; font-weight: 700; color: var(--gold-light); letter-spacing: 2px; line-height: 1.2; }
.brand-sub { display: block; font-size: 10px; letter-spacing: 3px; color: var(--muted); font-weight: 400; line-height: 1.2; margin-top: 4px; }
.main-nav { display: flex; gap: 28px; flex: 1; }
.main-nav a {
  color: var(--text); font-size: 15px; padding: 6px 0;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--gold-light); }
.main-nav a.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: 999px;
  font-size: 15px; cursor: pointer; border: 1px solid var(--gold);
  transition: all .2s;
}
.btn-gold { background: var(--gold); color: #1a1626; font-weight: 600; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; color: var(--gold-light); }
.btn-outline:hover { background: rgba(var(--gold-rgb), 0.12); }
.btn-sm { padding: 8px 20px; font-size: 14px; }

/* ---------- 通用布局 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding-top: 72px; padding-bottom: 72px; }
.section-title { font-size: 26px; color: var(--gold-light); margin-bottom: 8px; letter-spacing: 1px; }
.section-title.is-center { text-align: center; margin-bottom: 30px; }
.section-sub { color: var(--muted); margin-bottom: 36px; }
/* 内页（展示馆 / 角色池）：标题本身就是页标题，顶部留白收紧，别压着首屏 */
.section-page { padding-top: 40px; }
h1.section-title { font-size: 30px; letter-spacing: 3px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); }

/* ---------- 首页 Hero 通栏轮播横幅 ---------- */
.hero-banner {
  position: relative; width: 100%;
  height: clamp(440px, 82vh, 800px);   /* 参考图比例：通栏图约占视口八成，顶部被透明菜单覆盖 */
  overflow: hidden; background: var(--bg-2);
}
.carousel-slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
}
.carousel-slide.is-active { opacity: 1; visibility: visible; }
.carousel-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* 裁切基点默认正中央；个别图片需要调整时加内联样式覆盖，如 style="object-position: 50% 30%" */
  object-position: center center;
  animation: bannerZoom 7s ease-out both;
}
/* 未放图时的占位背景 */
.slide-placeholder {
  width: 100%; height: 100%;
  border: 1px dashed var(--gold-dim);
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--gold-rgb), .10) 0%, transparent 45%),
    rgba(var(--gold-rgb), 0.04);
}
/* 分页指示器（轮播小点，底部居中） */
.carousel-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 2;
}
.carousel-dot {
  width: 10px; height: 10px; padding: 0; border: none; border-radius: 999px;
  background: rgba(var(--gold-rgb), .28); cursor: pointer;
  transition: width .3s ease, background .3s ease;
  box-shadow: 0 0 6px rgba(0, 0, 0, .5);
}
.carousel-dot:hover { background: rgba(var(--gold-rgb), .55); }
.carousel-dot.is-active { width: 28px; background: var(--gold); }

@keyframes bannerZoom {
  from { transform: scale(1.03); }
  to   { transform: scale(1); }
}

/* ---------- 数据带 ---------- */
.stats-band {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.stats-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 36px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center;
}
.stat-num { font-size: 40px; font-weight: 700; color: var(--gold); }
.stat-num small { font-size: 16px; color: var(--muted); font-weight: 400; }
.stat-label { color: var(--muted); font-size: 14px; }

/* ---------- 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.quick-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 24px; text-align: center; transition: transform .2s, border-color .2s;
}
.quick-card:hover { transform: translateY(-4px); border-color: var(--gold); }
.quick-card svg { width: 44px; height: 44px; margin: 0 auto 16px; stroke: var(--gold); }
.quick-card h3 { font-size: 17px; margin-bottom: 6px; color: var(--text); }
.quick-card p { font-size: 13px; color: var(--muted); }

/* ---------- 公告 ---------- */
.notice-list { display: flex; flex-direction: column; gap: 12px; }
.notice-item {
  display: flex; gap: 16px; align-items: baseline;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 24px;
}
.notice-date { color: var(--gold-dim); font-size: 13px; white-space: nowrap; }
.notice-item.pinned .notice-date { color: var(--orange); }

/* ---------- 作品网格 ---------- */
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.work-card .cover { aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.work-body { padding: 18px 20px; }
.work-body h3 { font-size: 17px; margin-bottom: 4px; }
.work-grid .work-body { text-align: center; padding: 14px 14px 16px; }
.work-grid .work-body h3 { font-size: 16.5px; margin-bottom: 6px; }
.work-grid .work-body .stat-label { font-size: 13.5px; }
.work-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.work-price { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.work-price .wp-main { color: var(--gold); font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.work-price .wp-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13.5px; padding: 3px 0; color: var(--muted);
}
.work-price .wp-row + .wp-row { margin-top: 2px; }
.work-price .wp-row b { color: var(--gold); font-weight: 700; font-size: 14.5px; letter-spacing: .5px; }
.tag {
  font-size: 12px; padding: 3px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.tag-gold { color: var(--gold); border-color: var(--gold-dim); }

/* ---------- 筛选 ---------- */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-btn {
  padding: 8px 22px; border-radius: 999px; font-size: 14px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.filter-btn.active, .filter-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 掉落 ---------- */
.drop-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 40px; margin-bottom: 48px;
}
.drop-hero img { border-radius: var(--radius); }
.drop-slide > img { aspect-ratio: 1600 / 1684; object-fit: contain; background: #fff; }
/* 换卡式掉落展示：多期堆叠在同一舞台，切换显示 */
.drop-stage { display: grid; }
.drop-slide {
  grid-area: 1 / 1; margin-bottom: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease, visibility .55s;
}
.drop-slide.active { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.drop-stage + .card, .drop-stage { margin-bottom: 48px; }
/* 在售掉落快速切换条（缩略图，无价格） */
.drop-nav { margin-bottom: 28px; }
.drop-nav-cards { display: flex; gap: 14px; flex-wrap: wrap; }
.drop-nav-card {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  font: inherit; text-align: left; background: transparent;
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 18px 10px 10px;
  transition: border-color .2s, background .2s, transform .2s; min-width: 180px;
}
.drop-nav-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.drop-nav-card.active { border-color: var(--gold); background: rgba(var(--gold-rgb), .1); }
.drop-nav-card img, .drop-nav-thumb-empty {
  width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.drop-nav-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--muted); border: 1px dashed var(--line);
}
.drop-nav-name { color: var(--text); font-size: 15px; font-weight: 600; }
.drop-nav-card:hover .drop-nav-name, .drop-nav-card.active .drop-nav-name { color: var(--gold-light); }
.drop-status { display: inline-block; padding: 4px 16px; border-radius: 999px; font-size: 13px; margin-bottom: 16px; }
.status-open { background: rgba(93,202,165,.15); color: var(--green); border: 1px solid var(--green); }
.status-sold { background: rgba(156,147,184,.12); color: var(--muted); border: 1px solid var(--muted); }
.countdown { display: flex; gap: 12px; margin: 24px 0; }
.cd-cell {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  min-width: 76px; padding: 12px; text-align: center;
}
.cd-num { font-size: 28px; font-weight: 700; color: var(--gold); }
.cd-label { font-size: 12px; color: var(--muted); }
.drop-price { font-size: 30px; color: var(--gold); font-weight: 700; margin: 12px 0; }
.rule-list { padding-left: 20px; color: var(--muted); }
.rule-list li { margin-bottom: 10px; }
.rule-list strong { color: var(--text); }
.drop-rules-title { color: var(--gold-light); }

/* ---------- 估价器 ---------- */
.estimate-layout { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 40px; align-items: start; }
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 36px; }
.form-group { margin-bottom: 24px; }
.form-group > label { display: block; font-size: 15px; margin-bottom: 10px; color: var(--gold-light); }
.opt-row { display: flex; gap: 12px; flex-wrap: wrap; }
.opt-chip { position: relative; }
.opt-chip input { position: absolute; opacity: 0; }
.opt-chip .opt-pill {
  display: inline-block; padding: 9px 20px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--line); color: var(--muted); cursor: pointer; transition: all .15s;
}
.opt-chip input:checked + .opt-pill { border-color: var(--gold); color: var(--gold); background: rgba(var(--gold-rgb), .1); }
.form-input, .form-textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px; color: var(--text); font-size: 15px;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--gold); }
.estimate-panel {
  position: sticky; top: 100px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--gold-dim); border-radius: 16px; padding: 32px; text-align: center;
}
.estimate-price { font-size: 38px; font-weight: 700; color: var(--gold); margin: 8px 0; }
.estimate-note { font-size: 12px; color: var(--muted); margin-bottom: 20px; }

/* ---------- 价格表 ---------- */
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td {
  padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--line);
}
.price-table th { color: var(--gold-light); font-weight: 500; }
.price-table td:last-child { color: var(--gold); font-weight: 600; }

/* ---------- 排单表 / 进度 ---------- */
.queue-list { display: flex; flex-direction: column; gap: 12px; }
.queue-row {
  display: grid; grid-template-columns: 120px 1fr 140px; gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 24px;
}
.queue-name { color: var(--gold-light); }
.stage-badge { text-align: center; font-size: 13px; padding: 4px 14px; border-radius: 999px; }
.stage-making { background: rgba(239,159,39,.15); color: var(--orange); }
.stage-wait { background: rgba(156,147,184,.12); color: var(--muted); }
.stage-done { background: rgba(93,202,165,.15); color: var(--green); }
.progress-track { background: var(--bg); border-radius: 999px; height: 8px; position: relative; }
.progress-fill { background: var(--gold); border-radius: 999px; height: 100%; }
.order-result { margin-top: 24px; }

/* ---------- 角色池 ---------- */
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.char-grid .work-body { padding: 14px 14px 16px; }
.char-grid .char-card .cover { padding: 12px; }
.char-card .cover { aspect-ratio: 1/1; object-fit: contain; background: var(--bg-2); width: 100%; padding: 20px; }
.placeholder-box {
  display: flex; justify-content: center; align-items: center;
  background: var(--bg-2); border: 1px dashed var(--gold-dim); border-radius: var(--radius);
  color: var(--muted); font-size: 14px; letter-spacing: 2px;
}

/* ---------- 关于 / 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.contact-card { text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 20px; }
.contact-card svg { width: 40px; height: 40px; stroke: var(--gold); margin: 0 auto 14px; }
.contact-card h3 { font-size: 16px; margin-bottom: 8px; }
.contact-card p { color: var(--muted); font-size: 14px; word-break: break-all; }
/* 联系方式取值：可点链接 / 纯文本 / 待上线灰字 / 点击复制 */
/* 联系方式链接：悬停不加下划线、不变色（保持与正文一致的金色） */
.c-link { color: var(--gold-light); text-decoration: none; cursor: pointer; }
.c-link:hover, .c-link:focus, .c-link:active, .c-link:visited {
  color: var(--gold-light); text-decoration: none; border-bottom: 0;
}
.c-value { color: var(--text); }
/* 微信号等长串按连字符换行，不再逐字断开 */
.contact-card p .c-copy, .contact-card p .c-value, .contact-card p .c-link {
  word-break: normal; overflow-wrap: break-word;
}
.c-off { color: var(--muted); opacity: .75; }
.c-copy {
  color: var(--text); cursor: pointer; border-bottom: 1px dashed var(--line);
  padding-bottom: 1px; transition: color .2s, border-color .2s;
}
.c-copy:hover { color: var(--gold-light); border-bottom-color: var(--gold); }
/* 社媒图标行（页脚 / 关于我们 / 返图详情弹窗共用） */
.social-icon-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; }
.site-footer .social-icon-row { justify-content: flex-start; margin-top: 16px; }
.social-icon {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: transparent;
  transition: border-color .2s, background .2s, transform .2s;
}
.social-icon img { width: 22px; height: 22px; display: block; flex: none; }
.social-icon:hover { border-color: var(--gold); background: rgba(var(--gold-rgb), .1); transform: translateY(-2px); }
/* 抖音 / 推特 是白色图标，浅色主题下反色，否则看不见 */
html.theme-light .social-icon.is-mono img { filter: invert(1); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: 40px; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.footer-inner h4 { color: var(--gold-light); margin-bottom: 14px; font-size: 15px; }
.footer-inner a, .footer-inner p { color: var(--muted); font-size: 14px; display: block; margin-bottom: 8px; }
.footer-inner a:hover { color: var(--gold-light); }
/* 页脚里的联系方式链接保持金色、无下划线，避免被 .footer-inner a 的灰色覆盖 */
.footer-inner .c-link { color: var(--gold-light); text-decoration: none; }
/* 页脚里的联系方式链接保持行内，不跟「快速链接」一样独占一行 */
.footer-inner p a { display: inline; margin-bottom: 0; }
/* 社媒图标：`.footer-inner a` 的 display:block 会把圆形的居中顶掉（图标跑到左上角），这里复位 */
.footer-inner .social-icon-row .social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 0;
}
.copyright { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; border-top: 1px solid var(--line); }

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); border: 1px solid var(--gold); color: var(--text);
  padding: 14px 28px; border-radius: 10px; font-size: 14px; z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.toast.show { opacity: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .work-grid, #work-grid, .char-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 960px) {
  /* minmax(0,1fr)：允许网格列收缩到内容最小宽度以下，倒计时等内容不会把卡片顶宽 */
  .estimate-layout, .drop-hero { grid-template-columns: minmax(0, 1fr); }
  .quick-grid, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid, #work-grid, .char-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-banner { height: clamp(320px, 52vh, 520px); }
}
@media (max-width: 600px) {
  /* 手机端：左右留白收窄，两列卡片多留点宽度 */
  .container { padding-left: 16px; padding-right: 16px; }
  /* 手机端轮播：高度跟着图片自身比例走，整张照片完整显示，不再被硬裁两侧 */
  .hero-banner { height: auto; min-height: 0; }
  .carousel-slide.is-active { position: relative; inset: auto; }
  .carousel-slide img { height: auto; min-height: 200px; max-height: 70vh; object-fit: cover; animation: none; }
  .carousel-dots { bottom: 14px; }
  /* 手机端：展示馆 / 角色池 保持一行两个 */
  .work-grid, #work-grid, .char-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  #work-grid .work-body, .work-grid .work-body, .char-grid .work-body { padding: 10px 8px 12px; }
  #work-grid .work-body h3, .work-grid .work-body h3, .char-grid .work-body h3 { font-size: 15px; }
  #work-grid .work-body .stat-label, .work-grid .work-body .stat-label, .char-grid .work-body .stat-label { font-size: 12px; }
  .char-grid .char-card .cover { padding: 8px; }
  /* 手机端：快捷入口 4 个卡片改成两行两列，整体收紧不占屏 */
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .quick-card { padding: 18px 10px; border-radius: 12px; }
  .quick-card svg { width: 30px; height: 30px; margin-bottom: 10px; }
  .quick-card h3 { font-size: 14px; margin-bottom: 4px; }
  .quick-card p { font-size: 11px; line-height: 1.5; }
  .queue-row { grid-template-columns: 1fr; gap: 8px; }
  /* 手机端掉落卡：图片/文字列可收缩 + 倒计时四格等分，不再把卡片撑出屏幕 */
  .drop-hero { padding: 18px 16px 22px; gap: 22px; border-radius: 14px; margin-bottom: 28px; }
  .drop-hero > * { min-width: 0; }
  .drop-hero h3 { font-size: 22px !important; }
  .drop-hero .drop-price { font-size: 26px; }
  .countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
  .cd-cell { min-width: 0; padding: 9px 4px; border-radius: 8px; }
  .cd-num { font-size: 20px; line-height: 1.2; }
  .cd-label { font-size: 10.5px; }
  .drop-nav-card { min-width: 0; flex: 1 1 100%; }
}

/* ==================== 页面加载动画（黑幕 + Logo） ==================== */
.page-loader {
  position: fixed; inset: 0; z-index: 9000;
  background: #000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  opacity: 1; visibility: visible;
  transition: opacity .5s ease, visibility .5s ease;
  /* 兜底：万一脚本失效，2.6 秒后自动消失，不会卡住页面 */
  animation: loaderFallback .4s ease 2.6s forwards;
}
.loader-logo {
  position: relative; height: 200px; width: auto;
  animation: loaderLogoIn .85s cubic-bezier(.2, .7, .3, 1) both,
             loaderBreathe 2.4s ease-in-out .85s infinite;
}
/* 浅色主题使用黑白反转版 Logo，双图按主题显隐切换 */
.loader-logo-light { display: none; }
html.theme-light .loader-logo-dark { display: none; }
html.theme-light .loader-logo-light { display: block; }
html.theme-light .page-loader { background: var(--bg); }
html.theme-light .loader-bar { background: rgba(17, 17, 17, .14); }
html.theme-light .loader-bar i {
  background: linear-gradient(90deg, var(--gold), var(--gold-light), #7a5a06);
}
html.theme-light .loader-text { color: rgba(17, 17, 17, .55); }
.loader-bar {
  position: relative; margin-top: 36px; width: 136px; height: 2px;
  background: rgba(var(--gold-rgb), .16); overflow: hidden; border-radius: 2px;
}
.loader-bar i {
  display: block; width: 0; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-light));
  animation: loaderBarGrow 1.05s cubic-bezier(.25, .8, .3, 1) .1s forwards;
}
.loader-text {
  position: relative; margin-top: 18px;
  font-size: 10px; letter-spacing: 5px; text-transform: uppercase;
  color: rgba(var(--gold-rgb), .55);
  animation: loaderFadeIn .8s ease .25s both;
}
/* 淡出（正常结束 / 点击链接时） */
.page-loader.is-leaving { opacity: 0; visibility: hidden; }
/* 点击站内链接时，幕帘要快速拉上 */
.page-loader.is-entering { transition: opacity .18s ease, visibility .18s ease; }
/* 彻底隐藏（保留在 DOM 中，便于再次淡入） */
.page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

@keyframes loaderLogoIn {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes loaderBreathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: .82; }
}
@keyframes loaderBarGrow {
  from { width: 0; }
  to   { width: 100%; }
}
@keyframes loaderFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes loaderFallback {
  to { opacity: 0; visibility: hidden; }
}

/* 尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  .loader-logo { animation: none; }
  .loader-bar i { animation: none; width: 100%; }
  .loader-text { animation: none; }
}

/* 移动端适配 */
@media (max-width: 600px) {
  .loader-logo { height: 148px; }
}

/* ---------- 换肤 · 白天主题（html.theme-light）：纯黑白 ---------- */
/* 三层米白：页面底 #FBFAF6（极浅米） < 普通卡片 #FFFFFF（白） < 档案卡 #EDE6D4（米纸） */
html.theme-light {
  --bg: #fbfaf6;              /* 页面底：极浅米 */
  --bg-2: #f5f2e9;            /* 次级底：页脚/图片槽，比页面底再深一档 */
  --panel: #ffffff;           /* 普通卡片：白，压在米底上浮起来 */
  --panel-2: #f2eee4;         /* 输入框/次级块：暖浅灰 */
  --paper: #ede6d4;           /* 档案卡：米纸（掉落主卡 / 历史档案） */
  --gold: #111111;            /* 原强调色 → 黑 */
  --gold-light: #111111;      /* 标题/链接 → 黑 */
  --gold-dim: #8c8c8c;
  --gold-rgb: 17, 17, 17;     /* 半透明描边/底色 → 黑 */
  --text: #111111;
  --muted: #6b6b6b;
  --line: rgba(17, 17, 17, 0.15);
}
html.theme-light .site-header { background: rgba(251, 250, 246, 0.94); }
html.theme-light a { color: var(--gold-light); }
html.theme-light .carousel-dot { box-shadow: 0 0 6px rgba(17, 17, 17, .25); }

html.theme-light .btn-gold { color: #ffffff; }

/* 白天主题：置顶公告、状态标签也不用彩色，统一黑白灰 */
html.theme-light .notice-item.pinned .notice-date { color: #111111; font-weight: 600; }
html.theme-light .status-open { background: rgba(17, 17, 17, .06); color: #111111; border-color: #111111; }
html.theme-light .stage-making { background: rgba(17, 17, 17, .1); color: #111111; }
html.theme-light .stage-wait { background: rgba(17, 17, 17, .05); color: #6b6b6b; }
html.theme-light .stage-done { background: #111111; color: #ffffff; }

/* ---------- 白天主题：导航加粗（黑体） ---------- */
html.theme-light .main-nav a { font-weight: 700; }

/* ---------- 白天主题：详情 / 筛选对话框仍用品牌渐变 ----------
   取色自 logo 底图：左上粉橙 #F5BEAE → 淡紫 #D4C2CF → 右下浅蓝 #BDD0FA */
html.theme-light {
  --panel-grad: linear-gradient(135deg, #f5beae 0%, #e8bcb7 26%, #d4c2cf 52%, #c2c4e6 78%, #bdd0fa 100%);
}
html.theme-light .detail-box,
html.theme-light .filter-dialog { background: var(--panel-grad); }
html.theme-light .fd-chip { background: var(--panel-grad); color: #111111; }
/* 筛选弹窗里的 chip 叠在同样的渐变上，铺一层薄白才看得出边界 */
html.theme-light .filter-dialog .fd-chip { background: rgba(255, 255, 255, .42); }
html.theme-light .fd-chip.active {
  border-color: #111111; color: #111111; font-weight: 700;
  box-shadow: inset 0 0 0 1px #111111;
}
html.theme-light .filter-dialog .fd-chip.active:not(:hover) { background: #111111; color: #ffffff; }
html.theme-light .filter-close { color: #111111; border-color: rgba(17, 17, 17, .35); }

/* ---------- 白天主题：角色池选项卡 / 展示馆筛选按钮 → 黑底白字 ---------- */
/* ---------- 白天主题：角色池选项卡 → 白纸卡 + 黑描边，选中转米纸 ---------- */
html.theme-light .char-tab {
  background: var(--panel);
  border-color: rgba(17, 17, 17, .16);
  color: #111111;
}
html.theme-light .char-tab:hover {
  background: #ffffff;
  border-color: rgba(17, 17, 17, .45);
  color: #111111;
}
html.theme-light .char-tab .char-tab-num { color: #111111; opacity: .32; }
html.theme-light .char-tab.active {
  background: var(--paper);
  border-color: #111111;
  color: #111111;
  box-shadow: inset 0 0 0 1px #111111;
  transform: none;
}
html.theme-light .char-tab.active .char-tab-num { color: #111111; opacity: 1; }
html.theme-light .char-tab.active .char-tab-count { opacity: .7; }

html.theme-light .filter-btn { background: #111111; border-color: #111111; color: #ffffff; }
html.theme-light .filter-btn:hover { background: #000000; border-color: #000000; color: #ffffff; }
html.theme-light .filter-btn.active {
  background: #000000; border-color: #000000; color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}
/* 已选条件的小计数，黑底上转白 */
html.theme-light .filter-count { color: #ffffff; }

/* ---------- 白天主题：掉落页「发售规则」黑底白字、「历史档案」米白纸感 ---------- */
html.theme-light #drop-rules { background: #111111; border-color: #111111; }
html.theme-light #drop-rules .drop-rules-title { color: #ffffff; }
html.theme-light #drop-rules .rule-list { color: rgba(255, 255, 255, .86); }
html.theme-light #drop-rules .rule-list strong { color: #ffffff; }
html.theme-light .drop-hero,
html.theme-light #drop-archive .card { background: var(--paper); }
/* 档案纸上的虚线窗口不要另铺一层灰底，留白更干净 */
html.theme-light #drop-archive .placeholder-box { background: transparent; }

/* 白天主题：按钮统一黑底白字 */
html.theme-light .btn,
html.theme-light .btn-gold,
html.theme-light .btn-outline {
  background: #111111; color: #ffffff; border-color: #111111;
}
html.theme-light .btn:hover,
html.theme-light .btn-gold:hover,
html.theme-light .btn-outline:hover {
  background: #000000; color: #ffffff; border-color: #000000;
}

/* 主题切换按钮 */
.theme-toggle {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--gold-light);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  transition: transform .2s, border-color .2s;
}
.theme-toggle:hover { border-color: var(--gold); transform: rotate(20deg); }

/* ---------- 中英文切换 ---------- */
.t-en { display: none; }
html[data-lang="en"] .t-zh { display: none; }
html[data-lang="en"] .t-en { display: inline; }

.lang-toggle {
  flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--muted); font: inherit; font-size: 12.5px; letter-spacing: .5px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: border-color .2s, color .2s;
}
.lang-toggle:hover { border-color: var(--gold); }
.lt-sep { opacity: .4; }
html:not([data-lang="en"]) .lt-zh,
html[data-lang="en"] .lt-en { color: var(--gold); font-weight: 600; }

/* ---------- 首页：透明悬浮菜单（浮在通栏图上，滚动后变实心） ---------- */
body.page-home .site-header {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; backdrop-filter: none;
  border-bottom-color: transparent;
  transition: background .3s ease, border-color .3s ease;
}
body.page-home .site-header.is-solid {
  background: rgba(20, 18, 31, .92);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}
html.theme-light body.page-home .site-header.is-solid {
  background: rgba(251, 250, 246, .94);
}
/* 未滚动时：文字 / Logo / 按钮统一用白色，保证压在任意照片上都可读 */
body.page-home .site-header:not(.is-solid) .main-nav a {
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
body.page-home .site-header:not(.is-solid) .main-nav a:hover,
body.page-home .site-header:not(.is-solid) .main-nav a.active { color: #fff; }
body.page-home .site-header:not(.is-solid) .main-nav a.active { border-bottom-color: #fff; }
body.page-home .site-header:not(.is-solid) .brand-name {
  color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .5);
}
body.page-home .site-header:not(.is-solid) .brand-sub { color: rgba(255, 255, 255, .7); }
body.page-home .site-header:not(.is-solid) .brand-logo-dark {
  display: block; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .55));
}
body.page-home .site-header:not(.is-solid) .brand-logo-light { display: none; }
body.page-home .site-header:not(.is-solid) .theme-toggle,
body.page-home .site-header:not(.is-solid) .lang-toggle {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .42);
}
body.page-home .site-header:not(.is-solid) .lang-toggle .lt-zh,
body.page-home .site-header:not(.is-solid) .lang-toggle .lt-en { color: rgba(255, 255, 255, .6); }
body.page-home .site-header:not(.is-solid) .lang-toggle .lt-sep { color: rgba(255, 255, 255, .35); }
html:not([data-lang="en"]) body.page-home .site-header:not(.is-solid) .lang-toggle .lt-zh,
html[data-lang="en"] body.page-home .site-header:not(.is-solid) .lang-toggle .lt-en { color: #fff; }

/* 窄屏：收紧页头，导航改为可横向滑动，避免菜单被挤没 */
@media (max-width: 900px) {
  .header-inner { gap: 14px; }
  .main-nav { gap: 16px; }
  .main-nav a { font-size: 14px; }
}
@media (max-width: 760px) {
  .header-inner { gap: 10px; padding: 10px 12px; }
  .brand { gap: 8px; }
  .brand img { height: 42px; margin: -6px 0; }
  .brand-name { font-size: 16px; letter-spacing: 1px; }
  .brand-sub { display: none; }
  .lang-toggle { height: 30px; padding: 0 10px; font-size: 11px; }
  .theme-toggle { width: 34px; height: 34px; font-size: 15px; }
}

/* ---------- 移动端汉堡菜单 ---------- */
.nav-toggle {
  display: none; flex-shrink: 0;
  width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel-2); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span {
  display: block; width: 15px; height: 1.5px; border-radius: 2px;
  background: var(--text); transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .main-nav.is-open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    gap: 0; padding: 6px 20px 14px; min-width: 0; overflow: visible;
    background: rgba(20, 18, 31, .97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  html.theme-light .main-nav.is-open { background: rgba(251, 250, 246, .98); }
  .main-nav.is-open a {
    padding: 13px 0; font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  html.theme-light .main-nav.is-open a { border-bottom-color: rgba(17, 17, 17, .08); }
  .main-nav.is-open a:last-child { border-bottom: none; }
  /* 首页透明菜单展开时是实心面板，文字回到常规配色 */
  body.page-home .site-header:not(.is-solid) .main-nav.is-open a {
    color: var(--text); text-shadow: none;
  }
  body.page-home .site-header:not(.is-solid) .main-nav.is-open a.active { color: var(--gold); border-bottom-color: var(--gold); }
}

/* ---------- 展示馆分组筛选 ---------- */
.filter-block { margin-bottom: 18px; }
.filter-label {
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: var(--gold-light); margin-bottom: 10px;
}
.filter-block .filter-bar { margin-bottom: 0; gap: 10px; }
.filter-btn { display: inline-flex; align-items: center; gap: 7px; }
.filter-btn .swatch {
  display: inline-block; width: 14px; height: 14px; border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, .35); flex-shrink: 0;
}
html.theme-light .filter-btn .swatch { border-color: rgba(17, 17, 17, .3); }
.work-meta .swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, .3); margin-right: 5px; vertical-align: -1px;
}
html.theme-light .work-meta .swatch { border-color: rgba(17, 17, 17, .25); }
.tag.tag-muted { color: var(--muted); border-color: var(--line); }

/* ---------- 展示馆：一行工具条（搜索 + 筛选/排序/计数） + 筛选对话框 ---------- */
.gallery-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 34px;
}
.gallery-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gallery-actions .filter-btn { padding: 7px 18px; white-space: nowrap; }
.filter-count { color: var(--gold); margin-left: 4px; font-weight: 700; }
.gallery-total { font-size: 13px; color: var(--muted); white-space: nowrap; }

.gallery-search {
  display: flex; align-items: center; gap: 12px;
  flex: 1 1 320px; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 22px;
  transition: border-color .2s;
}
.gallery-search:focus-within { border-color: var(--gold); }
.search-ico { font-size: 15px; opacity: .7; flex-shrink: 0; }
.gallery-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; letter-spacing: 1px;
}
.gallery-search input::placeholder { color: var(--muted); }

/* 手机端：搜索独占一行，按钮与计数并排在下面一行 */
@media (max-width: 600px) {
  /* 手机端：和电脑端一样排成一行——搜索框占剩余宽度，按钮缩小后靠右 */
  .gallery-bar { flex-wrap: nowrap; gap: 8px; margin-bottom: 24px; }
  .gallery-search { flex: 1 1 auto; min-width: 0; padding: 9px 13px; gap: 6px; }
  .gallery-search input { font-size: 13px; letter-spacing: 0; min-width: 0; }
  .search-ico { font-size: 13px; }
  .gallery-actions { gap: 6px; flex-shrink: 0; }
  .gallery-actions .filter-btn { padding: 6px 10px; font-size: 12.5px; gap: 4px; }
  .gallery-total { font-size: 12px; }
}
/* 极窄屏（≤360px，如 iPhone SE）：优先保证搜索框可用，计数让位 */
@media (max-width: 360px) {
  .gallery-bar { gap: 6px; }
  .gallery-actions { gap: 5px; }
  .gallery-actions .filter-btn { padding: 6px 8px; font-size: 12px; }
  .gallery-total { display: none; }
  /* 头部：logo 收一档，避免和「龙巢创生」+ 右侧按钮抢空间 */
  .brand img { height: 34px; margin: -4px 0; }
  .brand { gap: 6px; }
  .brand-name { font-size: 15px; letter-spacing: 0; }
}

.gallery-empty {
  text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px;
}

/* ---------- 返图墙（瀑布流：列宽固定、高度随图，位置由 JS 计算） ---------- */
.fanart-search { max-width: 460px; margin: 0 auto 34px; }
.fanart-grid { position: relative; --fan-gap: 20px; }
.fanart-card {
  position: absolute; top: 0; left: 0;
  display: block; padding: 0; border: 0; background: var(--panel);
  border-radius: 14px; overflow: hidden; cursor: zoom-in;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
  transition: box-shadow .2s ease, filter .2s ease;
}
.fanart-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .34); filter: brightness(1.05); }
.fanart-card img { display: block; width: 100%; height: auto; }
.fanart-card.is-hide { display: none; }

/* 详情弹窗：单主的社交主页（没有链接的平台不渲染） */
.detail-social { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.detail-social:empty { display: none; }
/* 详情弹窗里的社交主页：只显示平台图标，不显示文字 */
.detail-social .social-icon { width: 36px; height: 36px; flex: 0 0 36px; }
.detail-social .social-icon img { width: 20px; height: 20px; }

@media (max-width: 600px) {
  .fanart-search { margin-bottom: 22px; }
  .fanart-grid { --fan-gap: 14px; }
  .fanart-card { border-radius: 12px; }
}

/* 对话框 */
.filter-modal {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0, 0, 0, .62);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.filter-dialog {
  position: relative; width: min(680px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 38px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}
.filter-close {
  position: absolute; top: 16px; right: 18px;
  width: 34px; height: 34px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line);
  color: var(--muted); font-size: 15px; cursor: pointer; line-height: 1;
  transition: color .2s, border-color .2s;
}
.filter-close:hover { color: var(--gold); border-color: var(--gold); }
.filter-dialog-title {
  text-align: center; font-size: 22px; letter-spacing: 3px;
  color: var(--text); margin-bottom: 26px;
}
.filter-dialog-title .t-zh, .filter-dialog-title .t-en { color: var(--text); }
.filter-dialog-title .fdt-hl .t-zh, .filter-dialog-title .fdt-hl .t-en { color: var(--gold-light); }
.fd-group { margin-bottom: 22px; }
.fd-label { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.fd-options { display: flex; flex-wrap: wrap; gap: 10px; }
.fd-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px; font-size: 14px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  transition: border-color .15s, color .15s, background .15s;
}
.fd-chip:hover { border-color: var(--gold); color: var(--gold-light); }
.fd-chip.active { border-color: var(--gold); color: var(--gold-light); background: rgba(var(--gold-rgb), .12); }
.fd-chip .swatch {
  display: inline-block; width: 13px; height: 13px; border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, .35);
}
html.theme-light .fd-chip .swatch { border-color: rgba(17, 17, 17, .3); }
.filter-dialog-foot {
  display: flex; justify-content: center; gap: 14px; margin-top: 26px;
}
.filter-modal[hidden] { display: none; }

/* ---------- 角色池左侧选项卡 ---------- */
.char-layout {
  display: grid; grid-template-columns: 150px 1fr;
  gap: 36px; align-items: start;
}
.char-tabs {
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 96px;
}
.char-tab {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 18px 10px 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; font-family: inherit;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.char-tab:hover { border-color: var(--gold); color: var(--gold-light); transform: translateX(3px); }
.char-tab.active { background: var(--panel-2); border-color: var(--gold); color: var(--text); }
.char-tab-num { font-size: 26px; font-weight: 800; letter-spacing: 1px; opacity: .4; line-height: 1; }
.char-tab.active .char-tab-num { color: var(--gold-light); opacity: 1; }
.char-tab-label { font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.char-tab-count { font-size: 11px; opacity: .75; }
@media (max-width: 768px) {
  .char-layout { grid-template-columns: 1fr; gap: 22px; }
  .char-tabs { flex-direction: row; position: static; }
  .char-tab { flex: 1; padding: 12px 6px 10px; }
  .char-tab-num { font-size: 20px; }
  .char-tab-label { font-size: 12px; }
}

/* 自定义文件选择：避开浏览器原生控件文字跟随系统语言 */
.file-pick { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-pick input[type="file"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; z-index: 2;
}
.file-btn {
  display: inline-flex; align-items: center; padding: 9px 18px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; color: var(--text); transition: border-color .2s, color .2s;
}
.file-pick:hover .file-btn { border-color: var(--gold); color: var(--gold-light); }
.file-name { font-size: 13px; color: var(--muted); }

/* 英文模式下页脚品牌区已有英文名，隐藏重复的英文标语行 */
html[data-lang="en"] .site-footer .footer-inner > div:first-child p:last-child { display: none; }

/* ---------- 装师信息（关于我们）：左图右文 ---------- */
.artisan-sec { margin-bottom: 48px; }
.artisan-sec[hidden] { display: none; }
.artisan-list { display: flex; flex-direction: column; gap: 16px; }
.artisan-item {
  display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px;
  align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px;
}
.artisan-photo {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 14px; background: var(--bg-2); display: block;
}
.artisan-photo.is-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; font-weight: 800; color: var(--gold-dim);
}
.artisan-body { min-width: 0; }
.artisan-body h4 {
  font-size: 19px; font-weight: 700; color: var(--text);
  letter-spacing: 1px; margin-bottom: 10px;
}
.artisan-body p { color: var(--muted); font-size: 14.5px; line-height: 1.95; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 600px) {
  .artisan-item { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .artisan-photo { width: 150px; }
  .artisan-body h4 { font-size: 17px; }
}

/* ================= 龙巢工艺（类别选项卡 / 系列卡片 / 系列大图） ================= */
.craft-sub { text-align: center; margin-bottom: 34px; }

/* 选项卡：深色价目条，选中项提亮（明暗两套主题下都保持同一块黑）
   类别最多 8 个，放不下时整条横向滑动，不压缩文字 */
.craft-tabs {
  display: flex;
  background: #16151a;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  margin: 0 auto 34px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
}
.craft-tabs::-webkit-scrollbar { display: none; }
.craft-tab {
  position: relative; flex: 1 1 0; min-width: 116px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 21px 14px;
  border: 0; border-left: 1px solid rgba(255, 255, 255, .08);
  background: transparent; cursor: pointer; font-family: inherit;
  color: rgba(255, 255, 255, .55);
  font-size: 17px; font-weight: 700; letter-spacing: 3px;
  transition: background .22s ease, color .22s ease;
}
/* 5 个以上类别时收紧字号，尽量一条放下 */
.craft-tabs.is-dense .craft-tab { padding: 21px 10px; font-size: 14.5px; letter-spacing: 1px; gap: 7px; }
.craft-tabs.is-dense .craft-tab-n { font-size: 10.5px; padding: 0 5px; }
.craft-tab:first-child { border-left: 0; }
.craft-tab:hover { background: rgba(255, 255, 255, .06); color: #ffffff; }
.craft-tab.active { background: #2d2c34; color: #ffffff; }
.craft-tab.active::after {
  content: ""; position: absolute; left: 22px; right: 22px; bottom: 0;
  height: 2px; background: #ffffff;
}
.craft-tab-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.craft-tab-n {
  flex-shrink: 0; font-size: 11.5px; font-weight: 500; letter-spacing: 0; line-height: 1.6;
  padding: 0 7px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .62);
}
.craft-tab.active .craft-tab-n { background: #ffffff; border-color: #ffffff; color: #16151a; font-weight: 700; }
html[data-lang="en"] .craft-tab { font-size: 15px; letter-spacing: 1px; }

/* 面板 */
.craft-panel[hidden] { display: none; }
.craft-panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--line);
}
.craft-panel-intro { color: var(--muted); font-size: 14px; line-height: 1.8; }
.craft-panel-count { flex-shrink: 0; color: var(--muted); font-size: 12.5px; letter-spacing: 1px; }

/* 系列卡片 */
.craft-series-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.craft-series-card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.craft-series-card:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .26); }
.craft-series-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; }
.craft-series-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.craft-series-card:hover .craft-series-thumb img { transform: scale(1.045); }
.craft-series-ph {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 52px; font-weight: 800; color: var(--gold-dim); letter-spacing: 0;
}
.craft-series-badge {
  position: absolute; right: 12px; bottom: 12px;
  padding: 3px 10px; border-radius: 999px;
  background: rgba(10, 9, 14, .72); backdrop-filter: blur(4px);
  color: #ffffff; font-size: 11.5px; letter-spacing: .5px;
}
.craft-series-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.craft-series-body h3 { font-size: 17px; letter-spacing: .5px; }
.craft-series-body p {
  color: var(--muted); font-size: 13.5px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.craft-series-go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gold); }
.craft-series-go i { font-style: normal; transition: transform .2s ease; }
.craft-series-card:hover .craft-series-go i { transform: translateX(4px); }

/* 空状态 / 底部提示 */
.craft-empty {
  text-align: center; color: var(--muted); font-size: 14.5px;
  padding: 70px 20px; border: 1px dashed var(--line); border-radius: 16px;
}

/* ---------- 系列页 ---------- */
.craft-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.craft-crumb a { color: var(--muted); }
.craft-crumb a:hover { color: var(--gold); }
.craft-crumb-sep { opacity: .45; }
.craft-crumb-now { color: var(--text); }
.craft-series-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 28px;
  padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--line);
}
.craft-series-head-main { min-width: 0; }
.craft-kicker {
  display: inline-block; margin-bottom: 12px; padding: 2px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--gold);
  font-size: 12px; letter-spacing: 3px;
}
.craft-series-title { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.25; letter-spacing: 2px; }
.craft-series-desc { margin-top: 12px; max-width: 68ch; color: var(--muted); font-size: 14.5px; line-height: 1.95; }
.craft-series-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 13px; letter-spacing: 1px; }
.craft-meta-dot { opacity: .5; }
.craft-back { flex-shrink: 0; font-size: 13px; color: var(--muted); padding-bottom: 2px; border-bottom: 1px solid transparent; }
.craft-back:hover { color: var(--gold); border-bottom-color: var(--gold); }
.craft-series-foot { margin-top: 40px; text-align: center; }

/* 系列大图 */
.craft-item-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.craft-item {
  position: relative; display: block; padding: 0; text-align: left; font-family: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: zoom-in;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.craft-item:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 20px 44px rgba(0, 0, 0, .28); }
.craft-item-media { display: block; aspect-ratio: 4 / 5; background: var(--bg-2); overflow: hidden; }
.craft-item-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.craft-item:hover .craft-item-media img { transform: scale(1.04); }
.craft-item-ph {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  color: var(--muted); font-size: 14px; letter-spacing: 2px;
}
.craft-item-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  padding: 44px 20px 16px; color: #ffffff;
  background: linear-gradient(to top, rgba(8, 7, 12, .8) 0%, rgba(8, 7, 12, .28) 58%, rgba(8, 7, 12, 0) 100%);
}
.craft-item-cap strong { font-size: 16px; font-weight: 700; letter-spacing: 1px; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.craft-item-sub { flex-shrink: 0; font-size: 12px; color: rgba(255, 255, 255, .75); white-space: nowrap; }

/* 没找到系列 */
.craft-missing { padding: 40px 0 60px; text-align: center; }
.craft-missing-text { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }

/* 详情弹窗：返图（仅龙巢工艺用） */
.detail-fan { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.detail-fan[hidden] { display: none; }
.detail-fan .df-label { margin-bottom: 10px; }
.df-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.df-grid button {
  padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: none; cursor: zoom-in; aspect-ratio: 1 / 1;
}
.df-grid button:hover { border-color: var(--gold); }
.df-grid img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.df-grid button:hover img { transform: scale(1.05); }

/* 导航多一项后：961–1120px 收紧间距，避免 8 个菜单挤出去 */
@media (min-width: 901px) and (max-width: 1120px) {
  .header-inner { gap: 16px; }
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 14px; }
}

@media (max-width: 900px) {
  .craft-tabs { margin-bottom: 26px; }
  .craft-tab { padding: 17px 10px; font-size: 15px; letter-spacing: 2px; gap: 7px; }
  .craft-series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .craft-panel-head { margin-bottom: 18px; }
}
@media (max-width: 700px) {
  .craft-item-grid { grid-template-columns: 1fr; gap: 18px; }
  .craft-series-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (max-width: 600px) {
  .craft-sub { margin-bottom: 22px; }
  .craft-tabs { border-radius: 12px; margin-bottom: 22px; }
  /* 手机上按 4 个一行铺成网格：超过 4 个自动换到第二行，全部类别一眼看全，不再横滑 */
  .craft-tabs,
  .craft-tabs.is-dense {
    display: grid;
    grid-template-columns: repeat(var(--craft-cols, 4), minmax(0, 1fr));
    gap: 1px;
    background: #2b2a33;
    overflow: hidden;
    -webkit-mask-image: none; mask-image: none;
  }
  .craft-tab,
  .craft-tabs.is-dense .craft-tab {
    min-width: 0; padding: 12px 5px;
    font-size: 12.5px; letter-spacing: 0; gap: 4px;
    background: #16151a; border-left: 0;
  }
  .craft-tab-fill { background: #16151a; }
  /* 类别名较长时折成两行，而不是砍成「打印头…」 */
  .craft-tab-name {
    white-space: normal; text-align: center; line-height: 1.3;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
    word-break: break-word;
  }
  .craft-tabs.is-dense .craft-tab-n,
  .craft-tab-n { font-size: 10px; padding: 0 4px; }
  html[data-lang="en"] .craft-tab { font-size: 11.5px; letter-spacing: 0; }
  .craft-tab.active::after { left: 8px; right: 8px; }
  .craft-series-grid { grid-template-columns: 1fr; }
  .craft-series-thumb { aspect-ratio: 16 / 10; }
  .craft-series-body { padding: 14px 16px 16px; }
  .craft-panel-intro { font-size: 13px; }
  .craft-item-cap { padding: 34px 14px 12px; }
  .craft-item-cap strong { font-size: 14.5px; }
  .craft-item-sub { font-size: 11px; }
  .craft-empty { padding: 46px 16px; }
}
