/* ============================================================
   L4 组件样式：每个组件一段，对应 js/ui.js 里同名函数。
   只引用 tokens.css 的「语义令牌」—— 不要在这里写死颜色。
   视觉方向（css/themes/*.css）通过覆盖令牌来改变这里的样子。
   组件画廊 design.html 把每个组件单独展示，改完去那里看。
   ============================================================ */

/* ---------- appBar 顶栏 ---------- */
.appbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: calc(var(--appbar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--sp-2) 0;
  background: var(--appbar-bg);
  color: var(--appbar-ink);
}

.appbar-btn {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--radius-pill);
}

.logo-mark {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}

.appbar-btn:active {
  background: color-mix(in srgb, currentColor 14%, transparent);
}

.appbar-title {
  display: grid;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

/* 默认标题和往下滑以后的本场标题叠在同一格，上下交替淡入 */
.appbar-main,
.appbar-alt {
  grid-area: 1 / 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.appbar-main {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.appbar-alt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.appbar-alt-title {
  overflow: hidden;
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: 650;
  text-overflow: ellipsis;
}

.appbar-alt-sub {
  overflow: hidden;
  font-family: var(--font-num);
  font-size: var(--fs-micro);
  opacity: 0.72;
  text-overflow: ellipsis;
}

.appbar.has-alt.is-scrolled .appbar-main {
  opacity: 0;
  transform: translateY(-8px);
}

.appbar.has-alt.is-scrolled .appbar-alt {
  opacity: 1;
  transform: none;
}

.appbar-project {
  font-family: var(--font-heading);
  font-size: var(--fs-body);
  font-weight: 650;
  letter-spacing: 0.06em;
}

.appbar-edition {
  font-size: var(--fs-small);
  opacity: 0.72;
}

.edition-switch,
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  height: 32px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--appbar-line);
  border-radius: var(--radius-pill);
  font-size: var(--fs-small);
  white-space: nowrap;
}

.lang-switch {
  margin-right: var(--sp-1);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-wide);
}

.edition-switch:active,
.lang-switch:active {
  background: color-mix(in srgb, currentColor 14%, transparent);
}

/* 封面上的语言按钮 */
.cover-lang {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(9, 34, 54, 0.28);
  color: var(--cover-title);
  backdrop-filter: blur(8px);
}

/* ---------- hero 页面头：对角线切角（呼应封面） ---------- */
.hero {
  position: relative;
  padding: var(--sp-4) var(--gutter) calc(var(--sp-8) + var(--hero-cut));
  margin-bottom: calc(var(--sp-2) - var(--hero-cut) / 2);
  background: var(--hero-bg);
  color: var(--hero-ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--hero-cut)), 0 100%);
}

.hero > * {
  max-width: var(--content-max);
  margin-inline: auto;
}

.hero-kicker {
  margin-bottom: var(--sp-2);
  font-size: var(--fs-micro);
  letter-spacing: var(--tracking-wide);
  opacity: 0.75;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  font-weight: var(--heading-weight);
  line-height: var(--lh-tight);
  letter-spacing: var(--heading-tracking);
}

/* 标题 + 右侧小字（单场页：左边「第一次提案记录」，右边日期） */
.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-4);
}

.hero-side {
  font-family: var(--font-num);
  font-size: var(--fs-small);
  opacity: 0.82;
  white-space: nowrap;
}

.hero-sub {
  margin-top: var(--sp-2);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
  opacity: 0.82;
}

/* ---------- tabBar 底部标签栏（横屏时变成左侧导航） ---------- */
.tabbar {
  display: flex;
  justify-content: center;
  height: 100%;
  padding: 0 var(--sp-2);
  background: var(--tabbar-bg);
  box-shadow: 0 -1px 0 var(--tabbar-line);
}

.tab {
  position: relative;
  display: flex;
  flex: 1;
  max-width: 160px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--tabbar-h);
  color: var(--tabbar-ink);
  font-size: var(--fs-micro);
  transition: color var(--dur-fast) ease;
}

.tab.is-active {
  color: var(--tabbar-active);
  font-weight: 600;
}

.tab.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: currentColor;
}

/* ---------- sectionHead 区块标题 ---------- */
.section-head {
  margin: var(--sp-6) 0 var(--sp-3);
  color: var(--bg-ink);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-heading);
  font-size: var(--fs-title);
  font-weight: var(--heading-weight);
  line-height: var(--lh-tight);
}

.section-count {
  margin-left: auto;
  color: var(--bg-ink-3);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 400;
}

.section-note {
  margin-top: var(--sp-1);
  color: var(--bg-ink-2);
  font-size: var(--fs-small);
  line-height: var(--lh-body);
}

.tone-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 2px;
  background: var(--tone, currentColor);
}

.tone-red {
  --tone: var(--rule-red);
}

.tone-blue {
  --tone: var(--rule-blue);
}

.tone-construction {
  --tone: var(--rule-construction);
}

.tone-dialogue {
  --tone: var(--rule-dialogue);
}

/* ---------- ruleGroup 规则组 ---------- */
.rule-list {
  list-style: none;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  color: var(--card-ink);
  box-shadow: inset 3px 0 0 var(--tone, var(--accent)), var(--card-shadow);
}

.rule-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--sp-2);
  padding: var(--sp-4);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
}

.rule-item + .rule-item {
  border-top: 1px solid var(--line);
}

.rule-no {
  padding-top: 3px;
  color: var(--tone, var(--accent));
  font-family: var(--font-num);
  font-size: var(--fs-small);
}

/* 规则条目里的子项（如「两种方案：一是…，二是…」按现场规则纸拆成两行） */
.rule-subs {
  margin: var(--sp-1) 0 0;
  padding: 0;
  list-style: none;
}

.rule-subs li + li {
  margin-top: 2px;
}

/* ---------- metaList 场次信息 ---------- */
.meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0;
  color: var(--bg-ink);
}

.meta-item dt {
  margin-bottom: 2px;
  color: var(--bg-ink-3);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
}

.meta-item dd {
  font-size: var(--fs-body);
  line-height: 1.45;
}

.meta-item.is-wide {
  grid-column: 1 / -1;
}

/* 抽屉里的信息在卡片底色上 */
.p-detail .meta-list {
  color: var(--card-ink);
}

.p-detail .meta-item dt {
  color: var(--ink-3);
}

/* ---------- stats 统计数字 ---------- */
.stats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: var(--sp-4) 0;
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  color: var(--card-ink);
  box-shadow: var(--card-shadow);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--sp-3) var(--sp-4);
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: var(--heading-weight);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--ink-3);
  font-size: var(--fs-micro);
}

.stat.tone-accent .stat-value {
  color: var(--accent);
}

/* ---------- status 状态徽章 ---------- */
.status {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 var(--sp-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: var(--fs-micro);
  white-space: nowrap;
}

.status.is-passed {
  border-color: var(--passed-bg);
  background: var(--passed-bg);
  color: var(--passed-ink);
}

.status.is-pending {
  border-style: dashed;
  border-color: var(--status-pending);
  color: var(--status-pending);
}

/* ---------- voteBar 投票条 ---------- */
.vote-bar {
  display: flex;
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--surface-sunk);
}

.vote-yes {
  background: var(--vote-yes);
}

.vote-no {
  background: var(--vote-no);
}

.vote-abstain {
  background: var(--vote-abstain);
}

/* ---------- proposalCard 提案卡片 ---------- */
.p-list {
  display: grid;
  gap: var(--sp-3);
}

.p-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  color: var(--card-ink);
  box-shadow: var(--card-shadow);
  text-align: left;
  cursor: pointer;
  transform: rotate(var(--card-tilt));
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) ease;
}

/* 相邻卡片反向倾斜，像桌上散放的卡片（倾斜角为 0 时无效果） */
.p-card:nth-child(even) {
  transform: rotate(calc(var(--card-tilt) * -1));
}

.p-card:active {
  transform: scale(0.985);
}

@media (hover: hover) {
  .p-card:hover {
    transform: translateY(-2px);
  }
}

.p-card.is-passed {
  box-shadow: inset 3px 0 0 var(--passed-bg), var(--card-shadow);
}

.p-card-top {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.p-card-top .status {
  margin-left: auto;
}

.p-badge {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 var(--sp-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-num);
  font-size: var(--fs-micro);
}

.p-source {
  overflow: hidden;
  color: var(--ink-3);
  font-size: var(--fs-micro);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p-text {
  font-family: var(--font-card);
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
  letter-spacing: 0.03em;
}

.p-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.p-votes {
  color: var(--ink-2);
  font-size: var(--fs-micro);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.p-votes.is-muted {
  color: var(--ink-3);
  white-space: normal;
}

/* ---------- proposalDetail 提案详情（抽屉里） ---------- */
.p-detail {
  display: grid;
  gap: var(--sp-4);
  color: var(--card-ink);
}

.p-detail .p-card-top .status {
  margin-left: 0;
}

.p-detail-text {
  font-family: var(--font-card);
  font-size: 22px;
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.p-detail-votes .vote-bar {
  height: 10px;
  border-radius: 5px;
}

.vote-legend {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-2);
  color: var(--ink-2);
  font-size: var(--fs-small);
}

.vote-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 2px;
}

.legend-yes i {
  background: var(--vote-yes);
}

.legend-no i {
  background: var(--vote-no);
}

.legend-abstain i {
  background: var(--vote-abstain);
}

.p-detail .meta-list {
  margin: 0;
}

/* ---------- chips 横向筛选标签 ---------- */
.chips {
  display: flex;
  gap: var(--sp-2);
  margin: var(--sp-4) calc(var(--gutter) * -1) 0;
  padding: 2px var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius-pill);
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-size: var(--fs-small);
  white-space: nowrap;
}

.chip-count {
  opacity: 0.6;
  font-size: var(--fs-micro);
}

.chip.is-active {
  border-color: var(--chip-active-bg);
  background: var(--chip-active-bg);
  color: var(--chip-active-ink);
}

.chip.is-active .chip-count {
  color: inherit;
  opacity: 0.75;
}

/* ---------- segmented 分段切换 ---------- */
.segmented {
  display: flex;
  gap: 2px;
  margin: var(--sp-4) 0 0;
  padding: 3px;
  border-radius: var(--card-radius);
  background: var(--bg-sunk);
}

.seg {
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 36px;
  padding: 0 var(--sp-2);
  border-radius: calc(var(--card-radius) - 3px);
  color: var(--bg-ink-2);
  font-size: var(--fs-small);
  text-align: center;
}

.seg.is-active {
  background: var(--card-bg);
  color: var(--card-ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(20, 23, 26, 0.12);
}

/* ---------- sessionCard 场次卡片（时间线） ---------- */
.s-timeline {
  position: relative;
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding-left: 22px;
}

.s-timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 5px;
  width: 2px;
  background: linear-gradient(var(--tabbar-active), var(--tabbar-active) 70%, var(--bg-line));
}

.s-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr 20px;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  color: var(--card-ink);
  box-shadow: var(--card-shadow);
}

.s-card.is-no-cover {
  grid-template-columns: 1fr 20px;
  padding-left: var(--sp-4);
}

.s-node {
  position: absolute;
  top: 50%;
  left: -22px;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid var(--tabbar-active);
  border-radius: 50%;
  background: var(--app-bg);
}

.s-cover {
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: calc(var(--card-radius) * 0.6);
  background: var(--surface-sunk);
}

.s-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.s-kicker {
  color: var(--accent);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
}

.s-date {
  font-family: var(--font-heading);
  font-size: var(--fs-title);
  font-weight: var(--heading-weight);
  line-height: 1.25;
}

.s-desc {
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.45;
}

.s-stat {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: var(--fs-micro);
}

.s-go {
  color: var(--ink-3);
}

.s-card.is-upcoming {
  grid-template-columns: 1fr;
  padding-left: var(--sp-4);
  border: 1.5px dashed var(--bg-line);
  background: transparent;
  color: var(--bg-ink-3);
  box-shadow: none;
}

.s-card.is-upcoming .s-node {
  border-color: var(--bg-line);
  border-style: dashed;
}

.s-card.is-upcoming .s-kicker,
.s-card.is-upcoming .s-date,
.s-card.is-upcoming .s-stat {
  color: var(--bg-ink-3);
}

/* 成人版场次卡：长条封面（居中裁切，不拉伸），标签压在左下角，类似公众号头条 */
.s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) {
  display: block;
  min-height: 150px;
  padding: 0;
}

.s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) .s-cover {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: calc(var(--card-radius) - 1px);
}

.s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) .s-cover img {
  object-position: 50% var(--cy, 50%);
}

.s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) .s-body {
  position: relative;
  width: max-content;
  max-width: 82%;
  margin-top: 108px;
  padding: var(--sp-2) var(--sp-5) var(--sp-2) var(--sp-3);
  border-radius: 0 var(--card-radius) 0 calc(var(--card-radius) - 1px);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}

.s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) .s-desc {
  display: none;
}

.s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) .s-go {
  position: absolute;
  right: var(--sp-3);
  bottom: var(--sp-3);
  padding: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

/* ---------- carousel 图片轮播 ---------- */
.carousel {
  position: relative;
  margin-top: var(--sp-4);
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--surface-sunk);
  box-shadow: var(--card-shadow);
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  scroll-snap-align: center;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-slide.is-portrait {
  aspect-ratio: 3 / 4;
}

/* 竖图轮播别太高：限制整体宽度并居中 */
.carousel:has(.is-portrait) {
  max-width: 420px;
  margin-inline: auto;
}

.carousel-slide.is-contain img {
  object-fit: contain;
}

.carousel-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-8) var(--sp-3) var(--sp-2);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  color: #fff;
  font-size: var(--fs-micro);
  pointer-events: none;
}

.carousel-caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-count {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.35);
  font-variant-numeric: tabular-nums;
}

/* ---------- photoGrid 照片网格 ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  overflow: hidden;
  border-radius: var(--card-radius);
}

.photo-cell {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: var(--surface-sunk);
  cursor: zoom-in;
}

.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-cell.is-contain img {
  object-fit: contain;
}

/* 现场页的方格：一律填满，不露白边（提案卡条带仍保持完整显示） */
.photo-grid:not(.card-strip) .photo-cell.is-contain img {
  object-fit: cover;
}

/* ---------- home 首页：各场次一张照片的概览格子 ---------- */
.home-grid {
  display: grid;
  flex: 1;
  min-height: 0;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
}

.home-grid-item {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  border-radius: var(--card-radius);
  background: var(--surface-sunk);
}

.home-grid-photo {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.home-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}

/* 四场：上面两张竖图并排，下面两张合影通栏，正好铺满一屏 */
.home-grid.is-four {
  grid-template-rows: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr);
}

.home-grid.is-four .home-grid-item:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.home-grid.is-four .home-grid-item {
  min-height: 0;
}

.home-grid-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--sp-4) var(--sp-3) var(--sp-2);
  font-size: var(--fs-small);
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: auto;
}

@media (min-width: 720px) {
  .home-grid {
    flex: none;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: none;
  }

  .home-grid-item {
    aspect-ratio: 4 / 5;
  }

  .home-grid.is-four {
    grid-template-rows: none;
  }

  .home-grid.is-four .home-grid-item:nth-child(n + 3) {
    grid-column: auto;
  }
}

/* ---------- linkCard 引导卡 ---------- */
.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding: var(--sp-4);
  border-radius: var(--card-radius);
  background: var(--link-card-bg);
  color: var(--link-card-ink);
}

.link-card-title {
  display: block;
  font-weight: 650;
}

.link-card-sub {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-small);
  opacity: 0.8;
}

/* ---------- pager 上一场 / 下一场 ---------- */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--bg-line);
}

.pager-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  color: var(--bg-ink);
}

.pager-link.is-next {
  justify-content: flex-end;
  text-align: right;
}

.pager-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pager-dir {
  color: var(--bg-ink-3);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
}

.pager-title {
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- btn 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  min-height: var(--tap);
  padding: 0 var(--sp-5);
  border-radius: var(--radius-pill);
  background: var(--passed-bg);
  color: var(--passed-ink);
  font-weight: 600;
}

/* ---------- empty 空状态 ---------- */
.empty {
  margin: var(--sp-6) 0;
  padding: var(--sp-6);
  border: 1.5px dashed var(--bg-line);
  border-radius: var(--card-radius);
  color: var(--bg-ink-3);
  text-align: center;
}

/* ---------- overlay 弹层：抽屉（横屏时居中）/ 全屏看图 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 18, 0.45);
  opacity: 0;
  transition: opacity var(--dur) ease;
}

.overlay.is-open .overlay-backdrop {
  opacity: 1;
}

.overlay-close {
  position: absolute;
  z-index: 3;
  top: var(--sp-3);
  right: var(--sp-3);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-sunk);
  color: var(--ink);
  cursor: pointer;
}

.overlay.is-sheet .overlay-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 720px;
  max-height: 86vh;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4) calc(var(--sp-6) + env(safe-area-inset-bottom));
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  background: var(--card-bg);
  transform: translateY(100%);
  transition: transform var(--dur) var(--ease);
}

.overlay.is-sheet.is-open .overlay-panel {
  transform: none;
}

.overlay.is-sheet .overlay-panel::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 36px;
  height: 4px;
  margin-left: -18px;
  border-radius: 2px;
  background: var(--line-strong);
}

/* 提案白框：同一列表的所有提案横向排开，scroll-snap 左右滑 */
.p-pager {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  grid-template-rows: repeat(5, auto);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.p-pager::-webkit-scrollbar {
  display: none;
}

.p-slide {
  display: grid;
  grid-row: 1 / span 5;
  grid-template-rows: subgrid;
  row-gap: var(--sp-4);
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* 各张共用同一组行高：进度条、按钮在左右滑时位置不变 */
.p-slide > .p-detail {
  display: contents;
}

.p-slide .p-card-top { grid-row: 1; }
.p-slide .p-detail-text { grid-row: 2; }
.p-slide .p-detail-votes { grid-row: 3; }
.p-slide .meta-list { grid-row: 4; align-content: start; }
.p-slide .btn { grid-row: 5; align-self: end; }

.p-pager-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.p-pager-bar .deck-step {
  border-color: var(--line-strong);
  color: var(--ink);
}

.p-pager-bar .deck-count {
  min-width: 4em;
  text-align: center;
  color: var(--ink-2, var(--ink));
}

.overlay.is-sheet .p-detail > .p-card-top {
  padding-right: 40px;
}

/* 全屏看图：背后是当前图放大模糊的底色，图片圆角浮在上面，底部图注 + 圆点 +（首页）「进入这一场」 */
.overlay.is-viewer .overlay-backdrop {
  background: #07090c;
}

.viewer-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
}

.overlay.is-viewer.is-open .viewer-bg {
  opacity: 1;
}

.viewer-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(36px) saturate(1.2) brightness(0.42);
  transform: scale(1.25);
}

.overlay.is-viewer .overlay-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  color: #fff;
}

.overlay.is-viewer .overlay-close {
  top: calc(var(--sp-4) + env(safe-area-inset-top));
  right: var(--sp-4);
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  backdrop-filter: blur(10px);
}

/* 顶部 / 底部各铺一层渐变，按钮压在照片上也看得清 */
.overlay.is-viewer .overlay-panel::before,
.overlay.is-viewer .overlay-panel::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

.overlay.is-viewer .overlay-panel::before {
  top: 0;
  height: calc(96px + env(safe-area-inset-top));
  background: linear-gradient(rgba(0, 0, 0, 0.7), transparent);
}

.overlay.is-viewer .overlay-panel::after {
  bottom: 0;
  height: calc(140px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.viewer-track {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.viewer-track::-webkit-scrollbar {
  display: none;
}

.viewer-slide {
  display: grid;
  flex: 0 0 100%;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  min-height: 0;
  padding: calc(var(--sp-10) + 8px) var(--sp-4) var(--sp-2);
  scroll-snap-align: center;
}

.viewer-slide img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transform: scale(0.94);
  opacity: 0;
  transition: transform var(--dur-slow) var(--ease), opacity var(--dur) var(--ease);
}

.overlay.is-viewer.is-open .viewer-slide img {
  transform: none;
  opacity: 1;
}

.viewer-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  z-index: 2;
  padding: var(--sp-3) var(--sp-5) calc(var(--sp-6) + env(safe-area-inset-bottom));
}

.viewer-text {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.viewer-caption {
  overflow: hidden;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-count {
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.viewer-dots {
  display: flex;
  gap: 6px;
}

.viewer-dots i {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  transition: width var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.viewer-dots i.is-on {
  width: 18px;
  background: #fff;
}

.viewer-go {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 0 16px 0 20px;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  color: #111;
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
}

.viewer-go[hidden] {
  display: none;
}

.viewer-go:active {
  transform: scale(0.97);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.viewer-nav.is-prev {
  left: var(--sp-4);
}

.viewer-nav.is-next {
  right: var(--sp-4);
}

@media (prefers-reduced-motion: reduce) {
  .viewer-slide img {
    transform: none;
    transition: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .viewer-nav {
    display: grid;
  }
}

/* ============================================================
   横屏 / 大屏：同一批组件，换一种排法
   ============================================================ */
@media (min-width: 900px) {
  /* 标签栏 → 左侧竖向导航 */
  .tabbar {
    flex-direction: column;
    justify-content: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-4) var(--sp-2);
    box-shadow: 1px 0 0 var(--tabbar-line);
  }

  .tab {
    flex: none;
    height: 68px;
    border-radius: var(--card-radius);
    font-size: var(--fs-small);
  }

  .tab .icon {
    width: 24px;
    height: 24px;
  }

  .tab.is-active {
    background: color-mix(in srgb, var(--tabbar-active) 12%, transparent);
  }

  .tab.is-active::before {
    top: 50%;
    left: calc(var(--sp-2) * -1);
    width: 3px;
    height: 28px;
    margin-top: -14px;
    border-radius: 0 3px 3px 0;
  }

  .hero {
    padding-top: var(--sp-6);
    padding-bottom: calc(var(--sp-10) + var(--hero-cut));
  }

  .appbar {
    padding-inline: var(--sp-4);
  }

  /* 提案卡片排成多列 */
  .p-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    align-items: start;
  }

  /* 场次时间线·新版：竖向排开，卡片变宽（左图右文），整体限宽居中 */
  .s-timeline:not(.is-row) {
    max-width: 880px;
    margin-inline: auto;
    gap: var(--sp-5);
    padding-left: 36px;
  }

  .s-timeline:not(.is-row)::before {
    left: 8px;
  }

  .s-timeline:not(.is-row) .s-node {
    left: -36px;
  }

  .s-timeline:not(.is-row) .s-card {
    grid-template-columns: 280px 1fr 20px;
    gap: var(--sp-5);
    padding: var(--sp-4);
  }

  .s-timeline:not(.is-row) .s-card.is-no-cover {
    grid-template-columns: 1fr 20px;
  }

  .s-timeline:not(.is-row) .s-cover {
    width: 280px;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .s-timeline:not(.is-row) .s-date {
    font-size: 26px;
  }

  .s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) {
    display: block;
    min-height: 210px;
    padding: 0;
  }

  .s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) .s-cover {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
  }

  .s-timeline:not(.is-row) .s-card:not(.is-no-cover):not(.is-upcoming) .s-body {
    margin-top: 138px;
    padding: var(--sp-3) var(--sp-8) var(--sp-3) var(--sp-5);
  }

  /* 场次时间线·旧版横向排开（?layout=row 可切回） */
  .s-timeline.is-row {
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: var(--sp-4);
    padding: 28px 0 0;
    overflow-x: auto;
  }

  .s-timeline.is-row::before {
    top: 5px;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--tabbar-active), var(--tabbar-active) 70%, var(--bg-line));
  }

  .s-timeline.is-row .s-card {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 0 0 var(--sp-4);
    overflow: visible;
  }

  .s-timeline.is-row .s-card.is-no-cover, .s-timeline.is-row .s-card.is-upcoming {
    padding: var(--sp-4);
  }

  .s-timeline.is-row .s-node {
    top: -28px;
    left: var(--sp-4);
    margin-top: 0;
  }

  .s-timeline.is-row .s-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
  }

  .s-timeline.is-row .s-card:not(.is-no-cover):not(.is-upcoming) .s-body {
    padding: 0 var(--sp-4);
  }

  .s-timeline.is-row .s-go {
    display: none;
  }

  .photo-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
  }

  /* 抽屉 → 居中弹窗 */
  .overlay.is-sheet .overlay-panel {
    top: 50%;
    bottom: auto;
    width: min(620px, calc(100vw - 64px));
    max-height: 80vh;
    padding: var(--sp-8);
    border-radius: 16px;
    transform: translateY(calc(-50% + 24px));
    opacity: 0;
    transition:
      transform var(--dur) var(--ease),
      opacity var(--dur) ease;
  }

  .overlay.is-sheet.is-open .overlay-panel {
    transform: translateY(-50%);
    opacity: 1;
  }

  .overlay.is-sheet .overlay-panel::before {
    display: none;
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- rail 场次导航条（单场页顶部：上一场 · 场次点 · 下一场） ---------- */
.rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-6);
}

.rail-step {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 36px;
  padding: 0 var(--sp-3) 0 var(--sp-2);
  border: 1px solid var(--bg-line);
  border-radius: var(--radius-pill);
  color: var(--bg-ink);
  font-size: var(--fs-small);
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.rail-step.is-next {
  padding: 0 var(--sp-2) 0 var(--sp-3);
}

.rail-step:hover {
  border-color: var(--bg-accent);
}

.rail-step.is-empty {
  visibility: hidden;
}

.rail-track {
  position: relative;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}

.rail-track::-webkit-scrollbar {
  display: none;
}

.rail-track.is-scrub {
  touch-action: pan-y;
}

.rail-dots {
  position: relative;
  display: flex;
  justify-content: center;
  min-width: max-content;
  padding: 10px 14px;
}

/* 串起所有点的细线 */
.rail-dots::before {
  content: "";
  position: absolute;
  top: calc(10px + 14px);
  right: 34px;
  left: 34px;
  height: 1px;
  background: var(--bg-line);
}

.rail-dot {
  --mag: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 52px;
  color: var(--bg-ink-3);
  -webkit-tap-highlight-color: transparent;
}

.rail-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--bg-line);
  border-radius: 50%;
  background: var(--app-bg);
  color: var(--bg-ink-2);
  font-family: var(--font-num);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transform: scale(calc(1 + var(--mag) * 0.55));
  transform-origin: 50% 70%;
  transition: transform 90ms linear, background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.rail-dot.is-past .rail-mark {
  border-color: var(--bg-ink-3);
  color: var(--bg-ink);
}

.rail-dot:hover .rail-mark,
.rail-dot.is-hover .rail-mark {
  border-color: var(--bg-accent);
  color: var(--bg-ink);
}

.rail-dot.is-active .rail-mark {
  border-color: var(--bg-accent);
  background: var(--bg-accent);
  color: var(--app-bg);
  font-weight: 700;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg-accent) 22%, transparent);
}

@media (max-width: 420px) {
  .rail-step-text {
    display: none;
  }

  .rail-dots {
    padding-inline: 6px;
  }

  .rail-dot {
    width: 42px;
  }

  .rail-step,
  .rail-step.is-next {
    justify-content: center;
    width: 36px;
    padding: 0;
  }
}

/* ---------- facts 场次信息条：日期 · 人数 · 时长（写在页面底上） ---------- */
.facts {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 0;
  border-top: 2px solid var(--bg-ink);
  border-bottom: 1px solid var(--bg-line);
  color: var(--bg-ink);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: var(--sp-3) var(--sp-3) var(--sp-4);
}

.fact:first-child {
  padding-left: 0;
}

.fact + .fact {
  border-left: 1px solid var(--bg-line);
}

.fact-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  color: var(--bg-ink-3);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
}

.fact-value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 2px;
  font-size: var(--fs-small);
  line-height: 1.15;
}

.fact-num {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: var(--heading-weight);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.fact-date {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: var(--heading-weight);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.fact-word {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--heading-weight);
  line-height: 1.5;
}

.fact-unit {
  margin-left: 2px;
  color: var(--bg-ink-2);
}

.fact-arrow {
  align-self: center;
  display: inline-flex;
  margin: 0 2px;
  color: var(--bg-accent);
}

.fact-arrow .icon {
  width: 18px;
  height: 18px;
}

/* 中途人数有变化：前一个数淡一点 */
.fact.is-change .fact-num:first-child {
  opacity: 0.55;
}

.fact-sub {
  color: var(--bg-ink-2);
  font-size: var(--fs-micro);
  line-height: 1.45;
}

/* 手机：日期、人数一行，时长单独一行 */
@media (max-width: 520px) {
  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
  }

  .fact:nth-child(3) {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--bg-line);
    border-left: 0;
  }

  .fact-num {
    font-size: 24px;
  }

  .fact-word {
    font-size: 16px;
  }

  .fact-date {
    font-size: 18px;
  }
}

/* ---------- tally 提案统计卡 ---------- */
.tally {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-3) var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  background: var(--card-bg);
  color: var(--card-ink);
  box-shadow: var(--card-shadow);
}

.tally-main {
  display: flex;
  flex-direction: column;
}

.tally-total {
  font-family: var(--font-heading);
  font-size: 44px;
  font-weight: var(--heading-weight);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tally-caption {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
}

.tally-split {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--fs-small);
}

.tally-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}

.tally-row b {
  margin-left: auto;
  color: var(--card-ink);
  font-family: var(--font-heading);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

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

.tally-row.is-passed .tally-dot {
  background: var(--accent);
}

.tally-row.is-passed b {
  color: var(--accent);
}

.tally-bar {
  grid-column: 1 / -1;
  display: flex;
  gap: 3px;
  height: 6px;
}

.tally-bar span {
  min-width: 0;
  border-radius: 3px;
  background: var(--line);
}

.tally-bar span:first-child {
  background: var(--accent);
}

/* ---------- 竖向画幅轮播：横图两侧用同一张图的模糊底填满 ---------- */
.carousel-slide.is-framed {
  position: relative;
  overflow: hidden;
}

.carousel-slide.is-framed img:not(.carousel-fill) {
  position: relative;
  object-fit: contain;
}

.carousel-slide .carousel-fill {
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: blur(22px) brightness(0.72) saturate(1.1);
  transform: scale(1.15);
}

/* ---------- 提案卡：一排横向滑动的小图，点开全屏再左右翻 ---------- */
.photo-grid.card-strip {
  display: flex;
  gap: var(--sp-2);
  margin-inline: calc(var(--gutter) * -1);
  padding: 2px var(--gutter) var(--sp-3);
  overflow-x: auto;
  border-radius: 0;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
}

.card-strip .photo-cell {
  flex: 0 0 148px;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  cursor: zoom-in;
  scroll-snap-align: start;
}

.card-strip .photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- keynews 本场关键提案：像新闻导语，写在页面底上，左边一道强调线 ---------- */
.keynews {
  margin: var(--sp-5) 0 var(--sp-2);
  padding-left: var(--sp-4);
  border-left: 3px solid var(--bg-accent);
}

.keynews-title {
  margin: 0 0 var(--sp-1);
  color: var(--bg-accent);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.keynews-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.keynews-list li + li {
  border-top: 1px solid var(--bg-line);
}

.keynews-item {
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  /* 破折号固定在左边，句子长了在右边一列里折行（不会把破折号单独挤到上一行） */
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: var(--sp-2);
  width: 100%;
  padding: 10px 0;
  color: var(--bg-ink);
  text-align: left;
}

.keynews-dash {
  color: var(--bg-accent);
  font-family: var(--font-heading);
  font-size: 17px;
  line-height: 1.45;
}

.keynews-text {
  min-width: 0;
  font-family: var(--font-heading);
  font-size: 17px;
  line-height: 1.45;
}

.keynews-item:hover .keynews-text {
  text-decoration: underline;
  text-decoration-color: var(--bg-accent);
  text-underline-offset: 4px;
}

.keynews-item.is-failed .keynews-text {
  color: var(--bg-ink-2);
}

span.keynews-item {
  cursor: default;
}

span.keynews-item:hover .keynews-text {
  text-decoration: none;
}

/* ---------- secnav 单场页导航（成人版，吸在页面最顶上）：始 1 2 3 4 / 概况 提案 照片 提案卡 ---------- */
/* 两行同一种圆角按钮：场次行的当前场实心，分区行的当前分区浅底 */
.secnav {
  position: sticky;
  top: 0;
  z-index: 2000; /* 牌堆的卡片 / 按钮 z-index 到了 1000，导航必须在它们之上 */
  display: grid;
  gap: 6px;
  margin: 0 calc(var(--gutter) * -1) var(--sp-5);
  padding: var(--sp-3) var(--gutter) var(--sp-2);
  border-bottom: 1px solid transparent;
  background: var(--app-bg);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.secnav.is-stuck {
  border-bottom-color: var(--bg-line);
  box-shadow: 0 8px 18px -14px rgba(0, 0, 0, 0.6);
}

.secnav-row {
  display: flex;
  justify-content: safe center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.secnav-row::-webkit-scrollbar {
  display: none;
}

/* 场次行：一条细线把 始 1 2 3 4 串起来（和原来的场次导航一样） */
.secnav-row.is-sessions {
  position: relative;
  gap: 14px;
}

.secnav-row.is-sessions::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 8%;
  left: 8%;
  height: 1px;
  background: var(--bg-line);
}

.secnav-row.is-sessions .secnav-chip {
  position: relative;
  background: var(--app-bg);
}

.secnav-row.is-sessions .secnav-chip.is-current {
  background: var(--bg-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--bg-accent) 22%, transparent);
}

.secnav-chip {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-width: 34px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--bg-ink-2);
  font: inherit;
  font-size: var(--fs-small);
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.secnav-chip:hover {
  color: var(--bg-ink);
}

.secnav-chip.is-session {
  padding: 0;
  border-color: var(--bg-line);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}

.secnav-chip.is-session.is-current {
  border-color: var(--bg-accent);
  background: var(--bg-accent);
  color: var(--app-bg);
  font-weight: 700;
}

.secnav-chip.is-active {
  background: color-mix(in srgb, var(--bg-ink) 12%, transparent);
  color: var(--bg-ink);
  font-weight: 600;
}

/* ---------- 单场页左右滑的提示：拖动时从边上浮出「← 上一场标题」 ---------- */
.swipe-hint {
  position: fixed;
  z-index: 6;
  top: 50%;
  max-width: 60%;
  padding: 8px 14px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--bg-ink) 16%, var(--app-bg));
  color: var(--bg-ink);
  font-size: var(--fs-small);
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: background var(--dur-fast) var(--ease);
}

.swipe-hint.is-prev {
  left: var(--sp-3);
}

.swipe-hint.is-next {
  right: var(--sp-3);
}

.swipe-hint.is-ready {
  background: var(--bg-accent);
  color: var(--app-bg);
}

/* ---------- deck 提案牌堆：叠着左右翻 / 展开成竖排（UI.deck + UI.bindDecks） ---------- */
.deck-stack {
  touch-action: pan-y; /* 竖向滑动还给页面滚动，横向拖动交给牌堆 */
}

/* 叠着：所有牌放进同一个格子，按 --depth（离顶上几张）往右下错开、微微转角，第 4 张起藏起来 */
.deck:not(.is-open) .deck-stack {
  padding: 0 16px 22px 0;
}

.deck:not(.is-open) .p-list {
  grid-template: "pile" / minmax(0, 520px);
  align-items: stretch;
}

.deck:not(.is-open) .p-card {
  --lean: 1;
  grid-area: pile;
  min-height: 190px;
  transform: translate(calc(var(--depth) * 5px), calc(var(--depth) * 7px))
    rotate(calc(var(--card-tilt) + var(--lean) * var(--depth) * 1.1deg));
  rotate: calc(var(--drag, 0) * 0.05deg);
  opacity: clamp(0, 4 - var(--depth), 1);
  filter: brightness(calc(1 - var(--depth) * 0.045));
  cursor: grab;
  user-select: none;
  transition: transform var(--dur) var(--ease), translate var(--dur) var(--ease), rotate var(--dur) var(--ease),
    opacity var(--dur) ease, filter var(--dur) ease;
}

.deck:not(.is-open) .p-card:nth-child(even) {
  --lean: -1;
}

.deck.is-dragging .p-card {
  cursor: grabbing;
  transition: none;
}

.deck .p-card.is-flying {
  z-index: 999 !important;
  translate: calc(var(--fly) * 115%) -12px;
  rotate: calc(var(--fly) * 12deg);
  opacity: 0;
}

.deck:not(.is-open) .p-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}

.deck:not(.is-open) .p-foot {
  margin-top: auto;
}

/* 通过 / 未通过 像盖在纸卡上的章 */
.deck .p-card-top .status {
  height: 26px;
  padding: 0 var(--sp-2);
  border: 2px solid currentColor;
  border-radius: 4px;
  background: transparent;
  color: var(--rule-red);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: rotate(-7deg);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 35%, transparent);
  opacity: 0.88;
}

.deck .p-card-top .status.is-passed {
  color: var(--passed-bg);
}

.deck .p-card-top .status.is-pending {
  border-style: dashed;
  color: var(--status-pending);
}

/* 底下一行：‹ 3 / 20 ›　　展开全部 */
.deck-bar {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  color: var(--bg-ink-2);
}

.deck-step {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--bg-line);
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
}

.deck-count {
  min-width: 4.5em;
  text-align: center;
  font-family: var(--font-num);
  font-size: var(--fs-small);
}

.deck-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 40px;
  margin-left: auto;
  padding: 0 var(--sp-4);
  border: 1px dashed var(--bg-line);
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--fs-small);
  cursor: pointer;
}

.deck-step:hover,
.deck-toggle:hover {
  border-color: var(--bg-accent);
  color: var(--bg-ink);
}

/* 展开：翻页按钮收起来，「收起」做成强调色胶囊贴在屏幕底部，长列表里看到哪都能一键叠回 */
.deck.is-open .deck-step,
.deck.is-open .deck-count {
  display: none;
}

.deck.is-open .deck-bar {
  position: sticky;
  bottom: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-3);
  pointer-events: none;
}

.deck.is-open .deck-toggle {
  margin: 0;
  padding: 0 var(--sp-5);
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.35);
  pointer-events: auto;
}
