/* ============================================================
   禅意移动端列表 · 样式
   设计基调：宣纸底色、宋体、大量留白、极细线条、朱砂点缀
   ============================================================ */

:root {
  /* 纸 · 墨 */
  --paper:        #F5F2EB;   /* 宣纸底 */
  --paper-card:   #FCFAF5;   /* 卡片比底略亮 */
  --ink:          #2E2B26;   /* 浓墨：主文字 */
  --ink-2:        #6B655C;   /* 中墨：正文次要 */
  --ink-3:        #A29B8F;   /* 淡墨：辅助信息 */
  --line:         #E4DED2;   /* 分隔线 */
  --line-soft:    #EEEAE1;

  /* 点缀色 */
  --cinnabar:     #A2402E;   /* 朱砂：印章、选中态 */
  --cinnabar-10:  rgba(162, 64, 46, .10);
  --bamboo:       #6A8272;   /* 竹青：进行中 */
  --gold:         #B08A4A;   /* 赭金：预告 */

  --radius:       4px;
  --radius-lg:    10px;
  --gap:          18px;
  --safe-bottom:  env(safe-area-inset-bottom, 0px);

  --font-serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC",
                "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { background: #EDE9E1; }

body {
  min-height: 100vh;
  font-family: var(--font-serif);
  color: var(--ink);
  background-color: var(--paper);
  /* 宣纸纤维质感 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

/* ---------- 布局骨架 ---------- */
.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--paper);
  background-image: inherit;
  position: relative;
  box-shadow: 0 0 40px rgba(46, 43, 38, .06);
}

/* ---------- 顶部 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: rgba(245, 242, 235, .88);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-bar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header-title {
  font-size: 17px;
  letter-spacing: .28em;
  text-indent: .28em;
  font-weight: 500;
}

/* 左侧朱砂印章 */
.seal {
  position: absolute;
  left: var(--gap);
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 3px;
  background: var(--cinnabar);
  color: #F7F1E6;
  font-size: 13px;
  display: grid;
  place-items: center;
  letter-spacing: 0;
  opacity: .92;
}

.header-sub {
  position: absolute;
  right: var(--gap);
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .1em;
}

/* ---------- 分类切换 ---------- */
.tabs {
  display: flex;
  padding: 0 var(--gap);
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  padding: 10px 0 12px;
  margin-right: 26px;
  font-size: 14px;
  color: var(--ink-3);
  white-space: nowrap;
  background: none;
  border: none;
  font-family: inherit;
  transition: color .28s ease;
}
.tab:last-child { margin-right: var(--gap); }
.tab.is-active { color: var(--ink); }

.tabs-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--cinnabar);
  border-radius: 2px;
  transition: transform .34s cubic-bezier(.22, .8, .3, 1), width .34s cubic-bezier(.22, .8, .3, 1);
  transform-origin: left center;
}

/* ---------- 下拉刷新 ---------- */
.ptr {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: .12em;
  transition: height .28s ease;
}
.ptr.is-active { height: 58px; }

.ptr-ring { width: 22px; height: 22px; }
.ptr-ring circle {
  fill: none;
  stroke: var(--cinnabar);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
}
.ptr.is-armed .ptr-ring circle { animation: drawCircle 1s ease infinite; }
.ptr.is-loading .ptr-ring circle { animation: drawCircle .9s linear infinite; }

@keyframes drawCircle {
  0%   { stroke-dashoffset: 62; opacity: .35; }
  50%  { stroke-dashoffset: 16; opacity: 1; }
  100% { stroke-dashoffset: 62; opacity: .35; }
}

/* ---------- 列表 ---------- */
.list { padding: 8px var(--gap) 0; }

.item {
  display: flex;
  gap: 16px;
  padding: 20px 2px 19px;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp .5s cubic-bezier(.22, .8, .3, 1) forwards;
}
.item:last-child { border-bottom: none; }
.item:active { background: rgba(162, 64, 46, .035); }

@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* 日期印章块 */
.item-date {
  flex: 0 0 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .5);
}
.item-date .d {
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 500;
}
.item-date .m {
  margin-top: 3px;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: .06em;
}
.item.is-today .item-date { border-color: var(--cinnabar); background: var(--cinnabar-10); }
.item.is-today .item-date .d,
.item.is-today .item-date .m { color: var(--cinnabar); }

/* 内容区 */
.item-main { flex: 1; min-width: 0; }

.item-title {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-summary {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-meta {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-3);
  font-family: var(--font-sans);
}

/* 描边标签 */
.tag {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 10.5px;
  color: var(--ink-2);
  letter-spacing: .04em;
}
.tag.status-ongoing { border-color: rgba(106, 130, 114, .5); color: var(--bamboo); }
.tag.status-upcoming { border-color: rgba(176, 138, 74, .5); color: var(--gold); }
.tag.status-ended { border-color: var(--line); color: var(--ink-3); }

.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }

/* ---------- 骨架屏 ---------- */
.sk-item { display: flex; gap: 16px; padding: 20px 2px 19px; border-bottom: 1px solid var(--line-soft); }
.sk-box {
  background: linear-gradient(90deg, #EDE8DE 25%, #F5F1E9 37%, #EDE8DE 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 3px;
}
.sk-date { flex: 0 0 54px; height: 54px; }
.sk-line { height: 13px; margin-bottom: 9px; }
.sk-line.w70 { width: 70%; }
.sk-line.w45 { width: 45%; }

@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- 底部加载态 ---------- */
.list-foot {
  padding: 26px 0 44px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .1em;
  font-family: var(--font-sans);
  min-height: 70px;
}
.foot-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.foot-line::before,
.foot-line::after {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--line);
}
.btn-retry {
  border: 1px solid var(--line);
  background: none;
  border-radius: 2px;
  padding: 7px 18px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  color: var(--ink-2);
  letter-spacing: .12em;
}
.btn-retry:active { background: var(--cinnabar-10); }

/* ---------- 空状态 ---------- */
.empty {
  padding: 76px 0 90px;
  text-align: center;
}
.empty svg { display: block; margin: 0 auto 24px; }
.empty-text {
  font-size: 13.5px;
  color: var(--ink-3);
  letter-spacing: .16em;
}
.empty-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
  opacity: .72;
  font-family: var(--font-sans);
}

/* ---------- 提示条（调试模式） ---------- */
.debug-bar {
  margin: 10px var(--gap) 0;
  padding: 9px 12px;
  border: 1px dashed rgba(176, 138, 74, .55);
  border-radius: var(--radius);
  background: rgba(176, 138, 74, .07);
  font-size: 11.5px;
  line-height: 1.6;
  color: #8A6C33;
  font-family: var(--font-sans);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translate(-50%, 12px);
  max-width: 76%;
  padding: 10px 18px;
  border-radius: 3px;
  background: rgba(46, 43, 38, .9);
  color: #F5F2EB;
  font-size: 13px;
  letter-spacing: .06em;
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   拦截页：非企业微信访问
   ============================================================ */
.guard {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: var(--paper);
  background-image: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 42px;
  text-align: center;
}
.guard.is-hidden { display: none; }

.guard-mark {
  width: 76px;
  height: 76px;
  margin-bottom: 30px;
}
.guard-mark path, .guard-mark circle {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.2;
}
.guard-mark .seal-line { stroke: var(--cinnabar); stroke-width: 1.6; }

.guard-title {
  font-size: 18px;
  letter-spacing: .2em;
  text-indent: .2em;
  margin-bottom: 12px;
}
.guard-desc {
  font-size: 13px;
  line-height: 2;
  color: var(--ink-2);
  letter-spacing: .06em;
}
.guard-brand {
  margin-top: 46px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .3em;
  text-indent: .3em;
}

/* 右侧小箭头 / 细节 */
.item-arrow {
  position: absolute;
  right: 2px;
  top: 50%;
  margin-top: -4px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: rotate(45deg);
}
