:root {
  /* ===== 婚礼风配色：米白纸 + 酒红 + 金 ===== */
  --bg: #f7f2e8;
  --panel: #fffdf8;
  --card: #fffdf8;
  --line: #e6dac4;
  --text: #3a2a26;
  --muted: #8a6f63;
  --accent: #8e2b3a;        /* 酒红 */
  --accent2: #bd9a4e;       /* 金 */
  --accent-soft: #b8485a;   /* 亮酒红（横带渐变用） */
  --ink: #3a2a26;
  --ok: #4caf7d;
  --gold: #bd9a4e;
  --serif: 'Noto Serif SC', Georgia, 'Songti SC', 'SimSun', serif;
  --script: 'Great Vibes', 'Noto Serif SC', cursive;
  /* 硬投影：酒红墨色偏移，保留手作卡片质感但更柔和 */
  --shadow-hard: 5px 5px 0 rgba(58,42,38,.18);
  --shadow-hard-hover: 9px 9px 0 rgba(58,42,38,.22);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text); line-height: 1.6;
  overflow-x: hidden;
  /* 婚礼风：米白纸底渐变打底 */
  background-color: #f7f2e8;
  background-image: linear-gradient(180deg, #fbf6ec 0%, #f1e7d4 100%);
  position: relative;
}
/* 顶部 / 底部 酒红双横带（请柬上下边），常驻成画框 */
body::before, body::after {
  content: ""; position: fixed; left: 0; right: 0; height: 13px; z-index: 200;
  background: repeating-linear-gradient(90deg, var(--accent) 0 22px, var(--accent-soft) 22px 24px);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
body::before { top: 0; }
body::after { bottom: 0; box-shadow: 0 -2px 8px rgba(0,0,0,.12); }

/* ===== 婚礼风全局：衬线标题 + 「」引号框 + 花体副标 ===== */
h1, h2, h3, .hero-title, .brand h1, .b-title, .otd-bigdate, .stat .st-num, .cards-title, .sel-banner {
  font-family: var(--serif);
}
.brand h1, .hero-title {
  letter-spacing: .22em; text-indent: .22em;
}
.brand h1::before, .brand h1::after,
.hero-title::before, .hero-title::after {
  color: var(--accent); font-weight: 700;
}
.brand h1::before { content: "「"; }
.brand h1::after { content: "」"; }
.hero-title::before { content: "「"; }
.hero-title::after { content: "」"; }
.hero-kicker {
  font-family: var(--script);
  font-size: 32px; font-weight: 400; color: var(--accent);
  letter-spacing: .02em; margin: 0 0 22px;
}

/* ===== 婚礼风页脚：圆形图章 + 落款 + 返回主站 ===== */
.invite-footer { text-align: center; margin: 10px 0 8px; }
.invite-footer .seal { display: flex; justify-content: center; }
.invite-footer .stamp {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  width: 108px; height: 108px; border: 2px solid var(--accent); border-radius: 50%;
  color: var(--accent); font-family: var(--serif); font-size: 14px; line-height: 1.5;
  letter-spacing: .06em; font-weight: 600; transform: rotate(-6deg); padding: 8px;
}
.invite-footer .foot-text { color: var(--muted); font-size: 14px; letter-spacing: .14em; margin: 18px 0 14px; }
.invite-footer .foot-beian { color: var(--muted); font-size: 12px; letter-spacing: .04em; margin: 12px 0 6px; }
.invite-footer .foot-beian a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted var(--muted); padding-bottom: 1px; }
.invite-footer .foot-beian a:hover { color: var(--accent); }
.invite-footer .back-main { display: none; }

/* 建议浮标 + 弹窗 */
.suggest-fab {
  position: fixed; right: 22px; bottom: 40px; z-index: 900;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: #fdf6ec;
  font-family: var(--serif); font-size: 15px; font-weight: 700; letter-spacing: .08em;
  border: 2px solid var(--accent2);
  cursor: pointer; transition: transform .15s;
}
.suggest-fab:hover { transform: translateY(-3px); }
.suggest-card { width: min(460px, 100%); }
.suggest-title { margin: 0 0 14px; font-family: var(--serif); color: var(--accent); font-size: 20px; }
.suggest-form { display: flex; flex-direction: column; gap: 12px; }
.sg-field { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: #6a5840; font-weight: 600; }
.sg-field input, .sg-field textarea {
  font: inherit; font-weight: 400; color: var(--text);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px;
  background: #fffdf8; resize: vertical;
}
.sg-field input:focus, .sg-field textarea:focus { outline: none; border-color: var(--accent); }

@media (max-width: 560px) {
  .suggest-fab { right: 14px; bottom: 30px; width: 50px; height: 50px; font-size: 13px; }
/* 全局轻提示 toast */
.toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  max-width: 82vw; padding: 11px 18px; border-radius: 12px;
  background: rgba(44, 33, 19, .92); color: #fdf6ec;
  font-size: 14px; line-height: 1.5; text-align: center;
  box-shadow: 0 10px 28px rgba(0,0,0,.3); z-index: 1200;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.site-header {
  position: relative; z-index: 1;
  padding: 36px 18px 12px; border-bottom: 2px solid var(--accent);
  background: linear-gradient(180deg, #fbf4e6, #f3ead9);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 12px; }
.site-header h1 { margin: 0; font-size: 20px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* 导航绝对居中于整条 header；间距加大 */
.topnav {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.topnav a {
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 600;
  padding: 7px 16px; border-radius: 9px; border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.topnav a:hover { color: var(--text); background: #ece0c8; }
.topnav a.active {
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}

/* 顶部搜索框：所有页面常驻，即搜即看 */
/* 搜索功能已下线：桌面端不再显示搜索框 */
.search-wrap { display: none; }
#search {
  width: 250px; max-width: 100%; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 14px; outline: none;
}
#search:focus { border-color: var(--accent); }
#clear-search {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; width: 32px; height: 34px; cursor: pointer; flex: 0 0 auto;
}
#clear-search:hover { border-color: var(--accent); color: var(--accent); }

.search-drop {
  display: none; position: absolute; right: 0; top: calc(100% + 10px);
  width: 470px; max-width: min(92vw, 470px); max-height: 62vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); padding: 8px; z-index: 60;
}
.search-drop.open { display: block; }
.sd-item {
  padding: 10px 12px; border-radius: 12px; cursor: pointer; margin: 6px 4px;
  background: var(--card); border: 1px solid var(--line);
}
.sd-item:hover { border-color: var(--accent2); }
.sd-top { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.sd-date { color: var(--accent2); font-variant-numeric: tabular-nums; }
.sd-ext { margin-left: auto; color: var(--accent2); text-decoration: none; font-size: 12px; white-space: nowrap; padding: 2px 4px; }
.sd-ext:hover { text-decoration: underline; }
.sd-title { font-size: 14.5px; font-weight: 600; margin: 2px 0; line-height: 1.4; }
.sd-desc { font-size: 13px; color: #6a5840; line-height: 1.5; }
.sd-meta { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 0 4px; }
.sd-none { padding: 10px 12px; }
.sd-more {
  display: block; width: calc(100% - 8px); margin: 8px 4px 4px; padding: 10px;
  font: inherit; font-size: 13.5px; font-weight: 600; text-align: center; cursor: pointer;
  border-radius: 999px; background: transparent;
  border: 1.5px dashed var(--accent2); color: var(--accent);
}
.sd-more:hover { background: var(--accent2); color: #fff; border-style: solid; }

main { max-width: 960px; margin: 0 auto; padding: 38px 22px 64px; position: relative; z-index: 1; }

.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.nav {
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  width: 36px; height: 36px; border-radius: 10px; font-size: 18px; cursor: pointer;
}
.nav:hover { border-color: var(--accent); }
.crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.crumb-link {
  background: var(--panel); border: 1px solid var(--line); color: var(--accent2);
  border-radius: 8px; padding: 5px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.crumb-link:hover { border-color: var(--accent); color: var(--accent); background: #ece0c8; }
.crumb-link:active { transform: scale(0.98); }
.crumb-sep { color: var(--muted); }
.crumb-cur { font-size: 16px; font-weight: 700; color: var(--text); padding: 5px 6px; }
.today-btn {
  margin-left: auto; background: transparent; border: 1px solid var(--accent2);
  color: var(--accent2); border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer;
  white-space: nowrap;
}

.weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  color: var(--muted); font-size: 13px; text-align: center; margin-bottom: 6px;
}
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cell {
  position: relative; min-height: 62px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px;
  font-size: 14px; color: var(--text); cursor: default;
}
.cell.empty { background: transparent; border: none; }
.cell.has { cursor: pointer; }
.cell.has:hover { background: #ece0c8; }
.cell.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cell .num { font-variant-numeric: tabular-nums; }
.cell .dot {
  position: absolute; right: 8px; top: 7px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
}
.cell .cnt {
  position: absolute; right: 6px; bottom: 5px; font-size: 11px; color: var(--accent2);
}
.hint { color: var(--muted); font-size: 12.5px; margin-top: 10px; }
.hint b { color: var(--accent); }

/* 年视图 / 全部年份视图：月份 / 年份瓦片，直接标注事件数（一眼看出哪月/哪年有内容） */
.grid.year, .grid.allyears {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
}
.ytile {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 10px; text-align: center; cursor: pointer; transition: all .15s ease;
}
.ytile:hover { transform: translateY(-2px); background: #ece0c8; }
.ytile .ym { display: block; font-size: 16px; font-weight: 600; }
.ytile .yc { display: inline-block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.ytile.has .yc { color: var(--accent2); }

.cards-title {
  display: flex; align-items: center; gap: 12px;
  font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
  font-size: 17px; font-weight: 700; color: var(--text);
  margin: 18px 0 12px;
}
.cards-title .ct-line { flex: 1; height: 2px; background: var(--accent); opacity: .18; border-radius: 2px; }
.cards-title .ct-star { color: var(--accent2); font-weight: 400; }
.sel-banner {
  display: none; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(240, 165, 0, 0.10); border: 1px solid var(--accent2);
  color: var(--text); border-radius: 10px; padding: 8px 12px; margin: 0 0 12px;
  font-size: 14px;
}
.sel-banner .sb-text b { color: var(--accent2); font-variant-numeric: tabular-nums; }
.sb-close {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; width: 28px; height: 28px; cursor: pointer; flex: 0 0 auto;
}
.sb-close:hover { border-color: var(--accent); color: var(--accent); }
/* 卡片响应式网格：按容器宽度自动 1~3 列（宽屏 3 列，窄屏 2 列 / 单列） */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px; align-items: start;
}
.card {
  width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column;
}
.card .c-date { color: var(--accent2); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.card .c-cat {
  display: inline-block; font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; margin-left: 8px;
}
.card h3 { margin: 6px 0 10px; font-size: 15.5px; line-height: 1.45; }
.card .media {
  width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden;
  background: #f1e7d4; border: 1px solid var(--line); margin-bottom: 8px;
  display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 12px; padding: 6px;
  position: relative;
}
/* 图片显示不完整时（竖版/异比例）：背景用同图放大虚化铺满，前景完整居中显示，不裁切 */
.card .media::before {
  content: ''; position: absolute; inset: -24px; z-index: 0;
  background: inherit; background-size: cover; background-position: center;
  filter: blur(18px); transform: scale(1.12); opacity: .9;
}
/* 统一取景框 + contain：横版（如参考卡片 1.6）几乎铺满无黑边；竖版（如 MVPS 0.63）完整居中、不裁切、不变成大长条，与参考卡片观感对齐 */
.card .media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.card p.desc { margin: 0 0 10px; color: #6a5840; font-size: 13.5px; }
.card .src { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.card .src-link {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--accent2); text-decoration: none; word-break: break-all;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
  background: rgba(255,255,255,0.02); transition: background .15s, border-color .15s, transform .05s;
}
.card .src-link:hover, .card .src-link:focus-visible {
  background: rgba(120,170,255,0.10); border-color: var(--accent2);
  outline: none;
}
.card .src-link:active { transform: scale(0.99); }
.card .src-name { font-size: 13px; font-weight: 600; }
.card .src-go { font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.card .src-link:hover .src-go { color: var(--accent2); }
.card .src .note { color: var(--muted); font-size: 12px; margin-top: 6px; }

.badge {
  display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.badge.club_official { background: #14241c; color: #b8f0d2; border-color: #2c5a44; }
.badge.personal_verified { background: #201a2a; color: #d9b8f0; border-color: #4a3a5a; }
.badge.friend_verified { background: #1a2230; color: #b8d2f0; border-color: #2c445a; }
.badge.official_media { background: #2a2414; color: #f0d9b8; border-color: #5a4a2c; }
.badge.self_media { background: #142434; color: #8fd0e8; border-color: #2c5a6a; }
.badge.verified_media { background: #241433; color: #d8b8f0; border-color: #5a3a6a; }

.p-badge {
  display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 6px; margin-left: 6px;
  border: 1px solid var(--line); vertical-align: middle;
}
.p-badge.p-kaka { background: #14202a; color: #8fd0f0; border-color: #2c4a5a; }
.p-badge.p-ronaldo { background: #2a1420; color: #f0a8c8; border-color: #5a2c44; }
.p-badge.p-both { background: #20242a; color: #c8b8f0; border-color: #4a3a5a; }

.legend .badge.p-kaka { background: #14202a; color: #8fd0f0; border-color: #2c4a5a; }
.legend .badge.p-ronaldo { background: #2a1420; color: #f0a8c8; border-color: #5a2c44; }
.legend .badge.p-both { background: #20242a; color: #c8b8f0; border-color: #4a3a5a; }

.legend { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.legend-title { color: var(--muted); font-size: 12.5px; }

/* ===== 视图切换 ===== */
.view { display: none; }
.view.active { display: block; }

/* ===== 首页门户 ===== */
.stats {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 20px;
}
.stat {
  flex: 1 1 110px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 12px; text-align: center;
}
.stat .st-num {
  display: block; font-size: 24px; font-weight: 800; color: var(--accent2);
  font-variant-numeric: tabular-nums;
}
.stat .st-label { font-size: 12.5px; color: var(--muted); }

/* ===== 首页 Hero（婚礼风：居中单列，标题 + 主图相框 + 标语）===== */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  margin: 32px 0 96px; gap: 26px;
}
.hero-title {
  margin: 0; font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(32px, 6vw, 46px); line-height: 1.12; color: var(--text);
}
/* 风格分隔区：弯曲箭头 + 小狗图并排，居中，拉开上下间距 */
.orn-divider-wrap {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  margin: 72px auto;
}
.orn-divider-img {
  display: block;
  width: 360px; max-width: 60vw;
  height: auto;
}
.orn-dog {
  display: block;
  width: 140px; height: auto;
  flex: 0 0 auto;
}
@media (max-width: 700px) {
  .orn-divider-wrap { gap: 12px; }
  .orn-divider-img { width: 260px; max-width: 55vw; }
  .orn-dog { width: 96px; }
}
/* 婚礼风：标题由全局规则加「」引号框 */
.hero-text { max-width: 560px; margin-top: 44px; }
.hero-slogan { margin: 0; color: #6a5840; font-size: 15px; line-height: 2.2; text-align: left; letter-spacing: .01em; }
.hero-sign { display: block; margin-top: 1.4em; }
.hero-by { display: block; text-align: right; margin-top: 1.4em; }
/* Hero CTA：米色胶囊按钮（浅底、细边、硬投影，呼应 Persa 的 GET STARTED） */
.hero-cta {
  display: inline-block; margin-top: 18px;
  padding: 11px 24px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--accent); color: var(--text);
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  box-shadow: var(--shadow-hard);
  transition: transform .14s ease, box-shadow .14s ease, color .15s;
}
.hero-cta:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-hover); color: var(--accent); }
.hero-cta:active { transform: translate(0, 0); box-shadow: var(--shadow-hard); }
/* Hero：主图（干净照片 + 极细描边 + 柔投影，图片完整显示不裁切） */
.hero-photo { position: relative; margin: 44px 0 0; width: min(440px, 88vw); }
.hero-illus {
  width: min(440px, 88vw);
  position: relative; z-index: 1;
}
.hero-illus svg { width: 100%; height: auto; display: block; }
.hero-illus .frame-hint { font: 11px/1 "Noto Serif SC", serif; fill: #b7a98a; letter-spacing: .1em; }
.hero-main {
  display: block; position: relative; z-index: 2;
  width: 100%; height: auto;
}

/* ===== 关于页容器 ===== */
.about { position: relative; }

@media (max-width: 700px) {
  main { padding: 24px 20px 48px; }
  .site-header { flex-direction: column; align-items: stretch; gap: 12px; padding: 36px 16px 14px; }
  .topnav {
    position: static; transform: none; width: 100%;
    justify-content: center; gap: 28px; row-gap: 12px; flex-wrap: wrap;
  }
  .topnav a { padding: 7px 6px; }
  /* 修复标题视觉不居中：内层文字统一居中（副标题更宽会把 h1 挤偏左） */
  .brand { justify-content: center; text-align: center; }
  /* 搜索功能已下线，移动端同样不显示 */
  .search-wrap { display: none; }
  /* 段前距加大：hero 离导航栏远一些 */
  .hero { gap: 30px; padding: 0 6px; margin: 52px 0 64px; }
  .hero-title { margin: 0; }
  .hero-text { max-width: 100%; }
  .hero-slogan { margin: 0; text-align: left; padding: 0 2px; }
  .hero-by { text-align: right; }
  .hero-photo { margin: 0 auto; width: min(330px, 86vw); }
  .leaf { display: none; }
  .pc-head { flex-wrap: wrap; gap: 6px 12px; }
  /* 年/月瓦片：手机端一行 5 个，缩小内边距保证可读 */
  .ytile { padding: 12px 4px; }
  .ytile .ym { font-size: 14px; }
  .ytile .yc { font-size: 11px; margin-top: 4px; }
  .pc-go { margin-left: auto; }
  /* 手机端日历头部：面包屑独占一行，按钮一行排开 */
  .cal-head { flex-wrap: wrap; row-gap: 10px; }
  .cal-head .crumb { flex: 1 1 100%; }
  .cal-head .today-btn { margin-left: 0; }
  .cal-head #otd-btn { margin-left: auto; }
  /* 手机端隐藏「回到本月」，日历按钮更聚焦 */
  .cal-head #today-btn { display: none; }
  /* 制品页卡片：手机端固定两列，自适应页面宽度 */
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

.portal-grid {
  /* minmax(0, 1fr) 而非 1fr：切断「最大内容宽度」向上传导（环节3 礼物流为 max-content），
     否则轨道会被撑到数万像素，整页内容被推到屏幕外 */
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 64px;
}
.portal-card {
  position: relative;
  display: flex; flex-direction: column; align-items: stretch; text-align: left; gap: 10px;
  background: var(--card); border: 2px solid var(--accent); border-radius: 16px;
  padding: 18px 20px; cursor: pointer; color: var(--text); font: inherit;
  box-shadow: var(--shadow-hard);
  transition: transform .14s ease, box-shadow .14s ease;
}
.portal-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-hover);
}
.portal-card:active { transform: translate(-1px, -1px); box-shadow: var(--shadow-hard-hover); }
/* 制品板块：去框线，顶满页面左右（视口级出血） */
.portal-card--bare {
  background: none; border: 0; border-radius: 0; padding: 0;
  box-shadow: none; transform: none; margin: 0; width: 100%;
  min-width: 0; /* 栅格项允许收缩到内容宽度以下，防止被内部 max-content 内容撑爆 */
}
.portal-card--bare:hover { transform: none; box-shadow: none; }
/* 小测验板块：去框线/底色，与制品板块一致的裸排版 */
.portal-card--plain {
  background: none; border: 0; border-radius: 0; padding: 0;
  box-shadow: none; transform: none; cursor: default;
  width: 66.6667%;            /* 只占左侧 2/3，右侧留白 */
  max-width: 600px;
  margin-right: auto;          /* 左对齐，右侧自然留白 */
}
.portal-card--plain:hover { transform: none; box-shadow: none; }
/* 视频板块：与「环节1」镜像——占据页面右侧 2/3，右对齐且留白不贴边 */
.portal-card--right {
  background: none; border: 0; border-radius: 0; padding: 0;
  box-shadow: none; transform: none; cursor: default;
  width: 66.6667%;            /* 只占右侧 2/3 */
  max-width: 600px;
  margin-left: auto;           /* 右对齐 */
  margin-right: 40px;          /* 不贴右边，留白 */
}
.portal-card--right:hover { transform: none; box-shadow: none; }
@media (max-width: 700px) {
  .portal-card--plain { width: 100%; max-width: none; }
  .portal-card--right { width: 100%; max-width: none; margin-right: 0; }
  /* 手机端 hero 两人名一行显示 */
  .hero-kicker { font-size: 16.5px; white-space: nowrap; }
  /* 手机端各环节标题：气派居中式，字号略缩但依旧醒目 */
  .portal-card--bare .pc-head .pc-title {
    font-size: 19px; letter-spacing: .03em;
  }
  /* 手机端制品跑马灯卡片缩小 */
  .pc-prod { width: 124px; flex: 0 0 124px; padding: 7px 7px 6px; border-width: 1.5px; }
  .pc-prod-name { font-size: 12.5px; -webkit-line-clamp: 1; }
  .pc-prod-cat { font-size: 10px; padding: 1px 7px; }
  .pc-prod-price { font-size: 12px; }
  /* 手机端狗狗分隔：整体缩小（左右位置沿用百分比，自动适配屏宽） */
  .section-dog { margin: 24px 0; }
  .section-dog--v0 .section-dog-img { width: 72px; }
  .section-dog--v1 .section-dog-img { width: 90px; }
  .section-dog--v2 .section-dog-img { width: 64px; }
  .section-dog--v3 .section-dog-img { width: 82px; }
  .section-dog--v4 .section-dog-img { width: 76px; }
}
/* 所有环节：标题↔内容间距统一 */
.portal-card .pc-head { margin-bottom: 26px; }
.portal-card .pc-preview { margin-top: 0; }
.portal-card--bare .pc-head { margin-bottom: 26px; }
.portal-card--bare .pc-preview { margin-top: 0; }
/* 环节标题：气派居中式 —— 衬线大字 + 主题色 + 金色下划线装饰，去除文章小标题感 */
.portal-card--bare .pc-head {
  flex-direction: column; align-items: center; text-align: center; gap: 12px;
}
.portal-card--bare .pc-title {
  font-family: var(--serif); font-size: 23px; font-weight: 700; color: var(--accent);
  letter-spacing: .05em; line-height: 1.45;
  display: inline-block; position: relative; padding-bottom: 10px;
}
.portal-card--bare .pc-title::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 56px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent2), #e7cf93);
}
/* 环节1 样题卡：单张限宽居中 */
.portal-card[data-view="quiz"] .pc-quiz-grid { max-width: 480px; margin: 0 auto; }
/* 环节2 视频：标题与环节1对齐（整块通栏，左对齐 960 居中栏）；播放器单独居中（见 .video-wrap） */
.portal-card[data-view="video"] { /* 通栏，与环节1一致 */ }
/* 环节4 年份格子：复用日历「全部年份」样式，居中限宽 */
.years-preview { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.years-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.portal-card[data-view="years"] { cursor: pointer; }
/* 板块之间：用翻转装饰图替代原来的流程箭头，整块居中 */
.process-arrow {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  width: 100%; margin: 64px 0 68px;
}
.process-arrow-side {
  display: block;
  width: 300px; max-width: 50vw;
  height: auto; flex: 0 0 auto;
}
.process-arrow-img {
  display: block;
  width: 340px; max-width: 70vw;
  height: auto;
}
@media (max-width: 700px) {
  .process-arrow { gap: 14px; }
  /* 装饰图加了 flex:0 0 auto 无法收缩，必须用 max-width 兜底，否则窄屏会撑破视口 */
  .process-arrow-side { width: 180px; max-width: 40vw; }
  .process-arrow-img { width: 240px; max-width: 45vw; }
}
.portal-card--bare .pc-head {
  padding: 0 0 12px;
}
.portal-card--bare .pc-title { font-size: 20px; font-weight: 700; margin: 0; }
.portal-card--bare .pc-go { margin-right: 6px; }
/* 制品板块：标题↔卡片间距与其他环节统一（见上方 .portal-card .pc-head 规则） */

/* ===== 环节3：份子登记 ===== */
.gifts-wrap { max-width: 920px; margin: 0 auto; }
.gifts-wrap .gifts-form { margin-top: 22px; }
.gifts-intro { color: var(--muted); font-size: 15px; line-height: 1.9; margin: 0 0 22px; }
.gifts-form {
  background: var(--panel); border: 2px solid var(--accent); border-radius: 16px;
  padding: 16px 20px; box-shadow: var(--shadow-hard);
  max-width: 520px; margin: 22px auto 0;
  display: flex; flex-direction: column; gap: 12px;
}
.gifts-field { display: flex; flex-direction: column; gap: 8px; }
.gifts-field > label, .gifts-label { font-family: var(--serif); font-weight: 600; color: var(--accent); font-size: 15px; }
.gifts-form input[type="text"], .gifts-form textarea {
  font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); resize: vertical;
}
.gifts-form input[type="text"]:focus, .gifts-form textarea:focus { outline: none; border-color: var(--accent); }
.gifts-targets { display: flex; gap: 16px; flex-wrap: wrap; }
.gifts-target { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; cursor: pointer; }
.gifts-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
/* 昵称 + 送给谁 并列一行（标签顶端对齐，不换行） */
.gifts-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: nowrap; }
.gifts-row .gifts-field:first-child { flex: 1 1 160px; min-width: 120px; }
.gifts-row .gifts-field:last-child { flex: 0 0 auto; }
@media (max-width: 560px) {
  .gifts-row { flex-wrap: wrap; }
  .gifts-row .gifts-field:first-child, .gifts-row .gifts-field:last-child { flex: 1 1 100%; }
}
/* 「给我一些灵感」与「送出这份心意」并列一行 */
.gifts-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 6px; }
.gifts-actions .gifts-idea-btn, .gifts-actions .gifts-submit { flex: 1; margin-top: 0; text-align: center; }
.gifts-idea-btn {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  background: transparent; border: 1.5px dashed var(--accent2); color: var(--accent);
  transition: background .14s, color .14s;
}
.gifts-idea-btn:hover { background: var(--accent2); color: #fff; border-style: solid; }
.gifts-ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.gifts-ideas[hidden] { display: none !important; }
.gift-idea {
  font: inherit; font-size: 13.5px; cursor: pointer;
  padding: 7px 14px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--accent2); color: var(--accent);
  transition: background .14s, color .14s;
}
.gift-idea:hover { background: var(--accent2); color: #fff; }
.gift-idea.selected { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.gift-preset {
  font: inherit; font-size: 13.5px; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--accent2); color: var(--accent);
  transition: background .14s, color .14s, transform .12s;
}
.gift-preset:hover { background: var(--accent2); color: #fff; transform: translateY(-1px); }
.gift-preset:active { transform: translateY(0); }
.gifts-submit {
  font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
  padding: 11px 26px; border-radius: 999px;
  background: var(--accent); color: #fff; border: 0;
  box-shadow: var(--shadow-hard); transition: transform .14s, box-shadow .14s;
}
.gifts-submit:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-hover); }
.gifts-hint { margin: 0; font-size: 14px; min-height: 18px; }
.gifts-hint.ok { color: var(--ok); }
.gifts-hint.err { color: #c0392b; }
.gifts-stream-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.gifts-stream-head h4 { font-family: var(--serif); margin: 0; font-size: 20px; color: var(--accent); }
.gifts-count { font-size: 14px; color: var(--muted); }
/* 已送达心意：三行交错的从右向左礼物流，每条为自适应宽度的圆角小框 */
.gifts-stream {
  position: relative; width: 100%; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 0;
  background: transparent; border: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}
.gifts-lane { overflow: hidden; width: 100%; display: flex; align-items: center; }
.gifts-track { display: flex; flex-direction: row; align-items: center; gap: 24px; width: max-content; will-change: transform; }
.gifts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: row; align-items: center; gap: 24px; width: max-content; }
.gift-entry {
  display: inline-flex; align-items: center; white-space: nowrap;
  background: transparent; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 8px 16px;
  font-size: 14.5px; line-height: 1.2; color: var(--text);
}
/* 新送达的心意：第一轮高亮（透明背景 + 酒红描边 + 脉冲光晕 + 「新到」角标） */
.gift-entry.ge-new {
  background: transparent;
  border-color: var(--accent);
  animation: gePulse 1.5s ease-in-out infinite;
}
.gift-entry.ge-new::after {
  content: "新到"; margin-left: 8px; font-size: 11px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 999px; padding: 1px 8px; vertical-align: middle;
}
@keyframes gePulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(142,43,58,.16), 0 4px 14px rgba(189,154,78,.28); }
  50% { box-shadow: 0 0 0 3px rgba(142,43,58,.28), 0 6px 20px rgba(189,154,78,.50); }
}
.ge-sender { font-family: var(--serif); font-weight: 700; color: var(--accent); margin-right: 4px; }
.ge-target { color: var(--accent2); font-weight: 600; margin: 0 4px; }
.ge-gift { color: var(--text); }
.gift-empty { color: var(--muted); font-size: 14px; padding: 6px 2px; }
/* 环节2 视频播放窗口：响应式 16:9，圆角+硬投影，与婚庆调性统一 */
/* 环节之间的狗狗分隔：五种形态（方向/大小/位置/微倾角）交错，灵动不呆板
   位置用百分比 padding 定位（随屏宽自适应，不会溢出视口） */
.section-dog { display: flex; justify-content: center; margin: 32px 0; }
.section-dog-img { width: 110px; height: auto; opacity: .92; }
.section-dog--v0 { justify-content: flex-start; padding-left: 16%; }
.section-dog--v0 .section-dog-img { transform: scaleX(-1) rotate(-5deg); width: 96px; }
.section-dog--v1 { justify-content: flex-end; padding-right: 10%; }
.section-dog--v1 .section-dog-img { transform: rotate(3deg); width: 124px; }
.section-dog--v2 { justify-content: flex-start; padding-left: 34%; }
.section-dog--v2 .section-dog-img { transform: scaleX(-1) rotate(4deg); width: 88px; }
.section-dog--v3 { justify-content: flex-end; padding-right: 24%; }
.section-dog--v3 .section-dog-img { transform: rotate(-3deg); width: 112px; }
.section-dog--v4 .section-dog-img { transform: scaleX(-1) rotate(2deg); width: 104px; }
/* 桌面端隐藏导航里的搜索图标（用完整搜索框） */
.video-wrap {
  position: relative;
  width: 100%; max-width: 760px; margin: 22px auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden;
  background: #000;
  box-shadow: 0 6px 22px rgba(0,0,0,.18);
}
/* 视频封面（点击再加载播放器） */
.video-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; cursor: pointer; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background-color: #2c2113; background-size: cover; background-position: center;
  font-family: var(--serif);
}
.video-poster::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.42));
}
.video-poster .video-play {
  position: relative; z-index: 1;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center; font-size: 26px; padding-left: 4px;
}
.video-poster .video-tip { position: relative; z-index: 1; font-size: 14px; letter-spacing: .08em; opacity: .92; }
.video-poster:hover .video-play { background: rgba(255,255,255,.26); }
.video-wrap .bili-player {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0; display: block;
}
@media (max-width: 700px) {
  .video-wrap { max-width: 100%; }
}
/* 视频兜底跳转链接：仅手机端显示 */
.bili-fallback { display: none; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--accent2); text-decoration: none; }
.bili-fallback:hover { color: var(--accent); }
@media (max-width: 700px) {
  .bili-fallback { display: block; margin-top: 18px; text-align: right; }
}
/* 小测验预览：一行多张题目卡 */
.pc-quiz-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px;
}
.pc-quiz-grid .pc-quiz { background: var(--card); border: 2px solid var(--accent); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-hard); }
.pc-head { display: flex; align-items: center; gap: 10px; }
.pc-title { font-size: 20px; font-weight: 700; margin: 0; flex: 1; }
.pc-go { font-size: 13px; font-weight: 600; color: var(--accent2); text-decoration: none; white-space: nowrap; }
.pc-go:hover { color: var(--accent); }
.pc-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }
.pc-preview { font-size: 13px; }
.pc-empty { color: var(--muted); margin: 4px 0; }
/* 制品预览：横向从右到左自动跑马灯 */
.pc-marquee {
  overflow: hidden; width: 100%;
  padding-bottom: 12px; /* 给卡片硬投影留出空间，避免被裁掉 */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.pc-marquee-track {
  display: flex; gap: 16px; width: max-content; align-items: flex-start;
  animation: pcMarquee 210s linear infinite;
}
.pc-marquee:hover .pc-marquee-track { animation-play-state: paused; }
@keyframes pcMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.pc-prod { display: flex; flex-direction: column; gap: 0; text-decoration: none; color: var(--text); width: 224px; flex: 0 0 224px; background: var(--card); border: 2px solid var(--accent); border-radius: 14px; padding: 12px 12px 9px; box-shadow: var(--shadow-hard); transition: transform .14s ease, box-shadow .14s ease; }
.pc-prod-media { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #efe6d4; display: flex; align-items: center; justify-content: center; font-size: 34px; border: 1px solid var(--line); }
.pc-prod-media img { width: 100%; height: 100%; object-fit: cover; }
.pc-prod-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.pc-prod-cat { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--accent2); border: 1px solid var(--accent2); border-radius: 999px; padding: 2px 9px; line-height: 1.5; white-space: nowrap; }
.pc-prod-name { font-size: 16px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.pc-prod-price { font-size: 14px; font-weight: 700; color: var(--accent2); margin-left: auto; white-space: nowrap; }
/* 测验预览 */
.pc-quiz { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.pc-quiz-tag { font-size: 11px; color: var(--muted); margin-bottom: 7px; letter-spacing: .03em; }
.pc-quiz-q { font-size: 13.5px; font-weight: 700; line-height: 1.5; margin-bottom: 10px; color: var(--text); }
.pc-quiz-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-quiz-opt { display: flex; gap: 8px; align-items: center; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.pc-quiz-opt:hover { border-color: var(--accent2); }
.pc-quiz-opt .opt-mark { color: var(--accent2); font-weight: 700; flex: 0 0 auto; }

/* ===== 往年今日（首页板块卡片） ===== */
.otd {
  display: none; /* 暂时隐藏「往年今日」板块 */
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 18px 20px 20px;
  margin: 0 0 84px;
  box-shadow: var(--shadow-hard);
}
.otd-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 13px; margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.otd-head h2 { margin: 0; font-size: 20px; display: flex; align-items: center; }
.otd-head-left { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0; }
/* 日期大号衬线展示字（视觉锚点） */
.otd-bigdate {
  font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
  font-size: 30px; font-weight: 800; line-height: 1; color: var(--accent); white-space: nowrap;
}
.otd-bigdate i { font-style: normal; font-size: 14px; font-weight: 600; color: var(--muted); margin: 0 2px; }
.otd-bigdate::after { content: " ✦"; color: var(--accent2); font-size: 15px; font-weight: 400; margin-left: 6px; }
/* 渐变标题：与站点 logo 同色系，一眼可辨又不占空间 */
.grad-text {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; font-weight: 800;
}
.otd-meta { font-size: 13.5px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.otd-more {
  color: var(--accent2); text-decoration: none; font-size: 13.5px; font-weight: 600;
  white-space: nowrap; transition: color .15s;
}
.otd-more:hover { color: var(--accent); }
.otd-sub { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.otd-list { display: flex; flex-direction: column; gap: 8px; }
.otd-item {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, rgba(232,71,95,.13), rgba(240,165,0,.06));
  border: 1px solid rgba(232,71,95,.32); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 10px 14px; text-decoration: none; color: var(--text);
  transition: border-color .15s, background .15s, transform .15s;
}
.otd-item:hover {
  border-color: var(--accent);
  background: linear-gradient(90deg, rgba(232,71,95,.22), rgba(240,165,0,.10));
  transform: translateX(3px);
}
.otd-year {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-weight: 800; font-size: 13px;
  border-radius: 8px; padding: 3px 10px; text-align: center;
  font-variant-numeric: tabular-nums; flex: 0 0 auto;
}
.otd-title { flex: 1; font-size: 14px; line-height: 1.5; }
.otd-go { color: var(--accent2); font-size: 12.5px; white-space: nowrap; }
.otd-empty { font-size: 13px; padding: 6px 2px; }

/* ===== 浅色纸感主题装饰：四角星点缀 / 衬线标题 / 分隔线 ===== */
h1, h2, .pc-title, .prod-group-title, .about h2, .otd-head h2 {
  font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
}
.otd-head h2::after { content: " ✦"; color: var(--accent2); font-weight: 400; }
.pc-title::after { content: " ✦"; color: var(--accent2); font-size: 13px; opacity: .85; }
/* F：背景角落大星芒（低透明度，手作画册氛围） */
.bg-star {
  position: fixed; z-index: 0; pointer-events: none;
  font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
  color: var(--accent2); opacity: .12; line-height: 1;
}
.bg-star-1 { top: 13%; left: 4%; font-size: 64px; transform: rotate(-8deg); }
.bg-star-2 { top: 60%; right: 5%; font-size: 46px; }
.bg-star-3 { bottom: 17%; left: 7%; font-size: 38px; transform: rotate(12deg); }
.bg-star-4 { top: 34%; right: 40%; font-size: 28px; opacity: .08; }

/* ===== 关于资料馆 ===== */
.about {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 22px; line-height: 1.75;
}
.about h2 { margin: 0 0 12px; font-size: 20px; }
.about h3 { margin: 22px 0 8px; font-size: 16px; color: var(--accent2); }
.about p { margin: 0 0 10px; color: #6a5840; font-size: 14.5px; }
.about ul { margin: 0 0 10px; padding-left: 20px; color: #6a5840; font-size: 14.5px; }
.about li { margin: 6px 0; }
/* 收录原则：去序号要点卡（装饰块 + 硬投影卡底） */
.about-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px; margin: 10px 0 8px;
}
.about-step {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 2px solid var(--accent); border-radius: 14px;
  padding: 14px; box-shadow: var(--shadow-hard);
}
.about-step .as-mark {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 17px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.about-step p { margin: 0; font-size: 13.5px; color: #6a5840; line-height: 1.65; }
.about-step b { color: var(--text); }
.about .legend { margin: 10px 0 4px; }
.about-note { margin-top: 18px; color: var(--muted); font-size: 13px; }

/* ===== 主题皮肤横幅（生日 / 纪念日，随日期自动换色）===== */
.theme-banner {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--accent);
  border-left: 4px solid var(--accent); border-radius: 12px;
  padding: 12px 16px; margin: 0 0 16px; color: var(--text); font-size: 14.5px;
}
.theme-banner[hidden] { display: none; }
.theme-banner .tb-icon { font-size: 20px; line-height: 1; }
.theme-banner b { color: var(--accent2); }

/* ===== 小测验 ===== */
.quiz { max-width: 640px; margin: 0 auto; }
.quiz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.quiz-head h2 { margin: 0; font-size: 21px; }
.quiz-prog { color: var(--muted); font-size: 13px; white-space: nowrap; }
.quiz-q {
  font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
  font-size: 19px; font-weight: 700; line-height: 1.65; margin-bottom: 16px; color: var(--text);
}
/* 判断题的卡片本体图（时间线同款封面） */
.quiz-card-img { margin: 0 0 16px; }
.quiz-card-img img {
  display: block; width: 100%; max-height: 280px; object-fit: cover; object-position: center 32%;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card);
}
.quiz-card-img figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; text-align: center; }
.fb-keep { color: var(--muted); font-size: 12px; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  text-align: left; background: var(--card); border: 2px solid var(--accent); color: var(--text);
  border-radius: 12px; padding: 13px 16px; font: inherit; font-size: 15px; cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform .12s ease, box-shadow .12s ease, background .15s, border-color .15s, color .15s;
}
.quiz-opt:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-hover); background: #fffdf7; }
.quiz-opt:active:not(:disabled) { transform: translate(0, 0); box-shadow: var(--shadow-hard); }
.quiz-opt:disabled { cursor: default; }
/* 答对：强调色块翻转（整卡变为赤陶红→琥珀橙渐变块、白字） */
.quiz-opt.opt-correct {
  border-color: var(--ink); color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow-hard);
}
.quiz-opt.opt-correct .opt-mark { color: #fff; }
.quiz-opt.opt-wrong { border-color: var(--accent); background: #fff; }
.quiz-opt.opt-wrong .opt-mark { color: var(--accent); }
.quiz-opt.opt-chosen { box-shadow: 0 0 0 2px var(--accent2) inset, var(--shadow-hard); }
/* 多选：可勾选态 */
.quiz-opt { display: flex; align-items: flex-start; gap: 10px; }
.quiz-opt .opt-text { flex: 1; }
.quiz-opt .opt-mark { flex: none; width: 18px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; }
.quiz-opt.opt-picked { border-color: var(--accent2); background: rgba(255, 138, 92, .1); }
.quiz-opt.opt-picked .opt-mark { color: var(--accent2); font-weight: 700; }
.quiz-submit {
  margin-top: 14px; width: 100%; background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; border-radius: 10px; padding: 12px 20px; font: inherit;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.quiz-submit:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.3); }
.quiz-multi .quiz-opt { cursor: pointer; }
.quiz-nav { margin-top: 16px; display: flex; gap: 10px; }
.quiz-prev {
  background: transparent; color: var(--muted); border: 1px solid var(--border, #2a2f3a);
  border-radius: 10px; padding: 10px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.quiz-prev:hover:not(:disabled) { color: var(--accent2); border-color: var(--accent2); }
.quiz-prev:disabled { opacity: .35; cursor: not-allowed; }
.quiz-fb { margin-top: 16px; }
.fb-line { font-size: 15px; margin-bottom: 6px; }
.fb-src { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.fb-link { color: var(--accent2); text-decoration: none; }
.fb-link:hover { text-decoration: underline; }
.quiz-next, .quiz-again {
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border: none;
  border-radius: 10px; padding: 11px 20px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.quiz-result { text-align: center; padding: 30px 10px; }
.quiz-result h2 { margin: 0 0 14px; font-size: 24px; }
.quiz-score { font-size: 46px; font-weight: 800; color: var(--accent2); font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.quiz-tip { color: var(--muted); font-size: 13.5px; max-width: 460px; margin: 0 auto 20px; line-height: 1.7; }

/* ===== 测验奖励机制（连击 / 段位 / 彩蛋 / 分享）===== */
.quiz-combo {
  display: inline-block; margin: -6px 0 12px; color: var(--accent2);
  font-weight: 700; font-size: 13.5px; letter-spacing: .3px;
}
.fb-combo { color: var(--accent2); font-weight: 700; }
.fb-explain { color: #6a5840; }
.quiz-rank-icon { font-size: 52px; line-height: 1; margin-bottom: 6px; }
.quiz-rank-name {
  display: inline-block; font-size: 21px; font-weight: 800; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.quiz-rank-tip { color: #6a5840; font-size: 14px; margin-bottom: 16px; }
.quiz-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.quiz-badge {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--muted);
}
.quiz-badge b { color: var(--accent2); }
.quiz-egg {
  background: linear-gradient(135deg, rgba(232,71,95,.12), rgba(240,165,0,.12));
  border: 1px solid var(--accent); border-radius: 14px;
  padding: 16px 18px; margin: 0 auto 18px; max-width: 480px;
}
.egg-label { font-size: 13px; font-weight: 700; color: var(--accent2); margin-bottom: 8px; }
.egg-text { font-size: 15.5px; line-height: 1.7; margin-bottom: 8px; }
.egg-from { font-size: 12.5px; color: var(--muted); }
.quiz-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.quiz-copy {
  background: transparent; color: var(--accent2); border: 1px solid var(--accent2);
  border-radius: 10px; padding: 11px 20px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.quiz-copy:hover { background: rgba(240, 165, 0, .1); }
.quiz-back {
  background: transparent; color: var(--accent); border: 1px solid var(--accent);
  border-radius: 10px; padding: 11px 20px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.quiz-back:hover { background: rgba(142, 43, 58, .08); }
/* 已领取身份提醒：与板块标题同字体（衬线/20px/700），酒红主色，清晰可见 */
.claimed-banner {
  margin: 38px auto 0; max-width: 560px; text-align: center;
  font-family: Georgia, "Songti SC", "STSong", "SimSun", serif;
  font-size: 20px; font-weight: 700; line-height: 1.7;
  color: var(--accent);
}

/* ===== 逐项解析与来源 ===== */
.opt-notes {
  margin: 12px 0 14px; padding: 12px 14px;
  background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: 12px;
}
.on-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 10px; letter-spacing: .3px; }
.on-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.on-item {
  border-left: 3px solid var(--line); border-radius: 8px; padding: 8px 10px;
  background: rgba(255, 255, 255, .015);
}
.on-item-ok { border-left-color: var(--ok); background: rgba(76, 175, 125, .07); }
.on-item-no { border-left-color: var(--accent); background: rgba(232, 71, 95, .06); }
.on-item-mine { box-shadow: 0 0 0 1px rgba(240, 165, 0, .45) inset; }
.on-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.on-text { font-size: 14px; line-height: 1.5; flex: 1 1 auto; min-width: 60%; }
.on-tag { flex: none; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.on-ok { color: var(--ok); background: rgba(76, 175, 125, .16); }
.on-no { color: var(--accent); background: rgba(232, 71, 95, .16); }
.on-mine { color: var(--accent2); background: rgba(240, 165, 0, .16); }
.on-meta { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.on-note { margin-right: 8px; }
.on-src { color: var(--accent2); text-decoration: none; white-space: nowrap; }
.on-src:hover { text-decoration: underline; }
.on-src-none { color: var(--muted); opacity: .7; }

/* ===== 连击奖励（分级视觉，越连越强）===== */
.fb-combo, .qr-combo {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 800; letter-spacing: .4px;
  border-radius: 999px; padding: 3px 12px;
}
.cb-icon { font-size: 1.1em; }
.cb-0 { color: #ffd166; background: rgba(240, 165, 0, .16); }
.cb-1 { color: #ffc04d; background: rgba(240, 165, 0, .22); }
.cb-2 {
  color: #ffab3d; background: rgba(240, 165, 0, .3);
  animation: cbPulse 1.1s ease-in-out infinite;
}
.cb-3 {
  color: #ff8a5c; background: rgba(232, 71, 95, .3);
  box-shadow: 0 0 12px rgba(240, 165, 0, .35);
  animation: cbPulse 0.9s ease-in-out infinite;
}
.cb-4 {
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(240, 165, 0, .6);
  animation: cbShake 0.55s ease-in-out infinite;
}
@keyframes cbPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes cbShake {
  0%, 100% { transform: scale(1.04) rotate(-1.4deg); }
  50% { transform: scale(1.1) rotate(1.4deg); }
}

/* ===== 总结页奖励强化 ===== */
.quiz-result { position: relative; overflow: hidden; border-radius: 18px; }
/* 首页测试板块下方直接展示的成绩面板（与弹窗内成绩同源） */
.quiz-result-inline {
  position: relative; overflow: hidden; border-radius: 18px;
  background: var(--card); border: 2px solid var(--accent);
  box-shadow: var(--shadow-hard);
  padding: 28px 24px 32px;
}
.quiz-result-inline > *:not(.qr-confetti):not(.qr-rays) { position: relative; z-index: 1; }
.qr-badge {
  display: inline-block; margin-bottom: 12px; padding: 5px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 800; letter-spacing: .6px;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.qr-glow { position: relative; display: inline-block; }
.qr-bar {
  max-width: 340px; height: 10px; margin: 0 auto 12px; border-radius: 999px;
  background: var(--line); overflow: hidden;
}
.qr-bar-fill {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 1s cubic-bezier(.2, .8, .2, 1);
}
.qr-combo { margin-bottom: 14px; font-size: 14.5px; }
.qr-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.qr-confetti i {
  position: absolute; top: -14px; display: block; border-radius: 2px; opacity: .95;
  animation-name: qrFall; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes qrFall {
  0% { transform: translateY(-20px) rotate(0) scale(.9); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(560px) rotate(720deg) scale(1); opacity: 0; }
}
.qr-rays {
  position: absolute; left: 50%; top: 34%; width: 620px; height: 620px; z-index: 0;
  transform: translate(-50%, -50%); pointer-events: none; opacity: .5;
  background: conic-gradient(from 0deg,
    rgba(240,165,0,.30) 0 6deg, transparent 6deg 24deg,
    rgba(232,71,95,.24) 24deg 30deg, transparent 30deg 48deg,
    rgba(240,165,0,.30) 48deg 54deg, transparent 54deg 72deg,
    rgba(232,71,95,.24) 72deg 78deg, transparent 78deg 96deg,
    rgba(240,165,0,.30) 96deg 102deg, transparent 102deg 120deg,
    rgba(232,71,95,.24) 120deg 126deg, transparent 126deg 144deg,
    rgba(240,165,0,.30) 144deg 150deg, transparent 150deg 168deg,
    rgba(232,71,95,.24) 168deg 174deg, transparent 174deg 192deg,
    rgba(240,165,0,.30) 192deg 198deg, transparent 198deg 216deg);
  animation: qrSpin 26s linear infinite;
}
@keyframes qrSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.quiz-result > *:not(.qr-confetti):not(.qr-rays) { position: relative; z-index: 1; }

.tier-plain .qr-badge { color: var(--muted); }
.tier-bronze .qr-badge { color: #d9a06a; border-color: rgba(217, 160, 106, .5); }

.tier-silver .qr-badge { color: #6a5840; border-color: rgba(207, 214, 227, .5); }
.tier-silver .qr-glow { filter: drop-shadow(0 0 14px rgba(207, 214, 227, .45)); }

.tier-gold .qr-badge { color: var(--accent2); border-color: rgba(240, 165, 0, .55); background: rgba(240, 165, 0, .1); }
.tier-gold .qr-glow { animation: rgPop .8s ease-out; filter: drop-shadow(0 0 20px rgba(240, 165, 0, .6)); }
.tier-gold .quiz-score { text-shadow: 0 0 22px rgba(240, 165, 0, .55); }

.tier-perfect {
  background: radial-gradient(ellipse at 50% 12%, rgba(240, 165, 0, .16), transparent 62%);
  border: 1px solid rgba(240, 165, 0, .4);
}
.tier-perfect .qr-badge {
  color: #1a1a1a; background: linear-gradient(135deg, var(--accent), var(--accent2)); border: none;
  animation: cbPulse 1.4s ease-in-out infinite;
}
.tier-perfect .qr-glow { animation: rgPop .9s ease-out; filter: drop-shadow(0 0 26px rgba(240, 165, 0, .75)); }
.tier-perfect .quiz-rank-icon { font-size: 74px; animation: rgFloat 2.4s ease-in-out infinite; }
.tier-perfect .quiz-score {
  text-shadow: 0 0 30px rgba(240, 165, 0, .7);
  animation: rgScore 1.2s cubic-bezier(.2, .8, .2, 1);
}

/* ===== 首页「往年今日」月日选择器（内嵌工具条） ===== */
.otd-pick {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px;
}
.otd-pick-label { font-weight: 700; font-size: 14px; color: var(--text); }
.otd-sels { display: inline-flex; align-items: center; gap: 6px; }
.otd-sel { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px; cursor: pointer; }
.otd-sel:focus { outline: none; border-color: var(--accent); }
.otd-unit { color: var(--muted); font-size: 14px; }
.otd-today { margin-left: auto; background: transparent; border: 1px solid var(--accent2); color: var(--accent2); border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.otd-today:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.otd-today:disabled { opacity: .45; cursor: default; }

/* 时间线工具栏「历史上的今天」按钮 */
.otd-btn { margin-left: 8px; }

/* 选中当天后，banner 内跳「跨年视图」的按钮 */
.sb-extra { margin-left: 8px; border-color: var(--accent2); color: var(--accent2); }
.sb-extra:hover { border-color: var(--accent); color: var(--accent); }

/* 月历中高亮当前跨年视图所选的月日 */
.cell.otd-day { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2) inset; }
.cell.otd-day .num { color: var(--accent2); font-weight: 700; }
@keyframes rgPop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rgFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes rgScore { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cb-2, .cb-3, .cb-4, .tier-perfect .qr-badge, .tier-perfect .quiz-rank-icon,
  .qr-rays, .qr-confetti i, .tier-gold .qr-glow, .tier-perfect .qr-glow { animation: none !important; }
  .qr-rays, .qr-confetti { display: none; }
}

/* ==================== 制品（products） ==================== */
.prod-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin: 4px 0 18px;
}
.prod-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.prod-chip {
  background: var(--card); border: 1.5px solid var(--accent); color: var(--text);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.prod-chip:hover { border-color: var(--accent); color: var(--accent); }
.prod-chip.active {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border-color: transparent;
}
.prod-add {
  background: transparent; border: 1px solid var(--accent2); color: var(--accent2);
  border-radius: 10px; padding: 7px 16px; font-size: 13.5px; cursor: pointer;
  transition: background .15s, color .15s;
}
.prod-add:hover { background: var(--accent2); color: #1a1d25; }

.prod-group { margin-bottom: 24px; scroll-margin-top: 18px; }
.prod-group-title {
  font-size: 17px; font-weight: 700; color: var(--text); margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
  border-left: 3px solid var(--accent); padding-left: 10px;
}
.prod-count {
  font-size: 11.5px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 0 8px; line-height: 1.7;
}
.prod-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 175px));
  gap: 14px; align-items: start; justify-content: center;
}
/* 内联编辑：编辑某制品时，表单在原卡片位置占满整行，并高亮以提示正在编辑 */
.prod-edit-inline { grid-column: 1 / -1; }
.prod-edit-inline .prod-form {
  box-shadow: 0 0 0 2px var(--accent2), var(--shadow-hard);
  margin-bottom: 14px;
}
.prod-edit-inline .pf-heading {
  font-size: 14px; font-weight: 600; color: var(--accent); margin: 0 0 10px;
}
/* 手机端：制品卡片固定两列，强制覆盖上面的桌面规则（源码顺序靠后生效） */
@media (max-width: 700px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
/* 手机端制品页：右侧章节导航（目录式）— 列出全部分类，高亮当前位置，点击跳转 */
.prod-cat-fab, .prod-cat-pop, .prod-cat-bar { display: none; }
@media (max-width: 700px) {
  /* 给右侧导航留出空间：内容区右移，右列制品不再被浮层遮挡，点击预览正常 */
  #view-products { padding-right: 96px; }
  .prod-nav {
    position: fixed; right: 6px; top: 50%; transform: translateY(-50%); z-index: 800;
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
    max-height: 72vh; overflow-y: auto; scrollbar-width: none;
    padding: 4px 2px; pointer-events: none;   /* 容器不拦截点击，避免盖住右列制品 */
  }
  .prod-nav::-webkit-scrollbar { display: none; }
  .prod-nav .pn-item {
    margin: 0; flex: 0 0 auto; cursor: pointer; pointer-events: auto;
    font: inherit; font-size: 11px; line-height: 1.2; white-space: nowrap;
    padding: 6px 9px; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--line); color: var(--muted);
    box-shadow: 0 4px 12px rgba(0,0,0,.16); transition: background .14s, color .14s, border-color .14s;
  }
  .prod-nav .pn-item.active {
    background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
  }
}
/* 制品卡片：淘宝手机端风格 —— 图片顶边铺满、浅卡底、价格醒目 */
.prod-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 0; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 4px 14px rgba(44, 33, 19, .08);
  transition: transform .14s ease, box-shadow .14s ease;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(44, 33, 19, .16); }
.prod-media {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 0;
  overflow: hidden; background: #f1e8d6; border: none;
}
/* 图片统一为 1:1 封面铺满，像电商缩略图 */
.prod-media .prod-main {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #f1e8d6;
}
.prod-card .prod-info { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 6px; }
.prod-nophoto { display: grid; place-items: center; aspect-ratio: 1/1; color: var(--muted); font-size: 12px; }
.prod-del {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(15, 17, 21, .72); color: #fff; font-size: 13px; line-height: 1;
  display: grid; place-items: center; transition: background .15s;
}
.prod-del:hover { background: var(--accent); }
.prod-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; padding: 0 8px; }
.prod-thumb {
  width: 46px; height: 46px; border-radius: 7px; object-fit: cover; cursor: pointer;
  border: 1px solid var(--line); opacity: .65; transition: opacity .15s, border-color .15s;
}
.prod-thumb:hover { opacity: 1; }
.prod-thumb.active { opacity: 1; border-color: var(--accent2); }
.prod-name { font-size: 14px; line-height: 1.35; margin: 0; color: var(--text); }
.prod-name-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; }
.prod-name { flex: 1 1 100%; min-width: 0; margin: 0; }
/* 名称最多两行截断，像电商商品标题 */
.prod-name-row .prod-name { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod-name-row .prod-size { flex: 0 0 auto; white-space: nowrap; font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #f3ead9; border: 1px solid var(--line); color: var(--muted); }
.prod-price-inline { flex: 0 0 auto; white-space: nowrap; font-size: 13px; color: var(--accent2); font-weight: 600; margin-left: auto; }
/* G：制品卡底「左类别 / 右价格」信息行，细分隔线 */
.prod-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 2px;
}
.prod-foot-price { margin-left: auto; white-space: nowrap; font-size: 17px; font-weight: 800; color: var(--accent); }
.prod-foot-price i { font-size: 12px; font-style: normal; font-weight: 700; margin-right: 1px; }
.prod-size-row { margin-bottom: 8px; }
.prod-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.prod-tag {
  font-size: 12px; color: var(--muted); border: 1px solid var(--line);
  border-radius: 7px; padding: 2px 9px;
}
.prod-tag.prod-price { color: var(--accent2); border-color: var(--accent2); font-weight: 600; }

/* 左侧悬浮类别导航：贴边胶囊停靠条 */
.prod-sidebar {
  position: fixed; left: 16px; top: 50%; transform: translateY(-50%); z-index: 40;
  width: 132px; max-height: 78vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px; padding: 12px 10px;
  background: rgba(17, 20, 26, .72); border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px; backdrop-filter: blur(10px);
  box-shadow: 0 10px 34px rgba(0,0,0,.45);
}
.prod-sidebar .sb-title { font-size: 10px; letter-spacing: .14em; color: #cbbfa8; text-transform: uppercase; padding: 2px 6px; text-align: center; }
.prod-sidebar .sb-cat {
  text-align: center; padding: 9px 8px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #f3ead9;
  cursor: pointer; font-size: 13px; line-height: 1.25; font-family: inherit; font-weight: 500;
  transition: background .15s, border-color .15s, transform .12s, color .15s;
}
.prod-sidebar .sb-cat:hover { border-color: var(--accent); transform: translateX(3px); }
.prod-sidebar .sb-cat.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.3); }

/* 桌面端：显示悬浮导航、隐藏顶部筛选条，并给内容留左侧空间；移动端反之 */
@media (min-width: 900px) {
  #view-products { padding-left: 162px; }
  .prod-filter { display: none; }
}
@media (max-width: 899px) {
  .prod-sidebar { display: none; }
}

.prod-empty { color: var(--muted); font-size: 14px; padding: 30px 0; text-align: center; }

.prod-form {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; margin-bottom: 22px;
}
.pf-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.pf-row label {
  flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.pf-row input[type="text"], .pf-row input[type="password"], .pf-row select {
  background: var(--panel); border: 1px solid #d9c8a8; border-radius: 8px;
  padding: 9px 11px; color: var(--text); font-size: 13.5px; font-family: inherit;
}
.pf-row select { cursor: pointer; }
.pf-row input:focus, .pf-pw input:focus { outline: none; border-color: var(--accent); }
.pf-file { cursor: pointer; }
.pf-preview { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.pf-thumb { position: relative; width: 84px; height: 84px; }
.pf-thumb img {
  width: 84px; height: 84px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); display: block;
}
/* 已有照片底栏：上移 / 下移 / 删除 */
.pf-thumb-ctrls {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex;
  justify-content: center; gap: 4px; padding: 2px;
  background: rgba(15, 17, 21, .6); border-bottom-left-radius: 8px; border-bottom-right-radius: 8px;
}
.pf-thumb-ctrls button {
  border: none; background: rgba(255,255,255,.15); color: #fff; cursor: pointer;
  width: 22px; height: 20px; border-radius: 5px; font-size: 11px; line-height: 1;
  padding: 0; display: grid; place-items: center;
}
.pf-thumb-ctrls button:hover { background: rgba(255,255,255,.32); }
.pf-thumb-ctrls button:disabled { opacity: .3; cursor: default; }
.pf-thumb-ctrls .pf-thumb-del { position: static; width: 22px; height: 20px; border-radius: 5px; background: #e5484d; box-shadow: none; }
.pf-thumb-ctrls .pf-thumb-del:hover { background: #c93b40; }
.pf-existing { margin: 6px 0 4px; }
.pf-existing-title { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.pf-existing-list { display: flex; gap: 10px; flex-wrap: wrap; }
.pf-thumb.removed { opacity: .35; }
.pf-thumb.removed img { filter: grayscale(1); }
.pf-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pf-pw { flex: 1 1 160px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pf-pw input {
  background: var(--panel); border: 1px solid #d9c8a8; border-radius: 8px;
  padding: 9px 11px; color: var(--text); font-size: 13.5px; font-family: inherit;
}
.pf-submit {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; border: none; border-radius: 9px; padding: 10px 22px;
  font-size: 14px; cursor: pointer; font-weight: 600;
}
.pf-submit:hover { filter: brightness(1.08); }
.pf-cancel {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 9px; padding: 10px 18px; font-size: 13.5px; cursor: pointer;
}
.pf-cancel:hover { border-color: var(--accent); color: var(--accent); }
.pf-msg { margin-top: 10px; font-size: 13px; color: var(--accent2); min-height: 18px; }

/* ===== 管理模式：工具按钮组 / 上移下移 / 删除 ===== */
.prod-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.prod-add-cat {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 10px; padding: 7px 16px; font-size: 13.5px; cursor: pointer;
  transition: background .15s, color .15s;
}
.prod-add-cat:hover { background: var(--accent); color: #fff; }
.prod-admin-on {
  margin-left: auto; background: var(--panel); border: 1px dashed var(--line);
  color: var(--muted); border-radius: 10px; padding: 7px 16px; font-size: 13.5px; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.prod-admin-on:hover { border-color: var(--accent2); color: var(--accent2); }
.prod-admin-off {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 7px 16px; font-size: 13.5px; cursor: pointer;
}
.prod-admin-off:hover { border-color: var(--accent); color: var(--accent); }

.cat-controls, .prod-controls { display: inline-flex; gap: 4px; align-items: center; }
.cat-controls { margin-left: auto; }
.prod-controls {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(15, 17, 21, .55); border-radius: 8px; padding: 3px 5px; gap: 6px;
}
/* 删除按钮放在图片右上角，与右下角顺序按钮彻底分开，避免误点 */
.prod-media > .prod-del { position: absolute; top: 6px; right: 6px; box-shadow: 0 1px 5px rgba(0,0,0,.5); }
.ord-btn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font-size: 11px; line-height: 1;
  cursor: pointer; display: grid; place-items: center;
  transition: background .15s, border-color .15s, color .15s;
}
.ord-btn:hover:not(:disabled) { border-color: var(--accent2); color: var(--accent2); }
.ord-btn:disabled { opacity: .3; cursor: default; }
.del-btn {
  width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer;
  background: var(--card); color: var(--accent); font-size: 13px; line-height: 1;
  display: grid; place-items: center; transition: background .15s, color .15s;
}
.del-btn:hover { background: var(--accent); color: #fff; }

/* 类别 inline 改名 */
.cat-rename-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.cat-rename-input {
  flex: 1 1 200px; min-width: 140px; background: var(--panel); border: 1px solid var(--accent);
  border-radius: 8px; padding: 8px 11px; color: var(--text); font-size: 15px; font-family: inherit;
}
.cat-rename-save, .cat-rename-cancel {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer;
  background: transparent; color: var(--text); font-size: 13px; font-family: inherit;
}
.cat-rename-save { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-rename-save:hover { filter: brightness(1.1); }
.cat-rename-cancel:hover { border-color: var(--accent); }

.prod-empty.sub { padding: 14px 0; font-size: 13px; }
.pf-note { color: var(--muted); font-size: 13.5px; margin: 0; padding: 6px 2px; }


/* 灯箱：点击制品图片放大查看 */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.88); cursor: zoom-out;
  align-items: center; justify-content: center; padding: 24px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,.6); }

/* ===== 首页测验弹窗 ===== */
.quiz-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.quiz-modal[hidden] { display: none; }
.quiz-modal-backdrop { position: absolute; inset: 0; background: rgba(44,33,19,.55); backdrop-filter: blur(2px); }
.quiz-modal-card {
  position: relative; z-index: 1; width: min(720px, 100%);
  max-height: 90vh; overflow-y: auto;
  background: var(--bg); border: 2px solid var(--accent); border-radius: 18px;
  padding: 30px 26px 32px; box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.quiz-modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.quiz-modal-close:hover { border-color: var(--accent); color: var(--accent); }
.quiz-modal-back {
  display: inline-block; z-index: 3; margin: 0 0 14px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.quiz-modal-back:hover { border-color: var(--accent); color: var(--accent); }
body.modal-open { overflow: hidden; }
/* 弹窗内 quiz 铺满卡片宽度（去掉原页面的 640px 居中限制）*/
.quiz-modal .quiz { max-width: 100%; }
