/* ============================================================
   作品集独立页 gallery.html 的样式（复用 style.css 的基础样式）
   ============================================================ */
.gallery-page { overflow-x: hidden; }

.g-nav {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11, 10, 8, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 60;
}
.g-nav-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}
.g-nav-links {
  display: flex;
  gap: clamp(14px, 2.2vw, 30px);
  margin-left: auto;
}
.g-nav-links a {
  color: #b3a795;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-decoration: none;
  transition: color 0.3s;
}
.g-nav-links a:hover { color: var(--gold-lt); }
.g-nav .nav-brand { margin-right: auto; }
.g-nav .nav-cta { margin-left: 4px; }

/* ---------- 返回首页引导 ---------- */
.g-back-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--gold-lt);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  background: rgba(200, 168, 106, 0.06);
  transition: 0.25s var(--ease);
  white-space: nowrap;
}
.g-back-home:hover {
  background: rgba(200, 168, 106, 0.16);
  border-color: var(--line-strong);
}
.g-back-arrow { font-size: 14px; line-height: 1; }

.g-main { padding: clamp(40px, 6vw, 76px) 0 clamp(50px, 7vw, 90px); }

.g-head { max-width: 780px; margin-bottom: clamp(34px, 5vw, 62px); }
.g-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 76px);
  letter-spacing: 0.18em;
  color: var(--paper);
  line-height: 1.15;
}
.g-desc {
  margin: 18px 0 0;
  color: #9d9384;
  font-size: 14.5px;
  line-height: 2;
  max-width: 36em;
}
.g-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3.4vw, 48px);
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
}
.g-stats div { display: flex; flex-direction: column; gap: 6px; }
.g-stats b {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--paper);
  line-height: 1;
}
.g-stats span { font-size: 10px; letter-spacing: 0.28em; color: var(--muted-2); }

/* ---------- 项目章节 ---------- */
.chapter {
  padding-top: clamp(28px, 4vw, 52px);
  margin-top: clamp(28px, 4vw, 52px);
  border-top: 1px solid var(--line-soft);
  scroll-margin-top: 92px;
}
.chapter:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.chapter-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: clamp(18px, 2.6vw, 30px);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.chapter-head.is-in { opacity: 1; transform: none; }
.chapter-no {
  display: block;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 10px;
}
.chapter-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(24px, 3.2vw, 40px);
  letter-spacing: 0.12em;
  color: var(--paper);
}
.chapter-meta {
  margin: 10px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
}
.chapter-desc {
  max-width: 30em;
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.95;
  color: #918776;
}
.chapter-side {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--gold-lt);
  white-space: nowrap;
  flex-wrap: wrap;
}
.chapter-side i { font-style: normal; opacity: 0.6; }

/* ---------- 全景 ---------- */
.pano-flag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 9px;
  border-radius: 20px;
  background: rgba(12, 10, 8, 0.78);
  border: 1px solid rgba(224, 195, 145, 0.6);
  color: var(--gold-lt);
  font-size: 10px;
  letter-spacing: 0.18em;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.pano-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(200, 168, 106, 0.5);
  border-radius: 20px;
  color: var(--gold-lt);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: none;
  background: rgba(200, 168, 106, 0.08);
  transition: 0.25s var(--ease);
}
.pano-link:hover {
  background: rgba(200, 168, 106, 0.2);
  border-color: var(--gold);
}

/* 编辑模式：全景链接输入 */
.pano-edit {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed rgba(224, 195, 145, 0.4);
  border-radius: 8px;
  background: rgba(200, 168, 106, 0.05);
}
.pano-edit span { font-size: 10px; letter-spacing: 0.2em; color: var(--gold); }
.pano-input {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15130f;
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  outline: 0;
}
.pano-input:focus { border-color: var(--line-strong); }
body.is-editing .pano-edit { display: flex; }
.ed-add-work { margin-left: 6px; }

/* ---------- VR 全景案例 ---------- */
.pano-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 24px);
}
.pano-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(170deg, rgba(26, 22, 18, 0.9), rgba(16, 14, 12, 0.7));
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.pano-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 26px 50px -34px #000;
}
.pano-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #14110e;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.pano-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.1s var(--ease), filter 0.6s;
  filter: saturate(0.96) brightness(0.94);
}
.pano-card:hover .pano-cover img { transform: scale(1.04); filter: saturate(1.02) brightness(1); }
.pano-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 6, 4, 0.72), transparent 55%);
  pointer-events: none;
}
.pano-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: 0.2em;
  color: var(--gold);
  background: radial-gradient(120% 120% at 30% 20%, rgba(200, 168, 106, 0.18), transparent 60%), #14110e;
}
.pano-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(12, 10, 8, 0.8);
  border: 1px solid rgba(224, 195, 145, 0.6);
  color: var(--gold-lt);
  font-size: 10px;
  letter-spacing: 0.18em;
  backdrop-filter: blur(6px);
}
.pano-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.pano-cover:hover .pano-play { opacity: 1; }
.pano-play span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(224, 195, 145, 0.8);
  background: rgba(12, 10, 8, 0.55);
  display: grid;
  place-items: center;
  color: var(--gold-lt);
  font-size: 16px;
  backdrop-filter: blur(4px);
}
.pano-body { padding: 14px 16px 16px; }
.pano-name {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--paper);
}
.pano-open {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-lt);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 168, 106, 0.4);
}
.pano-open.is-disabled { color: var(--muted-2); border-bottom-color: transparent; }
button.pano-open {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(200, 168, 106, 0.4);
  cursor: pointer;
  font-family: inherit;
}
button.pano-open:hover { color: #f2e4c4; }
.pano-empty {
  padding: 28px 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted-2);
  font-size: 12.5px;
  text-align: center;
}
/* 「换封面」按钮：编辑模式下作为普通按钮放回文字区，避免和 editor.css 的绝对定位冲突 */
body.is-editing .pano-card .pano-cover-tool,
body.is-editing .pano-card .pano-grab-tool {
  position: static;
  transform: none;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  margin-top: 8px;
}

/* 封面识别状态提示 */
.pano-status {
  display: none;
  margin-top: 8px;
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}
body.is-editing .pano-status { display: block; }
.pano-status.is-loading { color: #c9b183; }
.pano-status.is-ok { color: #a8c07a; }
.pano-status.is-fail { color: #d89272; }
.pano-del {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* 编辑模式重试按钮（网络慢时兜底） */
.ed-retry-chip {
  position: fixed;
  right: 22px;
  bottom: 20px;
  z-index: 320;
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(24, 20, 15, 0.96);
  color: var(--gold-lt);
  font-size: 12px;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 18px 40px -22px #000;
  font-family: inherit;
}
.ed-retry-chip:hover { background: rgba(200, 168, 106, 0.2); }

/* ---------- 风格筛选 ---------- */
.style-bar {
  position: sticky;
  top: 72px;
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 clamp(18px, 3vw, 30px);
  padding: 12px 0;
  background: rgba(11, 10, 8, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.style-bar:empty { display: none; }
.style-chip {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: #a99d8b;
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 0.25s var(--ease);
  white-space: nowrap;
}
.style-chip span { font-size: 10px; color: #7d7466; }
.style-chip:hover { border-color: var(--line-strong); color: var(--gold-lt); }
.style-chip.is-on {
  background: linear-gradient(120deg, #e6cf9d, #c8a86a);
  border-color: transparent;
  color: #12100c;
  box-shadow: 0 10px 24px -16px rgba(200, 168, 106, 0.9);
}
.style-chip.is-on span { color: #4a3d26; }
.filter-empty {
  padding: 70px 20px;
  text-align: center;
  color: #8a8072;
  font-size: 14px;
  letter-spacing: 0.06em;
  border: 1px dashed var(--line);
  border-radius: 12px;
}

/* 编辑模式下全景的「风格」输入 */
.pano-style-edit { margin-top: 8px; }

/* ---------- 结尾 ---------- */
.g-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: clamp(40px, 5vw, 64px) 0 0;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: #6f675c;
}
.g-back {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(28px, 4vw, 44px);
}

/* 章节里的瀑布流：比首页稍窄一点，读起来更像画册 */
.chapter .grid { columns: 3; column-gap: clamp(12px, 1.6vw, 22px); }
.chapter .work { margin-bottom: clamp(12px, 1.6vw, 22px); }

/* 首页作品区底部入口 */
.works-more {
  display: flex;
  justify-content: center;
  margin-top: clamp(28px, 4vw, 46px);
}

@media (max-width: 1080px) {
  .g-nav-links { display: none; }
  .g-nav .nav-cta { margin-left: auto; }
  .g-nav-inner { height: 64px; }
  .chapter .grid { columns: 3; }
  .pano-grid { grid-template-columns: repeat(3, 1fr); }
  .style-bar { top: 64px; }
}
@media (max-width: 720px) {
  .g-nav-inner { gap: 10px; }
  .g-back-home { padding: 6px 10px; font-size: 11px; }
  .g-back-text { display: inline; }
  .nav-brand-txt { display: none; }
  .g-nav .nav-cta { display: none; }
  .chapter-head { align-items: flex-start; }
  .g-title { letter-spacing: 0.12em; }

  /* 手机端：风格条吸顶、可横向滑动 */
  .style-bar {
    top: 64px;
    margin: 0 -16px clamp(16px, 4vw, 22px);
    padding: 10px 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    scrollbar-width: none;
  }
  .style-bar::-webkit-scrollbar { display: none; }
  .style-chip { flex: 0 0 auto; padding: 7px 13px; font-size: 11.5px; }

  /* 手机端：作品一行 3 张缩略图（点开看大图） */
  .chapter .grid {
    columns: unset;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }
  .chapter .work { margin: 0; break-inside: auto; }
  .chapter .work-media { aspect-ratio: 1 / 1; }
  .chapter .work-media img { width: 100%; height: 100%; object-fit: cover; }
  .chapter .work figcaption { display: none; }
  .chapter .work-frame { display: none; }
  .chapter .work-zoom { display: none; }

  /* 手机端：全景一行 3 个 */
  .pano-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pano-card { border-radius: 8px; }
  .pano-cover { aspect-ratio: 1 / 1; }
  .pano-body { padding: 6px 6px 8px; }
  .pano-name { font-size: 11px; letter-spacing: 0; line-height: 1.35; }
  .pano-open { display: none; }
  .pano-badge { top: 5px; left: 5px; padding: 2px 6px; font-size: 8px; letter-spacing: 0.05em; }
  .pano-play span { width: 30px; height: 30px; font-size: 11px; }
  .pano-cover-tool, .pano-del { display: none; }

  /* 编辑模式下自动放宽，方便改内容 */
  body.is-editing .chapter .grid { columns: 2; display: block; }
  body.is-editing .chapter .work-media { aspect-ratio: auto; }
  body.is-editing .chapter .work-media img { height: auto; }
  body.is-editing .chapter .work figcaption { display: block; }
  body.is-editing .chapter .work-frame { display: block; }
  body.is-editing .pano-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.is-editing .pano-body { padding: 8px; }
  body.is-editing .pano-name { font-size: 13px; }
  body.is-editing .pano-cover-tool, body.is-editing .pano-del { display: inline-flex; }
  body.is-editing .pano-cover-tool { display: inline-flex; }
}

.footer-guard{display:inline-block;margin-top:8px;font-size:10.5px;letter-spacing:.08em;color:#6f675c;}

