/* 请君发财工作室 · H5 作品展示
   视觉令牌：宣纸暖白 #F6F5F2 + 朱砂 #B94A35，宋体标题 / 无衬线正文 / 等宽小标
   结构：三视图上滑（home / works / more）
   间距规范：8pt 网格（紧凑处允许 4px 半步），字号规整字阶 10/12/14/16/20/24/32/40 */
:root {
  --paper: #F6F5F2;
  --paper-card: #FDFCFA;
  --paper-featured: #FBF7F4;
  --paper-soft: #EFEDE8;
  --cinnabar: #B94A35;
  --cinnabar-deep: #8A3B2A;
  --gold: #F0D8A8;
  --ink: #26221E;
  --ink-2: #6E665C;
  --ink-3: #9C9488;
  --line: #E4E0D6;
  --line-soft: #DCD8CE;
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --page-max: 640px;
  --ease: cubic-bezier(.22,.61,.36,1);
  /* 8pt 间距令牌 */
  --s05: 4px;   /* 半步 */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overscroll-behavior-x: none; }

body {
  margin: 0;
  overscroll-behavior-x: none;
  background: #E9E6DF;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ============ 三视图栈 · 上滑切换 ============ */
.view-stack { position: relative; }

.view {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  /* 纸色与纹理放在页面层：内容位移时背景保持不动，两页交界不会出现色带 */
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 92% 0%, rgba(185, 74, 53, 0.05), transparent 30%),
    repeating-linear-gradient(0deg, rgba(38, 34, 30, 0.012) 0, rgba(38, 34, 30, 0.012) 1px, transparent 1px, transparent 8px);
  transform: translateY(100%);
  opacity: 1;
  transition: transform .62s var(--ease), opacity .5s var(--ease), filter .5s var(--ease);
  will-change: transform;
}
.view-works { z-index: 2; }
.view-more { z-index: 3; }

body[data-view="home"] .view-home { transform: translateY(0); }

body[data-view="works"] .view-home { transform: translateY(-5%) scale(.97); opacity: .55; filter: brightness(.94); }
body[data-view="works"] .view-works { transform: translateY(0); }

body[data-view="more"] .view-home { transform: translateY(-9%) scale(.94); opacity: .32; filter: brightness(.9); }
body[data-view="more"] .view-works { transform: translateY(-5%) scale(.97); opacity: .55; filter: brightness(.94); }
body[data-view="more"] .view-more { transform: translateY(0); }

/* ============ 作品页上滑：把「更多作品」整页拉出来 ============ */
/* 手指拖动时两页联动位移（is-pulling 里关掉过渡，跟手无延迟） */
body.is-pulling .view-works {
  transform: translateY(calc(-1 * var(--pull, 0px)));
  transition: none;
}
body.is-pulling .view-more {
  transform: translateY(calc(100% - var(--pull, 0px)));
  transition: none;
  opacity: 1; filter: none;
}
/* 松手回弹 / 补足到整屏时的过渡 */
body.is-settling .view-works,
body.is-settling .view-more { transition: transform .34s var(--ease), opacity .3s var(--ease); }

/* 视图内的内容容器（顶部为固定顶栏让位） */
.page-shell {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: calc(var(--topbar-h) + var(--s2)) var(--s3) 136px;
  min-height: 100%;
  background: none;
}

body.has-player .page-shell { padding-bottom: 200px; }
body.has-player[data-view="more"] .page-shell { padding-bottom: 252px; }

/* ============ 固定顶栏（作品页 / 更多作品页）============ */
.top-bar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  z-index: 30; width: 100%; max-width: var(--page-max);
  height: var(--topbar-h);
  display: none; align-items: center; justify-content: space-between;
  padding: 0 var(--s2);
  background: linear-gradient(to bottom, rgba(246,245,242,.96) 56%, rgba(246,245,242,0));
  pointer-events: none;
}
body[data-view="works"] .top-bar,
body[data-view="more"] .top-bar { display: flex; }
.top-bar > * { pointer-events: auto; }
.top-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(253, 252, 250, .92); color: var(--ink-2);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.top-btn svg { width: 16px; height: 16px; }
.top-btn:active { background: var(--paper-soft); }
.top-contact { background: var(--cinnabar); border-color: var(--cinnabar); color: var(--paper); }
.top-contact:active { background: var(--cinnabar-deep); }
.top-title {
  font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  color: var(--ink-3); pointer-events: none;
  transition: opacity .18s var(--ease), letter-spacing .2s var(--ease);
}
/* 上滑过半时旧标题先淡出，切页后新标题淡入，避免「代表作品」四个字压着更多页内容 */
body.is-pulling .top-title {
  opacity: calc(1 - var(--pull-p, 0) * 1.8);
  letter-spacing: calc(2px + var(--pull-p, 0) * 2px);
}

/* ============ 视图一：首页（朱砂红底 · 杂志式排布）============ */
.view-home { background: var(--cinnabar); }
.home-dots {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 84% 6%, rgba(240, 216, 168, 0.14), transparent 38%),
    repeating-linear-gradient(0deg, rgba(246, 245, 242, 0.05) 0, rgba(246, 245, 242, 0.05) 1px, transparent 1px, transparent 16px),
    repeating-linear-gradient(90deg, rgba(246, 245, 242, 0.042) 0, rgba(246, 245, 242, 0.042) 1px, transparent 1px, transparent 16px);
}
.home-inner {
  position: relative;
  max-width: var(--page-max);
  min-height: 100%;
  margin: 0 auto;
  padding: var(--s6) var(--s4) var(--s5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--paper);
}

/* 顶部：工作室名 + 副标为一组，印章与这一组整体垂直居中 */
.home-head { display: block; }
.home-brandline {
  display: flex; align-items: center; justify-content: flex-start;
  gap: var(--s3);
}
.home-titleblock { min-width: 0; }

/* 大标题：与印章同排，字号收敛，字距保留刊头感 */
.home-studio {
  margin: 0; min-width: 0; font-family: var(--serif); font-size: 26px;
  font-weight: 700; line-height: 1.2; letter-spacing: 1px; color: var(--paper);
  text-shadow: 0 2px 16px rgba(90, 30, 20, 0.28);
  white-space: nowrap;
}
/* 副标题：金色、拉开字距，与正文明确分层 */
.home-slogan {
  margin: var(--s2) 0 0; font-family: var(--serif); font-size: 16px;
  font-weight: 700; letter-spacing: 3px; color: var(--gold);
  opacity: .96;
}
.home-slogan-mark { color: var(--gold); }

/* 品牌 logo（首页刊头右侧）：圆形头像框 + 宣纸白圈 + 外圈虚线呼吸环 */
.home-avatar {
  position: relative; flex-shrink: 0;
  width: 92px; height: 92px;
}
/* 圆盘本体负责裁切：原图按 contain 完整放入圆内，不切笔画 */
.home-avatar-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid rgba(246, 245, 242, 0.92);
  background: var(--paper);
  box-shadow: 0 0 0 6px rgba(246, 245, 242, 0.12), 0 2px 10px rgba(90, 30, 20, 0.18);
  overflow: hidden;
}
.home-avatar-face img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  transform: scale(1.26);
}
/* 原有圆形边框动效：外圈虚线环缓慢呼吸 */
.home-avatar::after {
  content: ''; position: absolute; inset: -8px; border-radius: 50%;
  border: 1px dashed rgba(246, 245, 242, 0.6);
  pointer-events: none;
  animation: sealBreath 3.4s ease-in-out infinite;
}
@keyframes sealBreath {
  0%, 100% { transform: scale(0.94); opacity: 0.3; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

/* 工作室简介：正文层级低于标题，字号更小、颜色更淡 */
.home-intro { margin-top: var(--s4); }
.home-intro-text {
  margin: 0; font-size: 12px; line-height: 2;
  color: rgba(246, 245, 242, 0.72);
  text-align: justify; letter-spacing: .3px;
}
.home-tags { display: flex; flex-wrap: wrap; gap: var(--s1); margin-top: var(--s3); }
.home-tag {
  padding: var(--s05) 12px; border: 1px solid rgba(246, 245, 242, 0.3); border-radius: 2px;
  font-size: 10px; letter-spacing: .8px; color: rgba(246, 245, 242, 0.78);
  background: rgba(246, 245, 242, 0.04);
}

/* 下方方形「作品试听」按钮（纯文字） */
.home-enter-wrap { margin-top: var(--s5); }
.home-enter {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: var(--s2) var(--s3);
  border: 1px solid var(--paper); border-radius: 2px;
  background: var(--paper); color: var(--cinnabar-deep);
  font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: 4px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 16px rgba(90, 30, 20, 0.22);
  transition: background .18s, transform .15s;
}
.home-enter:active { transform: scale(.99); background: rgba(246, 245, 242, 0.88); }
.home-foot {
  margin-top: var(--s3);
  padding-top: 12px;
  border-top: 1px solid rgba(246, 245, 242, 0.18);
  font-family: var(--mono); font-size: 10px; letter-spacing: .5px;
  color: rgba(246, 245, 242, 0.62);
}

/* 入场依次动效 */
.anim-up { opacity: 0; transform: translateY(24px); animation: riseIn .72s var(--ease) var(--d, 0s) both; }
.anim-pop { opacity: 0; transform: scale(.78) rotate(-10deg); animation: popIn .8s cubic-bezier(.34,1.56,.64,1) var(--d, 0s) both; }
@keyframes riseIn { to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { to { opacity: 1; transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) {
  .anim-up, .anim-pop { animation: none; opacity: 1; transform: none; }
  .home-avatar::after { animation: none; opacity: .55; transform: none; }
  .more-hint-arrow { animation: none; }
  .view { transition-duration: .01s; }
}

@media (max-width: 360px) {
  .home-inner { padding: var(--s5) var(--s3) var(--s4); }
  .home-brandline { gap: var(--s1); }
  .home-studio { font-size: 22px; letter-spacing: 1px; }
  .home-slogan { font-size: 14px; letter-spacing: 2px; }
  .home-avatar { width: 64px; height: 64px; }
  .home-enter { font-size: 16px; padding: 12px var(--s2); }
}

/* ============ 关注印章（弹窗内使用）============ */
.social-links { display: flex; flex-wrap: wrap; }
.social-seal {
  display: inline-block; padding: 1px; margin-right: var(--s05);
  border: 1px solid var(--line-soft); border-radius: 2px;
  background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent;
  text-decoration: none; flex-shrink: 0;
}
.social-seal:active { background: rgba(185, 74, 53, 0.07); }
.social-seal-inner {
  display: block;
  padding: var(--s05) var(--s1); border: 1px solid rgba(185, 74, 53, .45); border-radius: 1px;
  background: var(--paper-card);
  font-family: var(--serif); font-size: 10px; font-weight: 700; line-height: 1.2;
  color: var(--cinnabar); white-space: nowrap;
}

.works-section { margin-bottom: var(--s2); }

/* ============ 筛选栏（更多作品页：悬浮固定于页底）============ */
/* ============ 页底固定筛选栏（更多作品页：左标签可滑 + 右工具固定）============ */
.filter-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  z-index: 30; width: 100%; max-width: var(--page-max);
  display: none; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s2) calc(var(--s1) + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 16px rgba(38, 34, 30, .07);
}
body[data-view="more"] .filter-bar { display: flex; }

/* 标签区：占满剩余宽度，可横向滑动；右侧渐隐提示还有内容 */
.filter-track {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
}
.filter-track::-webkit-scrollbar { display: none; }
.filter-track.is-scroll {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 24px), transparent 100%);
}
/* 纯文字标签：无胶囊底；选中仅变朱砂色 + 加粗放大 */
.filter-chip {
  display: flex; align-items: center; flex-shrink: 0;
  height: 32px; padding: 0 5px;
  border: 0; border-radius: 0; background: transparent;
  color: var(--ink-2); font-size: 14px; font-weight: 500; line-height: 1;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .15s;
}
.filter-chip-active { background: transparent; color: var(--cinnabar); font-size: 15px; font-weight: 700; }
.filter-tools { display: flex; gap: var(--s1); flex-shrink: 0; }

/* 排序按钮：文字 + ▾ 箭头，明确可点 */
.tool-sort { gap: 2px; }
.tool-caret { width: 12px; height: 12px; opacity: .55; }
.tool-btn:active .tool-caret { opacity: 1; }

.tool-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--s05);
  height: 32px; padding: 0 12px; flex-shrink: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper-card); color: var(--ink-2);
  font-size: 12px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s;
}
.tool-btn svg { width: 14px; height: 14px; }
.tool-btn:active { background: var(--paper-soft); }

/* ============ 作品容器（代表作视图） ============ */
.work-list { display: flex; flex-direction: column; }

.play-badge {
  position: absolute; left: var(--s1); bottom: var(--s1); width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(246, 245, 242, 0.95); color: var(--cinnabar);
  border: 0; padding: 0; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 4px rgba(38, 34, 30, 0.18);
}
.play-badge:active { transform: scale(.94); }
.play-badge-active { background: var(--cinnabar); color: var(--paper); }
/* 无站内音频：角标仅作跳转入口，弱化为描边样式 */
.play-badge-ext { background: rgba(246, 245, 242, 0.92); color: var(--cinnabar); }
.play-badge-off { background: rgba(246, 245, 242, 0.6); color: var(--ink-3); cursor: default; box-shadow: none; }
.icon-play { width: 0; height: 0; margin-left: 3px; border-top: 5.5px solid transparent; border-bottom: 5.5px solid transparent; border-left: 8.5px solid currentColor; }
.icon-pause { display: flex; align-items: center; justify-content: center; }
.pause-bar { width: 2.5px; height: 12px; margin: 0 1.5px; border-radius: 1px; background: currentColor; }
.work-tag { padding: 2px var(--s1); border-radius: var(--s05); background: rgba(185, 74, 53, 0.09); color: var(--cinnabar); font-size: 10px; }

.state-card { margin-top: var(--s1); padding: var(--s4) var(--s2); border-radius: var(--s1); background: var(--paper-card); border: 1px solid var(--line); text-align: center; }
.state-icon { font-family: var(--serif); font-size: 32px; color: var(--cinnabar); }
.state-title { display: block; font-family: var(--serif); font-size: 16px; font-weight: 700; margin-top: var(--s1); }
.state-description { display: block; font-size: 12px; color: var(--ink-2); margin-top: var(--s1); line-height: 1.6; }

/* ============ 作品页底部：下一屏卡片的隐约预览 ============ */
#viewWorks .page-shell { display: flex; flex-direction: column; padding-bottom: 24px; }
body.has-player #viewWorks .page-shell { padding-bottom: 96px; }
#viewWorks .works-section { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
#viewWorks .work-list { flex: 0 0 auto; }

.more-peek {
  position: relative; flex: 1 0 auto; min-height: 0; max-height: 320px;
  margin-top: 0;
  overflow: hidden; pointer-events: none;
  opacity: .9;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 84%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 84%, rgba(0,0,0,0) 100%);
}
/* 下一屏预览：一排 4 格小卡，只做「隐约预告」，不可点 */
.more-peek-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s1); align-content: start;
}
.more-peek-card {
  overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--s05);
  background: var(--paper-card);
}
.more-peek-cover {
  width: 100%; aspect-ratio: 1 / 1;
  background: #E6E2D8 center / cover no-repeat;
  filter: saturate(.62) contrast(.94) brightness(1.03) blur(.3px);
}
.more-peek-cover-ph {
  width: 100%; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #EAE6DC, #DFDACE);
  font-family: var(--serif); font-size: 22px; font-weight: 700; color: rgba(185, 74, 53, .26);
}
.more-peek-title {
  margin: 0; padding: 6px 6px 7px;
  font-family: var(--serif); font-size: 10px; font-weight: 700; line-height: 1.35;
  color: var(--ink-3); letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 拖动中：预览与提示随进度淡出，整页拉出时不会「被切成两半」 */
body.is-pulling .more-peek { opacity: calc(.55 - var(--pull-p, 0) * .55); }
body.is-pulling .more-hint { opacity: calc(1 - var(--pull-p, 0) * 1.3); }
/* 拉出来时把下一页顶部留白先吃掉，第一眼看到的就是卡片 */
#viewMore .page-shell { transition: transform .34s var(--ease); }
body.is-pulling .view-more .page-shell { transform: translateY(-56px); transition: none; }
/* 页面已经连续滚动，不再画分隔线（那条线会被误读成页面断层）*/

/* ============ 「上滑查看更多作品」提示（作品页）============ */
.more-hint {
  display: flex; flex-direction: column; align-items: center; gap: var(--s1);
  margin: var(--s3) auto var(--s2); padding: var(--s1) var(--s2);
  border: 0; background: transparent;
  color: var(--ink-3); font-family: var(--mono); font-size: 10px; letter-spacing: 2px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.more-hint-arrow {
  width: 16px; height: 16px; color: var(--cinnabar);
  animation: hintFloat 1.8s ease-in-out infinite;
}
@keyframes hintFloat {
  0%, 100% { transform: translateY(0); opacity: .6; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* ============ 双列瀑布卡片 ============ */
.masonry-grid { display: flex; gap: var(--s1); align-items: flex-start; }
.masonry-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.masonry-card {
  display: block; margin-bottom: var(--s1); overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--s1);
  background: var(--paper-card); color: inherit; text-decoration: none;
  cursor: default; -webkit-tap-highlight-color: transparent; transition: transform .15s, box-shadow .15s;
}
.masonry-cover { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; background: #E6E2D8; }
.masonry-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.masonry-cover-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: linear-gradient(145deg, #EAE6DC, #DDD8CC); }
.masonry-cover-ph span { font-family: var(--serif); font-size: 40px; font-weight: 700; color: rgba(185, 74, 53, .42); }
.masonry-body { padding: var(--s1) var(--s1) 12px; }
.masonry-title { margin: 0; font-family: var(--serif); font-size: 14px; font-weight: 700; letter-spacing: .5px; color: var(--ink); line-height: 1.4; word-break: break-all; }
.masonry-desc { margin: var(--s1) 0; font-size: 10px; line-height: 1.7; color: var(--ink-3); }
/* 方案 A：元信息只保留一行——风格角标在左，平台入口在右，日期不在小卡出现 */
.masonry-meta {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: var(--s1); min-height: 20px;
}
.masonry-meta .work-tag { font-size: 10px; padding: 2px var(--s1); flex: 0 0 auto; }
.masonry-action {
  margin: 0 0 0 auto; padding: 2px 0; font-size: 11px; font-weight: 500; line-height: 1.5;
  color: var(--cinnabar); text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid rgba(185, 74, 53, .3);
  flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis;
}
.masonry-action:active { color: var(--cinnabar-deep); border-bottom-color: var(--cinnabar-deep); }
.masonry-action.is-muted, .carousel-action.is-muted { color: var(--ink-3); border-bottom-color: transparent; cursor: default; }

/* ============ 瀑布流空白补齐：联系我们引导卡 ============ */
.masonry-cta {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: var(--s1);
  margin-bottom: var(--s1); padding: var(--s3) var(--s2);
  border-radius: var(--s1);
  background:
    radial-gradient(circle at 88% 6%, rgba(240, 216, 168, .16), transparent 58%),
    linear-gradient(160deg, #2C2723 0%, #201C18 100%);
  color: var(--paper);
}
.masonry-cta::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(246, 245, 242, .045) 0, rgba(246, 245, 242, .045) 1px, transparent 1px, transparent 12px);
}
.masonry-cta-kicker {
  font-family: var(--mono); font-size: 9px; letter-spacing: 2px;
  color: rgba(246, 245, 242, .48);
}
.masonry-cta-title {
  margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 700;
  line-height: 1.55; letter-spacing: 1px;
}
.masonry-cta-text {
  margin: 0; font-size: 10px; line-height: 1.75; color: rgba(246, 245, 242, .6);
}
.masonry-cta-btn {
  align-self: flex-start; margin-top: var(--s05);
  padding: 7px var(--s2); border: 0; border-radius: 999px;
  background: var(--cinnabar); color: var(--paper);
  font-family: var(--sans); font-size: 11px; letter-spacing: 1px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s var(--ease), background .18s var(--ease);
}
.masonry-cta-btn:active { transform: scale(.96); background: var(--cinnabar-deep); }

/* ============ 代表作轮播 · 中间放大（侧卡只露封面，全部不透明）============ */
.carousel-wrap {
  position: relative; margin: 0 calc(-1 * var(--s3)) var(--s1); padding: var(--s1) 0 var(--s2); overflow: hidden;
}
/* 卡片背后的柔和光晕，保持沉浸感 */
.carousel-wrap::before {
  content: ''; position: absolute; left: 50%; top: 44%;
  width: 320px; height: 320px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(185, 74, 53, .10) 0%, rgba(185, 74, 53, 0) 68%);
  pointer-events: none;
}
.carousel-stage { position: relative; height: 500px; touch-action: pan-y; }
/* 卡片居中定位：靠 transform 平移 + 缩放走位，切卡只有合成，不重排外层 */
.carousel-card {
  position: absolute; left: 50%; top: 50%; width: 300px;
  background: transparent; border: 0.5px solid var(--line); border-radius: 16px;
  overflow: hidden; transform-origin: center center; will-change: transform;
  box-shadow: 0 2px 10px rgba(38, 34, 30, .07);
  transition: transform .48s cubic-bezier(.24, .62, .3, 1), box-shadow .48s var(--ease);
}
.carousel-stage.is-init .carousel-card,
.carousel-stage.is-init .carousel-info { transition: none !important; }
.carousel-cover { position: relative; width: 100%; height: 300px; overflow: hidden; background: var(--paper-soft); }
.carousel-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--paper-featured); }
.carousel-cover-placeholder span { font-family: var(--serif); font-size: 96px; color: var(--cinnabar); opacity: .35; }
/* 封面左上角「代表作」角标 */
.cover-flag {
  position: absolute; top: 12px; left: 12px;
  padding: var(--s05) var(--s1); border-radius: var(--s05);
  background: rgba(185, 74, 53, .94); color: var(--paper);
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px; line-height: 1.6;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.carousel-active .cover-flag { opacity: 1; transform: none; }
/* 信息区：非激活卡高度收到 0 → 两侧只剩一张封面，不会露出白卡底 */
.carousel-info {
  max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
  background: var(--paper-card);
  /* 离开中间时：白底 0.1s 立即隐去，高度慢慢收，过程中露出的是纸色而不是白块 */
  transition: max-height .46s cubic-bezier(.24, .62, .3, 1), opacity .1s linear;
}
.carousel-info-inner { padding: var(--s2); height: 150px; overflow: hidden; }
/* 进到中间后等卡片放大一小段，再从底部展开信息 */
.carousel-active .carousel-info {
  max-height: 150px; opacity: 1; pointer-events: auto;
  transition: max-height .34s cubic-bezier(.24, .62, .3, 1) .12s, opacity .16s linear .12s;
}
.carousel-title { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.4; letter-spacing: .5px; }
.carousel-desc {
  margin: var(--s1) 0 12px; font-size: 12px; line-height: 1.7; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.carousel-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s1); }
.carousel-tag { padding: 2px var(--s1); border: 0.5px solid var(--line-soft); border-radius: var(--s05); font-size: 10px; color: var(--ink-2); }
.carousel-date { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
/* 右下角平台跳转：纯文字 + 细下划线，不抢主标题 */
.carousel-action {
  margin-left: auto; padding: 2px 0; font-size: 12px; font-weight: 500; line-height: 1.5;
  color: var(--cinnabar); text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid rgba(185, 74, 53, .3); cursor: pointer;
  transition: color .2s, border-color .2s;
}
.carousel-action:active { color: var(--cinnabar-deep); border-bottom-color: var(--cinnabar-deep); }
/* 三档位置：中间放大 1 倍并带落影，两侧缩到 .845 且完全透明阴影；不使用任何 opacity / filter */
.carousel-pos-0 {
  transform: translate(-50%, -50%) scale(1); z-index: 5;
  box-shadow: 0 6px 22px rgba(38, 34, 30, .15), 0 1px 4px rgba(38, 34, 30, .08);
}
.carousel-pos--1 { transform: translate(calc(-50% - 166px), -50%) scale(.845); z-index: 3; cursor: pointer; }
.carousel-pos-1 { transform: translate(calc(-50% + 166px), -50%) scale(.845); z-index: 3; cursor: pointer; }
.carousel-pos--2 { transform: translate(calc(-50% - 300px), -50%) scale(.7); z-index: 1; pointer-events: none; visibility: hidden; }
.carousel-pos-2 { transform: translate(calc(-50% + 300px), -50%) scale(.7); z-index: 1; pointer-events: none; visibility: hidden; }
/* 只有中间激活卡显示播放角标，两侧卡点击仅切歌 */
.carousel-card:not(.carousel-active) .play-badge { opacity: 0; pointer-events: none; }
.carousel-active .play-badge { transition: opacity .24s, transform .15s; }
/* 底部控制条：左右箭头 + 圆点 */
.carousel-nav { display: flex; align-items: center; justify-content: center; gap: var(--s2); margin-top: var(--s1); }
.carousel-arrow {
  width: 28px; height: 28px; padding: 0; display: grid; place-items: center;
  border: 0.5px solid var(--line); border-radius: 50%;
  background: rgba(255, 255, 255, .72); color: var(--ink-2); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s var(--ease), color .2s, border-color .2s, background .2s;
}
.carousel-arrow svg { width: 12px; height: 12px; }
.carousel-arrow:active { transform: scale(.9); color: var(--cinnabar); border-color: rgba(185, 74, 53, .45); background: var(--paper-card); }
.carousel-dots { display: flex; align-items: center; gap: var(--s1); }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-soft); cursor: pointer; transition: background .2s, transform .2s; }
.carousel-dot-active { background: var(--cinnabar); transform: scale(1.35); }

@media (max-width: 380px) {
  .carousel-stage { height: 464px; }
  .carousel-card { width: 264px; }
  .carousel-cover { height: 264px; }
  .carousel-pos--1 { transform: translate(calc(-50% - 150px), -50%) scale(.845); }
  .carousel-pos-1 { transform: translate(calc(-50% + 150px), -50%) scale(.845); }
  .carousel-pos--2 { transform: translate(calc(-50% - 268px), -50%) scale(.7); }
  .carousel-pos-2 { transform: translate(calc(-50% + 268px), -50%) scale(.7); }
  .carousel-title { font-size: 18px; }
  .carousel-wrap::before { width: 280px; height: 280px; }
}

@media (max-width: 360px) {
  .carousel-stage { height: 440px; }
  .carousel-card { width: 248px; }
  .carousel-cover { height: 248px; }
  .carousel-pos--1 { transform: translate(calc(-50% - 140px), -50%) scale(.845); }
  .carousel-pos-1 { transform: translate(calc(-50% + 140px), -50%) scale(.845); }
  .carousel-pos--2 { transform: translate(calc(-50% - 250px), -50%) scale(.7); }
  .carousel-pos-2 { transform: translate(calc(-50% + 250px), -50%) scale(.7); }
  .carousel-title { font-size: 16px; }
  .masonry-title { font-size: 14px; }
  .masonry-meta .work-tag { padding: 2px var(--s05); }
  .masonry-action { font-size: 10px; }
  /* 窄屏一排四格：缩小字号，避免标题被截成 3 个字 */
  .more-peek-title { font-size: 9px; padding: 5px 4px 6px; }
  .more-peek-grid { gap: 6px; }
}

/* ============ 联系我们：居中弹窗 ============ */
body.modal-open .view { overflow: hidden; }

.contact-modal {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s3);
}
.contact-modal[hidden] { display: none; }
.contact-mask {
  position: absolute; inset: 0;
  background: rgba(38, 34, 30, .45);
  backdrop-filter: blur(2px);
  animation: maskIn .22s ease both;
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.contact-card {
  position: relative;
  width: 100%; max-width: 336px;
  padding: var(--s3) var(--s2) var(--s2);
  border: 1px solid var(--line); border-radius: var(--s1);
  background: var(--paper-card);
  box-shadow: 0 16px 48px rgba(38, 34, 30, .26);
  animation: cardIn .3s var(--ease) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.contact-card-head { display: flex; align-items: center; justify-content: space-between; }
.dock-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 1.6px; color: var(--cinnabar); }
.dock-close {
  padding: var(--s05) 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper-card); color: var(--ink-2); font-size: 10px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.contact-card-title {
  margin: 12px 0 0; font-family: var(--serif); font-size: 20px;
  font-weight: 700; letter-spacing: 2px; color: var(--ink);
}
.dock-note { margin: var(--s1) 0 12px; font-size: 10px; color: var(--ink-3); letter-spacing: .3px; }
.dock-list { display: flex; flex-direction: column; }
.dock-row { display: flex; align-items: center; padding: var(--s1) 0; border-bottom: 1px solid var(--line-soft); }
.dock-label { width: 48px; flex-shrink: 0; font-size: 12px; color: var(--ink-3); }
.dock-value { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.dock-copy {
  flex-shrink: 0; padding: var(--s05) 12px; border: 1px solid var(--cinnabar); border-radius: 999px;
  background: transparent; font-family: var(--sans); font-size: 10px; color: var(--cinnabar);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.dock-social { margin-top: var(--s2); }
.dock-social:empty { display: none; }
.dock-social-label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; color: var(--ink-3); margin-bottom: var(--s1); }
.dock-social-links { display: flex; flex-wrap: wrap; }
.dock-social .social-seal { display: inline-block; padding: 1px; margin: 0 var(--s1) var(--s1) 0; border: 1px solid var(--line-soft); border-radius: 2px; background: transparent; cursor: pointer; text-decoration: none; }
.dock-social .social-seal-inner {
  display: block;
  padding: var(--s05) var(--s1); border: 1px solid rgba(185, 74, 53, .45); border-radius: 1px;
  background: var(--paper-card); font-family: var(--serif); font-size: 10px;
  font-weight: 700; line-height: 1.2; color: var(--cinnabar); white-space: nowrap;
}

/* ============ 底部常驻播放卡片 ============ */
.mini-player {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--s2) + env(safe-area-inset-bottom)); z-index: 40;
  width: calc(100% - 32px); max-width: calc(var(--page-max) - 32px);
  padding: var(--s1) var(--s1) var(--s05); border-radius: var(--s1);
  background: var(--ink); border: 1px solid rgba(185, 74, 53, 0.4);
  box-shadow: 0 4px 16px rgba(38, 34, 30, 0.28);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
/* 关闭时先缩一下再收走，不硬切 */
body.is-closing-player .mini-player { opacity: 0; transform: translate(-50%, 10px); }
.mini-player[hidden] { display: none; }
/* 播放卡片只在代表作 / 更多作品页出现 */
body[data-view="home"] .mini-player { display: none; }
/* 更多作品页：筛选栏固定在页底，播放卡片移到筛选栏正上方 */
body[data-view="more"] .mini-player { bottom: calc(48px + var(--s2) + env(safe-area-inset-bottom)); }
.mini-main { display: flex; align-items: center; }
.mini-cover { width: 32px; height: 32px; border-radius: var(--s05); overflow: hidden; background: #E6E2D8; flex-shrink: 0; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-cover .mini-cover-text { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--cinnabar); font-size: 16px; }
.mini-info { display: flex; flex: 1; min-width: 0; flex-direction: column; padding-left: var(--s1); }
.mini-title { font-family: var(--serif); font-size: 12px; font-weight: 700; color: var(--paper); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-time { margin-top: 2px; font-family: var(--mono); font-size: 9px; color: #B9B2A6; white-space: nowrap; }
.mini-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; margin-left: var(--s1); }
.mini-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent;
  color: rgba(246, 245, 242, 0.66); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s var(--ease), color .18s var(--ease), transform .12s var(--ease);
}
.mini-btn svg { width: 16px; height: 16px; display: block; }
.mini-btn:active { background: rgba(246, 245, 242, 0.14); transform: scale(.9); }
.mini-btn:disabled { opacity: .28; pointer-events: none; }
.mini-btn-main { width: 32px; height: 32px; background: var(--cinnabar); color: var(--paper); }
.mini-btn-main:active { background: var(--cinnabar-deep); }
.mini-btn-main .icon-play { border-left-width: 7.5px; border-top-width: 5px; border-bottom-width: 5px; }
.mini-btn-main .pause-bar { width: 2px; height: 10px; margin: 0 1.2px; }
.mini-btn-close { width: 24px; height: 24px; color: rgba(246, 245, 242, 0.46); }
.mini-btn-close svg { width: 12px; height: 12px; }
/* 切歌时标题轻微淡入，明确「已经换了一首」 */
.mini-player.is-switching .mini-title { animation: miniTitleIn .26s var(--ease) both; }
@keyframes miniTitleIn {
  from { opacity: 0; transform: translateX(6px); }
  to { opacity: 1; transform: none; }
}
.mini-progress { padding: 0 var(--s05); }
.mini-slider { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 12px; margin: 2px 0 0; background: transparent; cursor: pointer; }
.mini-slider::-webkit-slider-runnable-track { height: 2px; border-radius: 1px; background: linear-gradient(to right, var(--cinnabar) var(--fill, 0%), rgba(246, 245, 242, 0.22) var(--fill, 0%)); }
.mini-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 10px; height: 10px; margin-top: -4px; border-radius: 50%; background: var(--paper); box-shadow: 0 0 0 1px rgba(185, 74, 53, 0.5); }
.mini-slider::-moz-range-track { height: 2px; border-radius: 1px; background: rgba(246, 245, 242, 0.22); }
.mini-slider::-moz-range-progress { height: 2px; border-radius: 1px; background: var(--cinnabar); }
.mini-slider::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--paper); }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translate(-50%, 8px); z-index: 100;
  max-width: 80vw; padding: var(--s1) var(--s2); border-radius: var(--s1);
  background: rgba(38, 34, 30, 0.92); color: var(--paper);
  font-size: 12px; line-height: 1.4; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast-show { opacity: 1; transform: translate(-50%, 0); }

/* ============ PWA：添加到桌面 / 新版本提示 ============ */
.home-install {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 14px auto 0; padding: 0;
  border: 0; background: transparent;
  color: rgba(246, 245, 242, 0.7);
  font-family: var(--sans); font-size: 12px; letter-spacing: 1px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: color .2s, transform .15s;
}
.home-install svg { width: 14px; height: 14px; opacity: .8; }
.home-install:active { color: var(--paper); transform: scale(.98); }
.home-install[hidden] { display: none; }

.install-sheet {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
}
.install-sheet[hidden] { display: none; }
.install-mask {
  position: absolute; inset: 0;
  background: rgba(38, 34, 30, .42);
  backdrop-filter: blur(2px);
  animation: maskIn .22s ease both;
}
.install-card {
  position: relative; width: 100%; max-width: 420px;
  padding: var(--s3) var(--s2) calc(var(--s2) + env(safe-area-inset-bottom));
  border-top: 0.5px solid var(--line);
  border-radius: 16px 16px 0 0;
  background: var(--paper-card);
  box-shadow: 0 -10px 44px rgba(38, 34, 30, .24);
  animation: sheetUp .28s var(--ease) both;
}
@keyframes sheetUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
.install-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 1.6px; color: var(--cinnabar); }
.install-title {
  margin: var(--s1) 0 0; font-family: var(--serif); font-size: 20px;
  font-weight: 700; letter-spacing: 2px; color: var(--ink);
}
.install-note { margin: var(--s1) 0 14px; font-size: 12px; line-height: 1.75; color: var(--ink-2); }
.install-steps { margin: 0; padding-left: 18px; font-size: 12px; line-height: 2; color: var(--ink-2); }
.install-steps b { color: var(--ink); font-weight: 600; }
.install-close {
  width: 100%; margin-top: var(--s3); padding: 12px;
  border: 0; border-radius: 2px; background: var(--cinnabar); color: var(--paper);
  font-family: var(--serif); font-size: 14px; font-weight: 700; letter-spacing: 3px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.install-close:active { background: var(--cinnabar-deep); }

/* 有新版本时的胶囊提示：点一下才刷新，避免正在看的内容被打断 */
.sw-update {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px); z-index: 95;
  display: flex; align-items: center; gap: var(--s1);
  padding: 9px 14px; border-radius: 999px;
  background: rgba(38, 34, 30, .94); color: var(--paper);
  font-size: 12px; line-height: 1; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(38, 34, 30, .3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.sw-update.is-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sw-update button {
  padding: 0; border: 0; background: transparent;
  color: var(--gold); font-family: var(--sans); font-size: 12px;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
body.has-player .sw-update { bottom: calc(154px + env(safe-area-inset-bottom)); }

@media (min-width: 641px) {
  .install-sheet { align-items: center; }
  .install-card {
    max-width: 376px; padding-bottom: var(--s2);
    border: 1px solid var(--line); border-radius: var(--s1);
    box-shadow: 0 16px 48px rgba(38, 34, 30, .26);
    animation: cardIn .3s var(--ease) both;
  }
}

@media (min-width: 641px) {
  .view { box-shadow: 0 0 40px rgba(38, 34, 30, 0.08); }
  .contact-card { max-width: 376px; }
}
