/* ==========================================================================
   七七个人站 · 前台样式
   --------------------------------------------------------------------------
   设计取向：粉白 kawaii × 现代移动端
     · Bento 网格组织首页入口，非对称卡片建立视觉层级
     · 克制的玻璃拟态（半透明 + 渐变描边 + 多层柔和阴影）
     · 微动效：滚动浮现、按钮流光、卡片抬升，全部可被 reduced-motion 关闭
     · 移动端优先，容器最大 480px（微信内置浏览器体验最佳）
     · 零外部依赖：无 CDN、无网络字体、无图标库，图标一律 emoji / CSS 绘制
   ========================================================================== */

/* ---------------------------------------------------------------- 设计令牌 */
:root {
  /* 主色阶 */
  --pink-50: #fff4f9;
  --pink-100: #ffe7f1;
  --pink-200: #ffd2e4;
  --pink-300: #ffb5d3;
  --pink-400: #ff8fb1;
  --pink-500: #f96ba0;
  --pink-600: #e04b87;
  --pink-700: #c1366f;

  /* 辅助色 */
  --lilac: #c3a5ff;
  --lilac-soft: #f0e8ff;
  --mint: #6fd3c0;
  --gold: #ffc46b;

  /* 中性色 */
  --ink: #3d2c37;
  --ink-soft: #7a6673;
  --muted: #a48f9c;
  --line: rgba(255, 143, 177, 0.24);
  --line-strong: rgba(255, 143, 177, 0.42);

  /* 面 */
  --bg: #fff7fb;
  --surface: #ffffff;
  --surface-2: #fffafc;
  --glass: rgba(255, 255, 255, 0.72);

  /* 渐变 */
  --grad-brand: linear-gradient(135deg, #ff9fc6 0%, #f96ba0 52%, #e04b87 100%);
  --grad-soft: linear-gradient(135deg, #ffe7f1 0%, #f4e6ff 100%);
  --grad-dark: linear-gradient(135deg, #2c2530 0%, #171320 100%);

  /* 阴影：三层叠加，比单层大模糊更"有质感" */
  --sh-1: 0 1px 2px rgba(80, 40, 60, .04), 0 3px 10px -2px rgba(233, 107, 160, .07);
  --sh-2: 0 2px 4px rgba(80, 40, 60, .05), 0 12px 28px -8px rgba(233, 107, 160, .18);
  --sh-3: 0 4px 8px rgba(80, 40, 60, .06), 0 22px 46px -14px rgba(224, 75, 135, .30);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, .85);

  /* 圆角 */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-full: 999px;

  /* 动效 */
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --max: 480px;
}

/* ---------------------------------------------------------------- 重置 */
*,
*::before,
*::after { box-sizing: border-box; }

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;              /* 微信里绝对不能出现横向滚动条 */
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
               "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.72;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: var(--pink-600); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3 {
  text-wrap: balance;               /* 标题断行更自然 */
  letter-spacing: -.01em;
}

:focus-visible {
  outline: 2px solid var(--pink-500);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--pink-200); color: var(--pink-700); }

/* ---------------------------------------------------------------- 背景装饰 */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-decor .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: .55;
  will-change: transform;
}

.bg-decor .blob-1 {
  width: 340px; height: 340px;
  top: -110px; left: -90px;
  background: radial-gradient(circle, #ffc2dd 0%, rgba(255, 194, 221, 0) 70%);
  animation: float-a 19s var(--ease) infinite alternate;
}

.bg-decor .blob-2 {
  width: 300px; height: 300px;
  top: 22%; right: -120px;
  background: radial-gradient(circle, #e2d1ff 0%, rgba(226, 209, 255, 0) 70%);
  animation: float-b 23s var(--ease) infinite alternate;
}

.bg-decor .blob-3 {
  width: 280px; height: 280px;
  bottom: -80px; left: -60px;
  background: radial-gradient(circle, #ffe0c2 0%, rgba(255, 224, 194, 0) 70%);
  animation: float-a 26s var(--ease) infinite alternate-reverse;
}

/* 极淡的噪点，让大片纯色不"塑料" */
.bg-decor::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .028;
  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.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes float-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(26px, 34px, 0) scale(1.12); }
}
@keyframes float-b {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to   { transform: translate3d(-30px, 22px, 0) scale(1); }
}

/* ---------------------------------------------------------------- 骨架 */
.app {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 14px calc(30px + env(safe-area-inset-bottom));
}

.page { padding-top: 12px; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 -14px;
  padding: 9px 14px;
  background: rgba(255, 247, 251, .78);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}

/* 顶栏底部一条渐变发丝线，比纯色边框精致 */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 143, 177, .55), rgba(195, 165, 255, .45), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: var(--ink);
}

.brand-mark {
  position: relative;
  flex: none;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  overflow: hidden;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* 有头像时铺满，并留一点白底让透明头像更干净 */
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

/* 立绘未上传时的小光晕 */
.brand-mark::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  background: var(--grad-brand);
  opacity: .28;
  filter: blur(7px);
  z-index: -1;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.22; min-width: 0; }
.brand-text b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text i {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .06em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------------------------------------------------------------- 导航 chips */
.chips {
  position: relative;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 0 -14px;
  padding: 11px 14px 7px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  scroll-snap-align: start;
  padding: 7px 15px;
  border-radius: var(--r-full);
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--sh-1);
  transition: transform .2s var(--ease-out), background .2s, color .2s, box-shadow .2s;
}
.chip:active { transform: scale(.94); }

.chip.is-active {
  background: var(--grad-brand);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .45);
}

/* ---------------------------------------------------------------- 按钮 */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  overflow: hidden;
  background: var(--pink-100);
  color: var(--pink-700);
  transition: transform .18s var(--ease-out), box-shadow .24s, opacity .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.965); }
.btn[disabled] { opacity: .6; cursor: progress; }

.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .42);
}

/* 流光：hover 时掠过一条高光 */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 255, 255, .5) 46%, transparent 64%);
  transform: translateX(-130%);
  transition: transform .75s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(130%); }

.btn-dark {
  background: var(--grad-dark);
  color: #fff;
  box-shadow: var(--sh-2), inset 0 1px 0 rgba(255, 255, 255, .14);
}

.btn-ghost {
  background: var(--glass);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-color: var(--line-strong);
  color: var(--pink-600);
  box-shadow: var(--sh-1);
}

.btn-danger { background: #fff1f1; color: #d24a45; border-color: #ffd8d6; }

.btn-sm { padding: 8px 15px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-xs { padding: 5px 12px; font-size: 12px; font-weight: 500; border-radius: var(--r-full); }
.btn-block { display: flex; width: 100%; }
.btn.is-disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

/* ---------------------------------------------------------------- 卡片 */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r-md);
  padding: 17px;
  margin-bottom: 13px;
  box-shadow: var(--sh-2), var(--sh-inset);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

/* 渐变描边卡片：padding-box / border-box 双层背景，比 border-image 兼容性好 */
.card-accent {
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-brand) border-box;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.page-title { margin: 10px 0 3px; font-size: 22px; font-weight: 700; }
.page-sub { margin: 0 0 15px; color: var(--muted); font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.req { color: var(--pink-600); font-style: normal; font-size: 11px; }

/* ---------------------------------------------------------------- 首页 Hero */
.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-3), var(--sh-inset);
  margin-bottom: 13px;
}

.hero-media { position: relative; }

/* 立绘是透明底 WebP，用 contain + 渐变底衬托，不裁切 */
.hero-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 58vh;
  object-fit: contain;
  padding: 6px 0 0;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .6) 0 10%, transparent 11%),
    radial-gradient(circle at 74% 68%, rgba(255, 255, 255, .42) 0 7%, transparent 8%),
    linear-gradient(160deg, #ffeaf3 0%, #ffdcec 52%, #ffcfe4 100%);
}

/* 底部渐隐，让文字压在图上也能读清 */
.hero-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(180deg, rgba(255, 247, 251, 0) 0%, rgba(255, 247, 251, .55) 52%, var(--surface) 100%);
  pointer-events: none;
}

.hero-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .18em;
  text-shadow: 0 2px 14px rgba(224, 75, 135, .38);
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .5) 0 11%, transparent 12%),
    radial-gradient(circle at 74% 66%, rgba(255, 255, 255, .34) 0 8%, transparent 9%),
    radial-gradient(circle at 52% 88%, rgba(255, 255, 255, .26) 0 6%, transparent 7%),
    linear-gradient(160deg, #ffd6e7 0%, #ffb8d4 48%, #ff9ac3 100%);
}

/* 贴在立绘上的小贴纸 */
.hero-stickers {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
}

.sticker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--pink-700);
  background: rgba(255, 255, 255, .84);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--sh-1);
}

.sticker-live { color: #fff; background: var(--grad-brand); border-color: transparent; }
.sticker-live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, .9);
  animation: pulse 1.9s infinite;
}

/* 抖音号贴纸（button，可一键复制） */
.sticker-copy {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s var(--ease-out), background .2s;
}
.sticker-copy:active { transform: scale(.94); }
.sticker-copy::after { content: " 复制"; opacity: .55; font-weight: 500; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .85); }
  70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.hero-body {
  position: relative;
  z-index: 2;
  padding: 0 17px 18px;
  margin-top: -34px;
}

.hero-kicker {
  margin: 0 0 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .32em;
  color: var(--pink-500);
  text-transform: uppercase;
}

.hero-name {
  margin: 0 0 7px;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.2;
  background: linear-gradient(120deg, #3d2c37 0%, #6b3f57 60%, var(--pink-600) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-tagline { margin: 0 0 15px; color: var(--ink-soft); font-size: 13px; }

.hero-actions { display: grid; gap: 9px; }

/* 卡片底部波浪，柔和过渡到页面背景 */
.hero-wave {
  display: block;
  width: 100%;
  height: 16px;
  margin-top: -1px;
  color: var(--bg);
}

/* ---------------------------------------------------------------- 公告 */
.notice {
  background: linear-gradient(135deg, #fff4f9 0%, #fdf3ff 100%);
  border: 1px solid var(--pink-100);
}
.notice p { margin: 0; font-size: 14px; }

/* ---------------------------------------------------------------- Bento 入口 */
.bento {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  grid-template-areas:
    "artworks events"
    "artworks perks"
    "fanart fanart"
    "marshmallow marshmallow";
  gap: 9px;
  margin-bottom: 13px;
}

.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 84px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--sh-2), var(--sh-inset);
  color: var(--ink);
  overflow: hidden;
  transition: transform .24s var(--ease-out), box-shadow .24s;
}
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--sh-3), var(--sh-inset); }
.bento-card:active { transform: translateY(-1px) scale(.985); }

/* 角上一个柔光，hover 时更亮 */
.bento-card::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: var(--grad-soft);
  opacity: .55;
  transition: opacity .3s, transform .4s var(--ease-out);
}
.bento-card:hover::before { opacity: .95; transform: scale(1.15); }

.bento-icon {
  position: relative;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 16px;
  background: var(--grad-soft);
  box-shadow: var(--sh-1);
}

.bento-label { position: relative; }
.bento-label b { display: block; font-size: 15px; font-weight: 700; }
.bento-label span { display: block; font-size: 11.5px; color: var(--muted); }

.bento-arrow {
  position: absolute;
  right: 13px; bottom: 13px;
  font-size: 13px;
  color: var(--pink-400);
  opacity: .7;
  transition: transform .24s var(--ease-out), opacity .24s;
}
.bento-card:hover .bento-arrow { transform: translateX(3px); opacity: 1; }

.bento-artworks { grid-area: artworks; }
.bento-events { grid-area: events; }
.bento-perks { grid-area: perks; }
.bento-fanart { grid-area: fanart; }

/* 主推卡片：大一号、带渐变描边 */
.bento-artworks {
  min-height: 178px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(150deg, #ffb5d3, #c3a5ff 60%, #ffd2e4) border-box;
}
.bento-artworks .bento-icon { width: 40px; height: 40px; font-size: 20px; border-radius: 14px; }
.bento-artworks .bento-label b { font-size: 17px; }

.bento-marshmallow {
  grid-area: marshmallow;
  min-height: 74px;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  border-color: transparent;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-3);
}
.bento-marshmallow::before { background: rgba(255, 255, 255, .28); opacity: .7; }
.bento-marshmallow .bento-icon { background: rgba(255, 255, 255, .22); color: #fff; }
.bento-marshmallow .bento-label span { color: rgba(255, 255, 255, .82); }
.bento-marshmallow .bento-arrow { position: static; color: #fff; margin-left: auto; opacity: .9; }

/* ---------------------------------------------------------------- 抖音作品
   抖音没有网页内嵌播放器，所以用「封面 + 跳转」的卡片，点开去抖音 App 看。 */
.works {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 13px;
}

.work {
  display: block;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--sh-2), var(--sh-inset);
  color: var(--ink);
  transition: transform .24s var(--ease-out), box-shadow .24s;
}
.work:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }
.work:active { transform: translateY(-1px) scale(.985); }
.work.is-static { cursor: default; }
.work.is-static:hover { transform: none; box-shadow: var(--sh-2), var(--sh-inset); }

.work-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #ffeef6 0%, #ffe0ee 100%);
  overflow: hidden;
}
.work-cover img { width: 100%; height: 100%; object-fit: cover; }

.work-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  opacity: .45;
}

.work-play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  padding-left: 2px;
  border-radius: 50%;
  background: rgba(28, 20, 26, .58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
}

.work-body { display: grid; gap: 2px; padding: 9px 11px 11px; }
.work-body b { font-size: 13.5px; font-weight: 700; line-height: 1.42; }
.work-body .small { line-height: 1.4; }
.list { display: grid; gap: 11px; }

.item { padding: 14px; }
.item-title { margin: 0 0 7px; font-size: 16px; font-weight: 700; }
.item-cover {
  width: 100%;
  border-radius: var(--r-sm);
  margin-bottom: 11px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--grad-soft);
}

/* 海报类图片（活动 / 福利）：不裁切，完整展示信息 */
.item-poster {
  width: 100%;
  border-radius: var(--r-sm);
  margin-bottom: 11px;
  cursor: zoom-in;
  background: var(--surface-2);
  border: 1px solid var(--pink-100);
}
.item-past { opacity: .62; }
.item-past .item-title { font-size: 15px; }

.item-row { display: flex; gap: 13px; align-items: flex-start; }
.item-thumb {
  width: 94px; height: 94px;
  flex: none;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--grad-soft);
  cursor: zoom-in;
}
.item-body { flex: 1; min-width: 0; }
.item-body .item-title { margin-top: 0; }

/* ---------------------------------------------------------------- 活动倒计时 */
.event-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 9px;
  padding: 4px 11px;
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pink-700);
  background: var(--pink-50);
  border: 1px solid var(--pink-100);
}

.countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 11px;
  font-size: 13px;
  color: var(--ink-soft);
}

.cd-seg {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 9px;
  border-radius: 9px;
  background: var(--grad-soft);
  border: 1px solid var(--pink-100);
}
.cd-seg b {
  font-size: 14px;
  font-weight: 700;
  color: var(--pink-700);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.cd-seg i { font-style: normal; font-size: 10.5px; color: var(--muted); }
.cd-live { color: var(--pink-600); font-weight: 600; }

/* ---------------------------------------------------------------- 画廊
   用 CSS 多列做瀑布流：立绘这类长图自然占高、表情包这类方图保持紧凑，
   不需要给每张图预设裁切比例。 */
.gallery {
  column-count: 2;
  column-gap: 10px;
  margin-bottom: 13px;
}

.gallery-item {
  position: relative;
  display: block;                 /* 多列布局里不能是 grid / flex 容器 */
  break-inside: avoid;
  margin: 0 0 10px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--sh-2), var(--sh-inset);
  transition: transform .24s var(--ease-out), box-shadow .24s;
}
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--sh-3); }

/* 透明底素材：contain + 粉底，完整显示不裁切 */
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  padding: 6px;
  background: linear-gradient(165deg, #fff7fb 0%, #ffecf5 100%);
  cursor: zoom-in;
  transition: transform .45s var(--ease-out);
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-item figcaption {
  padding: 8px 11px;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
  border-top: 1px solid var(--pink-100);
}
.gallery-item .muted { padding: 0 11px 9px; margin: 0; }

.thumb-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  background: var(--grad-soft);
  color: var(--muted);
  font-size: 12px;
}

/* ---------------------------------------------------------------- 棉花糖墙 */
.msg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.msg {
  position: relative;
  padding: 12px 14px 12px 16px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--pink-100);
}
/* 左侧一条渐变竖线，像便签 */
.msg::before {
  content: "";
  position: absolute;
  left: 0; top: 11px; bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--grad-brand);
  opacity: .75;
}

.msg-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}
.msg-head b { font-size: 12.5px; font-weight: 700; color: var(--pink-600); }
.msg-head time { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.msg p { margin: 0; font-size: 14px; word-break: break-word; }

/* ---------------------------------------------------------------- 表单 */
.form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-soft); }

.field input[type="text"],
.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field input[type="datetime-local"],
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--pink-100);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { resize: vertical; line-height: 1.65; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: #c8b6c1; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--pink-300);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(255, 143, 177, .16);
}

.field input[type="file"] {
  width: 100%;
  padding: 9px;
  font-size: 13px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--pink-50);
}

/* 字数进度条 */
.counter {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.counter .bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--pink-100);
  overflow: hidden;
}
.counter .bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--grad-brand);
  transition: width .2s var(--ease-out), background .2s;
}
.counter.is-over .bar i { background: linear-gradient(135deg, #ff9a9a, #d24a45); }
.counter.is-over { color: #d24a45; }

/* ---------------------------------------------------------------- 提示条 */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: 13px;
  box-shadow: var(--sh-1);
  animation: flash-in .35s var(--ease-out);
}
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash-ok {
  background: linear-gradient(135deg, #ecfdf3, #e6faf1);
  color: #17794a;
  border: 1px solid #c8f0da;
}
.flash-err {
  background: linear-gradient(135deg, #fff2f2, #fff5f0);
  color: #c0392b;
  border: 1px solid #ffd9d6;
}

/* ---------------------------------------------------------------- 空状态 */
.empty {
  text-align: center;
  padding: 44px 18px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  color: var(--ink-soft);
  box-shadow: var(--sh-1);
}
.empty p { margin: 5px 0; }
.empty p:first-child { font-size: 15px; }

/* ---------------------------------------------------------------- 群 / 二维码 */
.qr-img {
  width: 200px;
  max-width: 74%;
  margin: 8px auto;
  border-radius: var(--r-sm);
  border: 1px solid var(--pink-100);
  background: #fff;
  padding: 6px;
}

/* 关于卡片：头像 + 名字 */
.about-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, #fff6fa 0%, #fdf2ff 100%);
  border: 1px solid var(--pink-100);
}
.about-avatar {
  width: 62px; height: 62px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--sh-2);
  background: var(--grad-soft);
}
.about-text { min-width: 0; }
.about-name { margin: 0 0 2px; font-size: 15px; font-weight: 700; }
.about-text p:last-child { margin: 0; }

/* ---------------------------------------------------------------- 页脚 */
.footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 10px;
  font-size: 13px;
}
.footer-links a {
  position: relative;
  color: var(--ink-soft);
  transition: color .2s;
}
.footer-links a:hover { color: var(--pink-600); }
.footer-meta { margin: 4px 0; font-size: 11px; color: var(--muted); letter-spacing: .02em; }

/* ---------------------------------------------------------------- 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(38, 24, 33, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  cursor: zoom-out;
  animation: flash-in .22s var(--ease-out);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--r-md);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7);
}

/* ---------------------------------------------------------------- 滚动浮现
   注意：隐藏态只在 .js-reveal 下生效（由 <head> 里的内联脚本按能力添加），
   这样 JS 被禁用 / 加载失败时内容依然完整可见，不会白屏。 */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}
.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

/* ---------------------------------------------------------------- 工具类 */
.stack-sm { display: grid; gap: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- 降级：尊重系统"减弱动态效果" */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* 大屏：容器略放宽 */
@media (min-width: 560px) {
  :root { --max: 520px; }
  .gallery { column-count: 3; }
}

/* 桌面：容器保持手机宽度（内容优先给微信），两侧用大面积柔光填满，避免太空 */
@media (min-width: 820px) {
  body {
    background: linear-gradient(180deg, #fff7fb 0%, #fdf4ff 42%, #fff9f6 100%);
  }
  .bg-decor .blob { filter: blur(96px); opacity: .5; }
  .bg-decor .blob-1 { width: 560px; height: 560px; top: -180px; left: -60px; }
  .bg-decor .blob-2 { width: 520px; height: 520px; top: 18%; right: -160px; }
  .bg-decor .blob-3 { width: 480px; height: 480px; bottom: -140px; left: 4%; }
  .bg-decor .blob-4 {
    position: absolute;
    width: 460px; height: 460px;
    top: 46%; left: -150px;
    border-radius: 50%;
    filter: blur(96px);
    opacity: .45;
    background: radial-gradient(circle, #cfe9ff 0%, rgba(207, 233, 255, 0) 70%);
  }
}

/* ================================================================ 投棉花糖
   静态版用 Pages Functions + D1，表单和留言墙都在这一段。 */
.mf {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 18px;
}
.mf-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.mf-label span { color: var(--muted); font-weight: 400; }
.mf-input,
.mf-textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
  appearance: none;
}
.mf-textarea { min-height: 116px; resize: vertical; line-height: 1.6; }
.mf-input:focus,
.mf-textarea:focus {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px rgba(255, 122, 174, .16);
}
.mf-input::placeholder,
.mf-textarea::placeholder { color: var(--muted); }
.mf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
}
.mf-count { font-size: 12px; color: var(--muted); }
.mf-count.is-over { color: #d94a4a; }
.mf-msg {
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  border-radius: var(--r-md);
  display: none;
}
.mf-msg.is-show { display: block; }
.mf-msg.is-ok { background: #eaf7ee; color: #2a7a45; }
.mf-msg.is-err { background: #fdecec; color: #c0392b; }

.mf-btn[disabled] { opacity: .6; pointer-events: none; }

/* 留言墙 */
.wall { display: flex; flex-direction: column; gap: 10px; }
.wall-item {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
}
.wall-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.wall-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  border-radius: 50%;
  background: var(--grad-brand);
}
.wall-who { font-size: 14px; font-weight: 500; }
.wall-time { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.wall-text { font-size: 14.5px; line-height: 1.62; white-space: pre-wrap; word-break: break-word; }
.wall-skel { height: 68px; border-radius: var(--r-md); background: var(--surface-2); animation: wallPulse 1.4s ease-in-out infinite; }
@keyframes wallPulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ---------------- 投棉花糖 · 二维码区块 ----------------
   2026-10-04 老板要二维码：粉丝扫码直接进留言页
   图在 static/img/qiqi/qr_m.png（tools/make_qr.py 生成，已解码校验过） */
.qr-share {
  margin-top: 26px;
  padding: 22px 18px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fff6fb 0%, #fff 100%);
  border: 1px dashed var(--pink-200);
  border-radius: var(--r-md);
}

.qr-share-title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}

.qr-share-sub {
  margin: 0 0 14px;
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.6;
}

.qr-share-img {
  display: block;
  width: 208px;
  height: 208px;
  margin: 0 auto 12px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--pink-100);
  border-radius: var(--r-md);
  box-shadow: 0 6px 20px rgba(233, 106, 168, .12);
}

.qr-share-url {
  display: inline-block;
  margin-top: 2px;
  font-size: .82rem;
  color: var(--pink-400);
  text-decoration: none;
  border-bottom: 1px dotted var(--pink-200);
  word-break: break-all;
}

.qr-share-url:hover { color: var(--pink-500); }

/* 首页那颗「投棉花糖」磁贴右上角挂个小码，提示能扫 */
.bento-marshmallow { position: relative; }

.bento-marshmallow .bento-qr {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--pink-100);
  border-radius: 8px;
  opacity: .85;
  transition: opacity .2s ease, transform .2s ease;
}

.bento-marshmallow:hover .bento-qr {
  opacity: 1;
  transform: scale(1.06);
}
