﻿/* ============================================================
   家门春联 · 样式（中式红金 / 移动优先）
   ============================================================ */
:root {
  --red-deep: #5e0b0b;
  --red: #9c1414;
  --red-bright: #c02a1e;
  --gold: #e8c98a;
  --gold-dim: #b08a52;
  --gold-soft: rgba(232, 201, 138, .28);
  --ink: #f7efe0;
  --ink-dim: rgba(247, 239, 224, .62);
  --card: rgba(255, 244, 230, .045);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", "Source Han Serif SC", "Microsoft YaHei", serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: #3d0808;
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(120% 70% at 50% -10%, #8d1a1a 0%, #5e0b0b 45%, #350606 100%),
    repeating-linear-gradient(45deg, rgba(255, 225, 180, .022) 0 2px, transparent 2px 5px);
  background-attachment: fixed;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 40px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

/* ---------- 头部 ---------- */
.hero {
  text-align: center;
  padding: 34px 0 20px;
  position: relative;
}
.hero-seal {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold-dim);
  border-radius: 4px;
  color: var(--gold);
  font-size: 22px;
  background: rgba(180, 30, 24, .35);
  box-shadow: 0 0 0 3px rgba(232, 201, 138, .08);
}
.hero h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .34em;
  text-indent: .34em;
  color: #fdf3d8;
  text-shadow: 0 2px 14px rgba(255, 190, 120, .28);
}
.hero-sub {
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--ink-dim);
}
.hero-line {
  width: 84px; height: 1px;
  margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  padding: 18px 16px 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(2px);
}
.card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.card-head.compact { margin-bottom: 12px; }
.num {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  font-size: 13px;
  color: var(--gold);
}
.card h2 {
  margin: 2px 0 4px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #fbeed0;
}
.sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-dim);
}

/* ---------- 拍照区 ---------- */
.photo-zone {
  position: relative;
  border: 1px dashed rgba(232, 201, 138, .45);
  border-radius: 12px;
  min-height: 152px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(255, 230, 200, .018) 0 8px, transparent 8px 16px);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.photo-zone:active { border-color: var(--gold); }
.photo-empty { text-align: center; padding: 22px; }
.cam-icon {
  font-size: 30px;
  color: var(--gold-dim);
  line-height: 1;
  margin-bottom: 10px;
}
.photo-tip { font-size: 14px; color: var(--ink); letter-spacing: .08em; }
.photo-hint { margin-top: 8px; font-size: 11.5px; color: var(--ink-dim); }

.photo-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}
.photo-btn {
  padding: 9px 20px;
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: .1em;
  color: #4a1010;
  background: linear-gradient(180deg, #f2d9a4, #d8b273);
  border: 1px solid #f2d9a4;
  border-radius: 20px;
  cursor: pointer;
}
.photo-btn.ghost {
  color: var(--gold);
  background: transparent;
  border-color: rgba(232, 201, 138, .4);
}
.photo-btn:active { transform: translateY(1px); }

.exif-note {
  margin: 10px 0 0;
  padding: 9px 12px;
  font-size: 11.5px;
  line-height: 1.7;
  border-radius: 8px;
  border-left: 2px solid var(--gold-dim);
  background: rgba(0, 0, 0, .16);
  color: rgba(247, 239, 224, .66);
}
.exif-note[data-state="ok"] {
  color: #a9e8bc;
  border-left-color: #5fbf80;
  background: rgba(60, 160, 100, .1);
}
.exif-note[data-state="partial"] {
  color: #f0d69a;
  border-left-color: #d3a85c;
  background: rgba(200, 160, 80, .1);
}
.photo-preview { position: relative; width: 100%; }
.photo-preview img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}
.retake {
  position: absolute;
  right: 10px; top: 10px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--serif);
  color: #fdf3d8;
  background: rgba(0, 0, 0, .55);
  border: 1px solid var(--gold-dim);
  border-radius: 20px;
  cursor: pointer;
}

/* ---------- 表单 ---------- */
.field-label {
  margin: 18px 0 9px;
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid rgba(232, 201, 138, .14);
}
.field > span {
  flex: 0 0 76px;
  font-size: 13.5px;
  color: var(--ink-dim);
  letter-spacing: .06em;
}
.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15.5px;
  letter-spacing: .04em;
  padding: 4px 0;
}
.field input::placeholder { color: rgba(247, 239, 224, .3); }
/* 让原生日期/时间控件的图标适配深色 */
.field input[type="date"], .field input[type="time"] { color-scheme: dark; }

.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-dim);
  line-height: 1.5;
  cursor: pointer;
}
.checkbox input { accent-color: #b8322a; width: 15px; height: 15px; }

/* ---------- 胶囊按钮组 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .05em;
  color: var(--ink-dim);
  background: rgba(255, 240, 220, .04);
  border: 1px solid rgba(232, 201, 138, .22);
  border-radius: 20px;
  cursor: pointer;
  transition: all .18s;
}
.chip.on {
  color: #4a1010;
  background: linear-gradient(180deg, #f0d49b, #d9b271);
  border-color: #f0d49b;
  font-weight: 600;
}

/* ---------- 罗盘 ---------- */
.sensor-badge {
  font-size: 11px;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 10px;
  color: var(--ink-dim);
  background: rgba(255, 240, 220, .06);
  border: 1px solid rgba(232, 201, 138, .16);
}
.sensor-badge.live { color: #9de3b0; border-color: rgba(120, 220, 150, .35); }

.compass {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 2px;
}
.dir-btn {
  padding: 13px 4px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .1em;
  color: var(--ink-dim);
  background: rgba(255, 240, 220, .035);
  border: 1px solid rgba(232, 201, 138, .18);
  border-radius: 9px;
  cursor: pointer;
  transition: all .18s;
}
.dir-btn:active { transform: scale(.97); }
.dir-btn.on {
  color: #4a1010;
  background: linear-gradient(180deg, #f0d49b, #d9b271);
  border-color: #f6dfae;
  font-weight: 700;
}
.dir-btn.sensor {
  box-shadow: 0 0 0 1px rgba(140, 230, 170, .6), 0 0 14px rgba(120, 220, 150, .25);
}
.compass-core {
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 6px 2px;
  border: 1px solid rgba(232, 201, 138, .2);
  border-radius: 9px;
  background: radial-gradient(circle at 50% 50%, rgba(200, 50, 40, .35), rgba(90, 12, 12, .2));
}
.core-label { font-size: 10px; color: var(--ink-dim); letter-spacing: .1em; }
.core-value { font-size: 17px; color: #ffe9b8; font-weight: 600; letter-spacing: .06em; }
.core-deg { font-size: 9.5px; color: var(--ink-dim); }

.dir-hint {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.door-desc {
  margin: 9px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: rgba(247, 239, 224, .5);
}

/* ---------- 按钮 ---------- */
.primary-btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .4em;
  text-indent: .4em;
  color: #4a1010;
  background: linear-gradient(180deg, #f4dba8, #d8ae6b);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(200, 120, 40, .22), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: transform .15s, box-shadow .2s;
}
.primary-btn:active { transform: translateY(1px); box-shadow: 0 4px 12px rgba(200, 120, 40, .2); }
.primary-btn.small {
  width: auto;
  flex: 1;
  margin-top: 0;
  padding: 12px;
  font-size: 14.5px;
  letter-spacing: .18em;
  text-indent: .18em;
}
.ghost-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(232, 201, 138, .35);
  border-radius: 9px;
  cursor: pointer;
}
.ghost-btn.small { width: auto; flex: 1; margin-top: 0; padding: 12px; font-size: 13.5px; }
.ghost-btn:active { background: rgba(232, 201, 138, .08); }
.link-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 6px;
  font-family: var(--serif);
  font-size: 12px;
  color: rgba(247, 239, 224, .42);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- 命理提要 ---------- */
.summary-card { background: rgba(255, 240, 220, .06); }
.pillars {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin: 4px 0 16px;
}
.pillar {
  flex: 1;
  text-align: center;
  padding: 9px 2px 8px;
  border: 1px solid rgba(232, 201, 138, .2);
  border-radius: 8px;
  background: rgba(0, 0, 0, .12);
}
.pillar .plabel { font-size: 10px; color: var(--ink-dim); letter-spacing: .08em; }
.pillar .pchars {
  margin-top: 5px;
  font-size: 19px;
  line-height: 1.25;
  color: #ffe9b8;
  letter-spacing: .04em;
}

.wx-bars { display: grid; gap: 7px; margin-bottom: 16px; }
.wx-row { display: grid; grid-template-columns: 22px 1fr 42px; align-items: center; gap: 8px; }
.wx-name { font-size: 12.5px; color: var(--gold); text-align: center; }
.wx-track {
  height: 7px;
  border-radius: 4px;
  background: rgba(255, 240, 220, .09);
  overflow: hidden;
}
.wx-fill {
  height: 100%;
  min-width: 2px;
  border-radius: 4px;
  background: linear-gradient(90deg, #b8322a, #e0b96f);
  width: 0;
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.wx-fill.xi { background: linear-gradient(90deg, #e8c98a, #fff0c4); box-shadow: 0 0 10px rgba(240, 210, 140, .5); }
.wx-pct { font-size: 11px; color: var(--ink-dim); text-align: right; }

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.sg-item {
  padding: 10px 11px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .14);
  border: 1px solid rgba(232, 201, 138, .12);
}
.sg-k { font-size: 10.5px; color: var(--ink-dim); letter-spacing: .08em; }
.sg-v { margin-top: 4px; font-size: 14px; color: #fbeed0; letter-spacing: .04em; }
.sg-v.gold { color: #ffdf9e; font-weight: 600; }
.sg-item.wide { grid-column: 1 / -1; }

/* ---------- 春联展示 ---------- */
.section-title {
  text-align: center;
  margin: 26px 0 14px;
  font-size: 14px;
  letter-spacing: .5em;
  text-indent: .5em;
  color: var(--gold);
  position: relative;
}
.section-title::before, .section-title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 46px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.section-title::before { left: 12%; }
.section-title::after { right: 12%; transform: scaleX(-1); }

.couplet-card {
  background: linear-gradient(180deg, rgba(255, 240, 220, .07), rgba(255, 240, 220, .03));
  border: 1px solid var(--gold-soft);
  border-radius: 14px;
  padding: 16px 14px 18px;
  margin-bottom: 14px;
}
.cp-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--ink-dim);
  letter-spacing: .06em;
}
.cp-rank {
  padding: 2px 8px;
  border-radius: 8px;
  color: #4a1010;
  background: linear-gradient(180deg, #edd39c, #cfa966);
  font-weight: 700;
}
.cp-wx {
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px solid rgba(232, 201, 138, .3);
  color: var(--gold);
}

/* 竖排春联画面 */
.cp-visual {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 8px 0 6px;
}
.hp-bar {
  padding: 8px 22px;
  border-radius: 4px;
  background: linear-gradient(180deg, #c53022, #a01a15);
  border: 1px solid #e8c98a;
  color: #ffe9b8;
  font-size: 15px;
  letter-spacing: .32em;
  text-indent: .32em;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .35);
}
.pair-row {
  display: flex;
  flex-direction: row-reverse;
  gap: 14px;
  justify-content: center;
  align-items: flex-start;
}
.strip {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 20px 13px;
  min-height: 0;
  font-size: 21px;
  line-height: 1.55;
  letter-spacing: .24em;
  color: #ffe9b8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .07), transparent 30%),
    linear-gradient(180deg, #c9301f, #9b1410);
  border: 1px solid #e3c07b;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .38), inset 0 0 22px rgba(120, 0, 0, .5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.strip.len5 { font-size: 25px; padding: 22px 15px; }
.strip.len7 { font-size: 20px; }

.cp-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.copy-btn {
  padding: 6px 15px;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(232, 201, 138, .32);
  border-radius: 16px;
  cursor: pointer;
}
.copy-btn:active { background: rgba(232, 201, 138, .1); }

/* 释义折叠：默认收起，点是展开 */
.cp-more {
  margin-top: 14px;
  border-top: 1px solid rgba(232, 201, 138, .16);
}
.cp-more > summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 2px 1px;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.cp-more > summary::-webkit-details-marker { display: none; }
.cp-more > summary::before {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--gold-dim);
  border-bottom: 1.5px solid var(--gold-dim);
  transform: rotate(-45deg);
  transition: transform .2s;
  margin-top: -2px;
}
.cp-more[open] > summary { color: #ffe9b8; }
.cp-more[open] > summary::before { transform: rotate(45deg); margin-top: 2px; }

.cp-reasons {
  margin: 8px 0 0;
  padding: 0 0 4px 12px;
  list-style: none;
}
.cp-reasons li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.75;
  color: rgba(247, 239, 224, .74);
}
.cp-reasons li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--gold-dim);
}

.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions-bottom { margin: 20px 0 4px; }

.note {
  margin-top: 22px;
  padding: 14px;
  font-size: 11px;
  line-height: 1.85;
  color: rgba(247, 239, 224, .38);
  border-left: 2px solid rgba(232, 201, 138, .25);
  background: rgba(0, 0, 0, .14);
  border-radius: 0 8px 8px 0;
}

.foot {
  text-align: center;
  margin-top: 26px;
  font-size: 10.5px;
  letter-spacing: .14em;
  color: rgba(247, 239, 224, .22);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 46px;
  transform: translate(-50%, 20px);
  max-width: 82vw;
  padding: 10px 18px;
  font-size: 13px;
  color: #4a1010;
  background: linear-gradient(180deg, #f2d9a4, #d8b273);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 99;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 480px) {
  .hero h1 { font-size: 34px; }
  .cp-v { font-size: 19px; }
}

/* 为什么你家的联必须单独算：一句话 + 例子 + 典据 */
.creed {
  margin: 0 0 16px;
  padding: 16px 16px 14px;
  border-radius: 12px;
  border: 1px solid rgba(232, 201, 138, .22);
  border-left: 3px solid var(--gold-dim);
  background: linear-gradient(180deg, rgba(255, 240, 220, .06), rgba(255, 240, 220, .02));
}
.creed-main {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.8;
  letter-spacing: .04em;
  font-weight: 600;
  color: #ffe9b8;
}
.creed-eg {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.85;
  color: rgba(247, 239, 224, .74);
}
.creed-fu {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(232, 201, 138, .1);
  border: 1px solid rgba(232, 201, 138, .2);
  font-size: 12.5px;
  line-height: 1.8;
  color: #ffdf9e;
  letter-spacing: .02em;
}
.creed-src {
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px dashed rgba(232, 201, 138, .18);
  font-size: 11px;
  line-height: 1.9;
  color: rgba(247, 239, 224, .46);
}

/* ============================================================
   赠联 / 支付 / 弹窗
   ============================================================ */

/* 关键：作者样式里的 display 会覆盖 UA 的 [hidden]，统一兜底 */
[hidden] { display: none !important; }

/* 选填标记 */
.opt-tag {
  font-size: 10.5px;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 8px;
  color: var(--ink-dim);
  background: rgba(255, 240, 220, .07);
  border: 1px solid rgba(232, 201, 138, .18);
}

/* 按钮上的价格 */
.primary-btn { position: relative; }
.btn-price {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  letter-spacing: .02em;
  font-weight: 600;
  opacity: .72;
}

/* 朋友通过赠联进来的横幅 */
.gift-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(232, 201, 138, .45);
  background: linear-gradient(135deg, rgba(200, 60, 40, .3), rgba(120, 20, 16, .25));
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.gb-icon {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 17px;
  background: rgba(180, 30, 24, .35);
}
.gb-title { font-size: 14px; color: #ffe9b8; letter-spacing: .06em; }
.gb-sub { margin-top: 4px; font-size: 11.5px; color: var(--ink-dim); line-height: 1.5; }

/* 赠联卡片 */
.gift-card {
  margin-top: 18px;
  border-color: rgba(232, 201, 138, .4);
  background: linear-gradient(180deg, rgba(255, 240, 220, .08), rgba(255, 240, 220, .03));
}
.gift-card .card-head .num {
  border-radius: 6px;
  font-size: 12px;
}
.gift-result { margin-top: 14px; }
.gift-link {
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .22);
  border: 1px solid rgba(232, 201, 138, .2);
  color: var(--gold);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
  font-family: ui-monospace, Consolas, monospace;
}
.gift-tip {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(247, 239, 224, .45);
}

/* 支付弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px 20px;
}
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 2, 2, .68);
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 330px;
  padding: 24px 20px 18px;
  border-radius: 16px;
  text-align: center;
  border: 1px solid rgba(232, 201, 138, .55);
  background: linear-gradient(180deg, #7a1414, #4e0a0a);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
  animation: pop .22s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal-seal {
  width: 38px; height: 38px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold-dim);
  border-radius: 5px;
  color: var(--gold);
  font-size: 19px;
  background: rgba(180, 30, 24, .4);
}
.modal-card h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .1em;
  color: #fdf3d8;
}
.modal-sub {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-dim);
}
.price {
  margin: 16px 0 6px;
  color: #ffdf9e;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: .02em;
  text-shadow: 0 2px 16px rgba(255, 200, 120, .3);
}
.price .cur {
  font-size: 22px;
  margin-right: 3px;
  vertical-align: 8px;
  opacity: .85;
}
.modal-card .primary-btn { margin-top: 10px; }
.modal-card .ghost-btn { margin-top: 10px; }
.modal-card .link-btn { margin-top: 8px; }
.modal-note {
  margin: 12px 0 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(247, 239, 224, .38);
}

/* ============================================================
   开场动画：开门见联
   ============================================================ */
.scene {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 80% at 50% 30%, #6d1414 0%, #340606 70%, #1d0303 100%);
  overflow: hidden;
}
.scene-box {
  position: relative;
  width: 300px;
  height: 380px;
  perspective: 900px;
}

/* 门框 */
.door-frame {
  position: absolute;
  inset: 0;
  border: 3px solid #b08a52;
  border-radius: 4px;
  box-shadow: 0 0 0 6px rgba(176, 138, 82, .12), inset 0 0 40px rgba(0, 0, 0, .6);
  overflow: hidden;
  background: #2a0505;
}
/* 门内景象（春联） */
.door-inside {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  opacity: 0;
  animation: insideIn .6s ease-out 1.15s forwards;
}
@keyframes insideIn { to { opacity: 1; } }

.inside-hp {
  align-self: start;
  margin-top: 6px;
  padding: 4px 14px;
  background: linear-gradient(180deg, #c53022, #a01a15);
  border: 1px solid #e8c98a;
  border-radius: 3px;
  color: #ffe9b8;
  font-size: 13px;
  letter-spacing: .28em;
  text-indent: .28em;
  transform: translateY(-14px);
  opacity: 0;
  animation: dropIn .5s ease-out 1.5s forwards;
}
@keyframes dropIn { to { transform: none; opacity: 1; } }

.inside-pair {
  display: flex;
  flex-direction: row-reverse;
  gap: 12px;
  margin-top: 10px;
}
.inside-strip {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 16px 8px;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: .18em;
  color: #ffe9b8;
  background: linear-gradient(180deg, #c9301f, #9b1410);
  border: 1px solid #e3c07b;
  border-radius: 2px;
  transform-origin: top center;
  transform: scaleY(.02);
  opacity: 0;
  animation: unroll .55s cubic-bezier(.2,.8,.2,1) forwards;
}
.inside-strip:nth-child(1) { animation-delay: 1.75s; }
.inside-strip:nth-child(2) { animation-delay: 1.95s; }
@keyframes unroll { to { transform: scaleY(1); opacity: 1; } }

/* 两扇门 */
.door-leaf {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05), transparent 25%),
    linear-gradient(180deg, #8e1a12, #5e0d09);
  box-shadow: inset 0 0 30px rgba(0,0,0,.5);
  backface-visibility: hidden;
  animation-duration: .95s;
  animation-timing-function: cubic-bezier(.5,.05,.2,1);
  animation-delay: .25s;
  animation-fill-mode: forwards;
}
.door-leaf.left {
  left: 0;
  transform-origin: left center;
  border-right: 1px solid #3a0606;
  animation-name: openLeft;
}
.door-leaf.right {
  right: 0;
  transform-origin: right center;
  border-left: 1px solid #3a0606;
  animation-name: openRight;
}
@keyframes openLeft { to { transform: rotateY(-96deg); } }
@keyframes openRight { to { transform: rotateY(96deg); } }

/* 门钉装饰 */
.door-nail {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d49b, #8a6a33);
  opacity: .85;
}

/* 印章 */
.scene-seal {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid #e8c98a;
  border-radius: 4px;
  background: rgba(190, 35, 25, .92);
  color: #ffe9b8;
  font-size: 22px;
  opacity: 0;
  transform: scale(2.4) rotate(-18deg);
  animation: stamp .4s cubic-bezier(.3,1.4,.5,1) 2.45s forwards;
}
@keyframes stamp {
  to { opacity: 1; transform: scale(1) rotate(-6deg); }
}

/* 文案与跳过 */
.scene-cap {
  position: absolute;
  left: 0; right: 0;
  bottom: -66px;
  text-align: center;
  font-size: 15px;
  letter-spacing: .08em;
  color: #ffe9b8;
  opacity: 0;
  animation: fadeUp .6s ease-out 2.2s forwards;
}
.scene-sub {
  margin-top: 8px;
  font-size: 11.5px;
  color: rgba(247, 239, 224, .55);
  letter-spacing: .04em;
}
@keyframes fadeUp { to { opacity: 1; } }

.scene-skip {
  position: absolute;
  top: 16px; right: 16px;
  padding: 6px 14px;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-dim);
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(232, 201, 138, .3);
  border-radius: 16px;
  cursor: pointer;
}
.scene.closing { animation: sceneOut .34s ease-in forwards; }
@keyframes sceneOut { to { opacity: 0; visibility: hidden; } }

/* 尊重系统"减少动态效果"设置 */
@media (prefers-reduced-motion: reduce) {
  .door-leaf, .inside-strip, .inside-hp, .door-inside, .scene-seal, .scene-cap {
    animation-duration: .01s !important;
    animation-delay: 0s !important;
  }
}

/* 门内暖光：像望向屋里的灯火 */
.door-inside {
  background: radial-gradient(72% 62% at 50% 46%, rgba(255, 198, 120, .18), rgba(255, 170, 90, .05) 55%, rgba(0, 0, 0, 0) 78%);
}

.sign-row { display: flex; gap: 8px; margin: 4px 0 12px; }
.sign-row input {
  flex: 1; min-width: 0;
  padding: 10px 12px;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--ink);
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(232, 201, 138, .22);
  border-radius: 9px;
  outline: none;
}
.sign-row input::placeholder { color: rgba(247, 239, 224, .3); }
#posterBtn { margin-top: 10px; }

/* ============================================================
   贴春联布局：横批居中，上联在右、下联在左，中间留门洞
   ============================================================ */
.door-wall {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wall-hp {
  padding: 8px 26px;
  background: linear-gradient(180deg, #c53022, #a01a15);
  border: 1px solid #f0d49b;
  border-radius: 3px;
  color: #ffe9b8;
  font-size: 15px;
  letter-spacing: .3em;
  text-indent: .3em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
  transform: translateY(-16px);
  opacity: 0;
  animation: hpDrop .55s cubic-bezier(.2,.8,.2,1) .2s forwards;
}
@keyframes hpDrop { to { transform: none; opacity: 1; } }

.wall-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;              /* 中间留出的门洞宽度感 */
  margin-top: 14px;
}
.wall-strip {
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 16px 9px;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: .2em;
  color: #ffe9b8;
  background: linear-gradient(180deg, #c9301f, #9b1410);
  border: 1px solid #e3c07b;
  border-radius: 2px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .4), inset 0 0 20px rgba(120, 0, 0, .5);
  transform: translateY(-26px);
  opacity: 0;
  animation: stripDrop .5s cubic-bezier(.2,.8,.2,1) forwards;
}
#sceneUp { animation-delay: .55s; }      /* 先贴右(上联) */
#sceneDown { animation-delay: .8s; }     /* 再贴左(下联) */
@keyframes stripDrop { to { transform: none; opacity: 1; } }

.wall-door {
  position: relative;
  width: 116px;
  height: 300px;
  margin-top: 26px;
  border: 2px solid #6d4a22;
  border-radius: 2px;
  background: #240404;
  overflow: hidden;
  box-shadow: inset 0 0 26px rgba(0, 0, 0, .8);
}
.wall-door .door-leaf {
  position: absolute;
  top: 0; bottom: 0;
  width: 50%;
  background: linear-gradient(180deg, #8e1a12, #5e0d09);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .5);
  animation-duration: 1s;
  animation-timing-function: cubic-bezier(.5,.05,.2,1);
  animation-delay: 1.35s;
  animation-fill-mode: forwards;
}
.wall-door .door-leaf.left { left: 0; transform-origin: left center; animation-name: openLeft; }
.wall-door .door-leaf.right { right: 0; transform-origin: right center; animation-name: openRight; }
.door-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(65% 55% at 50% 48%, rgba(255, 198, 120, .22), rgba(255, 170, 90, .06) 60%, rgba(0,0,0,0) 80%);
  opacity: 0;
  animation: glowIn .7s ease-out 1.5s forwards;
}
@keyframes glowIn { to { opacity: 1; } }

.wall-door .scene-seal {
  position: absolute;
  right: 6px; bottom: 8px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1.5px solid #ffe9b8;
  border-radius: 3px;
  background: rgba(200, 40, 30, .92);
  color: #ffe9b8;
  font-size: 16px;
  opacity: 0;
  transform: scale(2.2) rotate(-16deg);
  animation: stamp .4s cubic-bezier(.3,1.4,.5,1) 2.1s forwards;
}

/* 让横批的两头正对上下联：容器定宽，横批满宽，两联分贴两端 */
.door-wall {
  width: 272px;
}
.wall-hp {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}
.wall-row {
  width: 100%;
  justify-content: space-between;
  gap: 0;
}

/* 按手绘图：横批在上，上下联分列两端，中间留空 */
.door-wall {
  width: 300px;
  position: relative;
}
.wall-gap { flex: 1 1 auto; }
.door-wall .scene-seal {
  position: absolute;
  right: -6px;
  bottom: -14px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1.5px solid #ffe9b8;
  border-radius: 3px;
  background: rgba(200, 40, 30, .92);
  color: #ffe9b8;
  font-size: 19px;
  opacity: 0;
  transform: scale(2.2) rotate(-16deg);
  animation: stamp .4s cubic-bezier(.3,1.4,.5,1) 1.9s forwards;
}

/* 印章移到两联下方，不压字 */
.door-wall .scene-seal {
  right: 0;
  bottom: -74px;
}

/* ============================================================
   高级感日期/时辰选择
   ============================================================ */
.field.pick {
  position: relative;
  cursor: pointer;
}
.field.pick > input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.pick-val {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #ffe9b8;
  font-variant-numeric: tabular-nums;
}
.pick-arrow {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-right: 1.5px solid var(--gold-dim);
  border-bottom: 1.5px solid var(--gold-dim);
  transform: rotate(45deg) translateY(-2px);
  opacity: .8;
}
.field.pick:active .pick-val { color: #fff3d0; }

/* ============================================================
   年礼卡：对称构图 + 帘幕触碰
   ============================================================ */
.stage {
  position: relative;
  width: 320px;
  height: 540px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}
.reveal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(110% 80% at 50% 42%, #a8201a 0%, #7d0f0c 55%, #4d0806 100%);
}
.stage-hp {
  width: 172px;
  padding: 9px 0;
  text-align: center;
  background: linear-gradient(180deg, #c53022, #a01a15);
  border: 1px solid #f2d9a4;
  border-radius: 3px;
  color: #ffe9b8;
  font-size: 16px;
  letter-spacing: .26em;
  text-indent: .26em;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .45);
}
.stage-pair {
  display: flex;
  gap: 176px;
  align-items: flex-start;
}
.stage-strip {
  writing-mode: vertical-rl;
  text-orientation: upright;
  width: 56px;
  box-sizing: border-box;
  padding: 18px 0;
  text-align: center;
  font-size: 20px;
  line-height: 1.34;
  letter-spacing: .18em;
  color: #ffe9b8;
  background: linear-gradient(180deg, #c9301f, #9b1410);
  border: 1px solid #e3c07b;
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .42), inset 0 0 22px rgba(120, 0, 0, .5);
}
.stage-foot {
  text-align: center;
  margin-top: 4px;
}
.foot-sign {
  font-size: 17px;
  color: #fff2d2;
  letter-spacing: .08em;
}
.foot-sign b { font-weight: 600; }
.foot-wx {
  margin-top: 5px;
  font-size: 11.5px;
  color: rgba(246, 226, 180, .6);
}
.foot-bless {
  margin-top: 9px;
  font-size: 14px;
  color: #ffdf9e;
  letter-spacing: .06em;
}
.stage-seal {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1.5px solid #ffe9b8;
  border-radius: 3px;
  background: rgba(200, 40, 30, .92);
  color: #ffe9b8;
  font-size: 18px;
  transform: rotate(-6deg);
}

/* 帘幕 */
.curtain {
  position: absolute;
  top: 0; bottom: 0;
  width: 51%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #9c1b12, #6a0c08 70%, #4a0705);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .55);
  transition: transform .85s cubic-bezier(.55,.05,.25,1);
  z-index: 3;
}
.curtain.left { left: 0; border-right: 1px solid rgba(240, 212, 155, .35); }
.curtain.right { right: 0; border-left: 1px solid rgba(240, 212, 155, .35); }

.stage.open .curtain.left { transform: translateX(-101%); }
.stage.open .curtain.right { transform: translateX(101%); }

.curtain-hint {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 13px;
  letter-spacing: .3em;
  text-indent: .3em;
  color: rgba(246, 226, 180, .85);
  z-index: 4;
  animation: hintPulse 2.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes hintPulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.stage.open .curtain-hint { opacity: 0; transition: opacity .3s; animation: none; }

.stage-seal, .stage-hp, .stage-strip { opacity: 0; }
.stage.open .stage-hp { animation: hpIn .5s ease-out .5s forwards; }
.stage.open .stage-strip { animation: stripIn .5s ease-out forwards; }
.stage.open #sceneUp { animation-delay: .85s; }
.stage.open #sceneDown { animation-delay: 1.05s; }
.stage.open .stage-foot { opacity: 0; animation: footIn .6s ease-out 1.35s forwards; }
.stage.open .stage-seal { animation: stampIn .4s cubic-bezier(.3,1.4,.5,1) 1.6s forwards; }
@keyframes hpIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes stripIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
@keyframes footIn { to { opacity: 1; } }
@keyframes stampIn { from { opacity: 0; transform: scale(2.2) rotate(-16deg); } to { opacity: 1; transform: rotate(-6deg); } }

/* ============================================================
   第三版修正：横批贴字 / 两联居中 / 字距拉长 / 祥云底纹
   ============================================================ */
/* 横批：不再固定宽度，改为贴住文字，两侧留白减半 */
.stage-hp {
  width: auto;
  padding: 9px 20px;
  letter-spacing: .38em;
  text-indent: .38em;
}
/* 两联：整体居中，间距收紧到横批跨度附近 */
.stage-pair {
  gap: 128px;
  justify-content: center;
  width: 100%;
}
/* 竖排居中关键：line-height 等于条宽，单列正好填满 */
.stage-strip {
  width: 56px;
  line-height: 56px;
  padding: 20px 0;
  letter-spacing: .34em;
  text-align: center;
}
/* 红底加祥云（SVG 平铺，低透明度） */
.reveal {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23f2d9a4' stroke-opacity='0.10' stroke-width='1.1'%3E%3Cpath d='M22 66c-7 0-12-5-12-11s5-11 12-11c1-8 8-14 16-14 8 0 15 5 16 12 3-2 6-3 9-3 8 0 14 6 14 14 0 7-6 13-14 13H22z'/%3E%3Cpath d='M84 118c-5 0-9-4-9-8s4-8 9-8c1-6 6-10 12-10 5 0 10 3 12 8 2-1 4-1 6-1 5 0 9 4 9 9s-4 9-9 9H84z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(110% 80% at 50% 42%, #a8201a 0%, #7d0f0c 55%, #4d0806 100%);
  background-size: 140px 140px, cover;
  background-repeat: repeat, no-repeat;
}

/* 横批与两联之间留出安全间距，避免压住联条 */
.stage-pair { gap: 160px; }

.music-btn {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  color: rgba(246, 226, 180, .75);
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(240, 212, 155, .35);
  border-radius: 50%;
  z-index: 6;
  cursor: pointer;
}
.music-btn.on {
  color: #4a1010;
  background: linear-gradient(180deg, #f0d49b, #d9b271);
  border-color: #f0d49b;
}

.voice-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.voice-row .ghost-btn { margin-top: 0; flex: 0 0 auto; }
.voice-tip { font-size: 11px; color: rgba(247,239,224,.45); }
.voice-tip.rec { color: #ff8a6a; }
.voice-tip.done { color: #a9e8bc; }

.voice-block { margin-top: 10px; }
.voice-script {
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(247,239,224,.72);
  background: rgba(0,0,0,.18);
  border-left: 2px solid rgba(232,201,138,.4);
  border-radius: 0 8px 8px 0;
}
.voice-script b { color: #ffe9b8; font-weight: 600; }

.gif-preview { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; }
.gp-mask { position: absolute; inset: 0; background: rgba(12,2,2,.78); backdrop-filter: blur(2px); }
.gp-card {
  position: relative; width: 82vw; max-width: 320px; padding: 16px;
  border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, #7a1414, #4e0a0a);
  border: 1px solid rgba(232,201,138,.55);
  box-shadow: 0 20px 50px rgba(0,0,0,.6);
}
.gp-title { font-size: 13px; color: #ffe9b8; letter-spacing: .08em; margin-bottom: 10px; }
.gp-img { width: 100%; border-radius: 8px; display: block; }
.gp-size { margin: 8px 0 12px; font-size: 11px; color: rgba(247,239,224,.55); }

/* 收起按钮：移到画面下方居中，拇指可及 */
.scene-skip {
  top: auto;
  right: auto;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 12px 44px;
  font-size: 15px;
  letter-spacing: .12em;
  border-radius: 26px;
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(232,201,138,.45);
  color: #ffe9b8;
}

.scene-actions {
  position: absolute;
  left: 0; right: 0;
  bottom: 26px;
  display: flex;
  justify-content: center;
  gap: 14px;
  z-index: 8;
}
.scene-skip, .scene-share {
  position: static;
  transform: none;
  padding: 12px 30px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .1em;
  border-radius: 26px;
  cursor: pointer;
}
.scene-share {
  color: #4a1010;
  background: linear-gradient(180deg, #f0d49b, #d9b271);
  border: 1px solid #f2d9a4;
  font-weight: 600;
}
.scene-skip {
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(232,201,138,.45);
  color: #ffe9b8;
}

#adminDot {
  position: fixed;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-size: 13px;
  font-family: var(--serif), serif;
  color: rgba(232, 201, 138, .30);
  border: 1px solid rgba(232, 201, 138, .12);
  border-radius: 50%;
  z-index: 50;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: default;
}
#adminDot:active { color: rgba(232, 201, 138, .8); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip-row.sub .chip { font-size: 12px; padding: 6px 12px; opacity: .92; }

.dp-row { display: flex; gap: 10px; margin-top: 10px; }
.dp-btn {
  flex: 1;
  padding: 12px 8px;
  font-size: 15px;
  font-family: var(--serif), serif;
  color: #ffe9b8;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(232,201,138,.4);
  border-radius: 10px;
  cursor: pointer;
}
.dp-btn.on { background: linear-gradient(180deg,#c9301f,#9b1410); border-color: #f2d9a4; }
.dp-panel {
  margin-top: 10px;
  max-height: 232px;
  overflow-y: auto;
  padding: 10px;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(232,201,138,.25);
  border-radius: 10px;
}
.dp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.dp-cell {
  padding: 10px 4px;
  font-size: 14px;
  color: #e8dcc8;
  background: rgba(255,255,255,.05);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}
.dp-cell.on { background: linear-gradient(180deg,#c9301f,#9b1410); color: #ffe9b8; border-color: #f2d9a4; }


/* 升级版祥云底纹 */
.reveal {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23f2d9a4' stroke-opacity='0.14' stroke-width='1.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M28 62c-8-1-13-8-11-16 2-7 9-11 16-9 2-8 10-13 18-11 6 1 10 5 12 10 3-2 7-3 11-2 8 2 13 10 11 18-1 6-6 10-12 11'/%3E%3Cpath d='M62 63c6 0 12-2 16-6 3 5 2 12-3 15-4 3-10 2-13-2'/%3E%3Cpath d='M30 63c4 4 10 6 16 6 6 0 11-2 15-5'/%3E%3Cpath d='M126 30c-6-1-10-6-9-12 1-6 7-9 12-8 2-6 8-9 14-8 5 1 8 4 9 8 3-1 6-1 8 1 6 3 8 10 5 15'/%3E%3Cpath d='M126 31c4 3 10 4 15 2'/%3E%3Cpath d='M44 148c-9-1-15-9-12-18 2-8 10-12 18-10 2-9 11-15 20-12 7 1 12 6 14 12 4-2 8-2 12-1 9 2 14 11 12 20-1 7-7 12-14 13'/%3E%3Cpath d='M92 150c7 0 13-2 18-7 3 6 1 13-4 17-5 3-12 2-15-3'/%3E%3Cpath d='M46 149c5 5 12 7 19 7 6 0 12-2 17-6'/%3E%3Cpath d='M150 124c-6 0-11-4-11-10 0-6 5-10 11-10 2-6 9-9 15-7 5 1 8 5 9 9 5-1 10 2 11 7 1 6-3 11-9 11'/%3E%3Cpath d='M150 125c5 3 11 3 16 0'/%3E%3Cpath d='M170 178c-6 0-11-4-11-9 0-6 5-10 11-10 3-5 9-8 15-6 5 1 8 5 8 9 4 0 8 3 8 8 0 5-4 8-9 8'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(110% 80% at 50% 42%, #a8201a 0%, #7d0f0c 55%, #4d0806 100%);
  background-size: 220px 220px, cover;
  background-repeat: repeat, no-repeat;
}

.cp-hint {
  margin: 10px 0 2px;
  text-align: center;
  font-size: 12px;
  color: rgba(232, 201, 138, .62);
  letter-spacing: .06em;
}

/* 手写感建议语 */
.cp-hand {
  margin: 14px 4px 6px;
  padding: 10px 14px;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  font-size: 14.5px;
  line-height: 1.9;
  letter-spacing: .04em;
  color: rgba(255, 233, 184, .82);
  background: linear-gradient(180deg, rgba(163, 22, 22, .18), rgba(163, 22, 22, .04));
  border-left: 2px solid rgba(232, 201, 138, .45);
  border-radius: 0 8px 8px 0;
  transform: rotate(-.25deg);
}

/* ===== 参照实物风格：加大画幅 + 中间双福 ===== */
.stage {
  width: 336px;
  height: 596px;
}
.stage-hp {
  width: 196px;
  padding: 11px 0;
  font-size: 17px;
  letter-spacing: .42em;
  background: linear-gradient(180deg, #cf3a24, #a01a15);
  box-shadow: 0 6px 20px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.13);
}
.stage-strip {
  width: 58px;
  line-height: 58px;
  padding: 22px 0;
  font-size: 21px;
  letter-spacing: .36em;
  background: linear-gradient(180deg, #cf3722, #971310);
  box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 0 26px rgba(110,0,0,.55);
}
.stage-pair { gap: 150px; }

/* 中间双福：菱形贴 */
.stage-fu {
  position: absolute;
  left: 50%;
  top: 47%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 16px;
  z-index: 2;
  opacity: 0;
}
.stage.open .stage-fu { animation: footIn .6s ease-out 1.2s forwards; }
.fu-tile {
  width: 62px;
  height: 62px;
  transform: rotate(45deg);
  border-radius: 7px;
  border: 2px solid #e9cb8e;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(255,255,255,.10), transparent 55%),
    linear-gradient(135deg, #c2261c, #8c0f0b);
  box-shadow: 0 6px 16px rgba(0,0,0,.5), inset 0 0 14px rgba(0,0,0,.35);
  display: grid;
  place-items: center;
}
.fu-tile span {
  transform: rotate(-45deg);
  font-family: var(--serif), serif;
  font-size: 31px;
  font-weight: 600;
  color: #f2d79b;
  text-shadow: 0 2px 3px rgba(0,0,0,.55), 0 0 2px rgba(255,240,200,.5);
}

/* 福字固定模板图 */
.fu-img {
  width: 84px;
  height: auto;
  display: block;
  filter: drop-shadow(0 5px 14px rgba(0,0,0,.5));
}
.stage-fu { gap: 14px; }

.fu-img { cursor: pointer; transition: transform .18s; }
.fu-img:active { transform: scale(.94); }

.scene-actions { gap: 10px; }
.scene-save {
  padding: 12px 26px; border-radius: 26px; font-size: 15px;
  font-family: var(--serif);
  color: #ffe9b8; background: rgba(0,0,0,.38);
  border: 1px solid rgba(232,201,138,.45); cursor: pointer;
}

/* 福字去白底：multiply 让白色被底色吃掉 */
.fu-img {
  width: 96px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.45));
}

/* 提示语：紧贴春联下方，居中，字号收小 */
.cp-hand {
  margin: 6px 0 4px;
  padding: 0;
  text-align: center;
  font-family: "Kaiti SC", "STKaiti", "KaiTi", serif;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .06em;
  color: rgba(255, 233, 184, .62);
  background: none;
  border: none;
  border-radius: 0;
  transform: none;
}
/* 按钮整体下移，与提示语拉开 */
.cp-actions {
  margin-top: 10px;
}

/* 推荐区五副联：字号加大、联条加长 */
.couplet-card .strip.len7 {
  font-size: 27px;
  line-height: 1.92;
  letter-spacing: .16em;
  padding: 26px 16px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.couplet-card .strip.len5 {
  font-size: 30px;
  line-height: 2.0;
  letter-spacing: .16em;
  padding: 28px 18px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.couplet-card .pair-row {
  align-items: stretch;
  gap: 18px;
}
.couplet-card .hp-bar {
  font-size: 22px;
  letter-spacing: .3em;
  padding: 14px 0;
}

/* 对齐参考图比例：福字收小、嵌入两联之间空白 */
.stage-fu {
  top: 46%;
  gap: 20px;
}
.fu-img {
  width: 64px;
  height: auto;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.42));
}
.stage-pair {
  gap: 172px;
}
.stage-strip {
  width: 54px;
  line-height: 54px;
  padding: 26px 0;
  letter-spacing: .4em;
  min-height: 0;
}

/* 联条字再放大，两侧只留一丝边 */
.stage-strip {
  width: 46px;
  font-size: 28px;
  line-height: 34px;      /* 竖排时控制列宽，越小两侧留白越少 */
  padding: 22px 0;
  letter-spacing: .34em;
}
.stage-pair {
  gap: 166px;
}

/* 禁止长按选中/系统高亮，避免出现绿框 */
.couplet-card,
.cp-visual,
.strip,
.hp-bar,
.pair-row {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.strip::selection, .hp-bar::selection { background: transparent; }

/* 结果区联条再放大：字更大、条更宽、两侧只留一丝 */
.couplet-card .strip.len7 {
  width: 86px;
  font-size: 34px;
  line-height: 42px;
  letter-spacing: .12em;
  padding: 30px 0;
  min-height: 430px;
}
.couplet-card .strip.len5 {
  width: 92px;
  font-size: 40px;
  line-height: 48px;
  letter-spacing: .12em;
  padding: 32px 0;
  min-height: 430px;
}
.couplet-card .hp-bar {
  font-size: 26px;
  letter-spacing: .34em;
  padding: 16px 0;
}
.couplet-card .pair-row { gap: 20px; }

/* 字撑满联条：列宽=字号+极小留白 */
.couplet-card .strip.len7 {
  width: 56px;
  font-size: 42px;
  line-height: 48px;     /* 竖排列宽，接近字号 → 两侧只留 3px */
  letter-spacing: .06em;
  padding: 24px 0;
  min-height: 0;
}
.couplet-card .strip.len5 {
  width: 62px;
  font-size: 48px;
  line-height: 54px;
  letter-spacing: .06em;
  padding: 26px 0;
  min-height: 0;
}

/* ── 横批：字号不变，只收上下边 ── */
.couplet-card .hp-bar {
  font-size: 26px;
  letter-spacing: .34em;
  padding: 6px 0;          /* 上下从 16px 收到 6px */
  line-height: 1.25;
}
.stage-hp {
  padding: 7px 0;          /* 年礼卡横批同样收紧 */
  line-height: 1.25;
}

/* ── 上下联：列宽 = 联条宽，强制水平居中 ── */
.couplet-card .strip.len7 {
  width: 56px;
  line-height: 56px;       /* ← 与 width 相同才居中 */
  font-size: 42px;
  padding: 22px 0;
}
.couplet-card .strip.len5 {
  width: 62px;
  line-height: 62px;
  font-size: 48px;
  padding: 24px 0;
}
.stage-strip {
  width: 46px;
  line-height: 46px;       /* ← 同样对齐 */
  font-size: 28px;
  padding: 20px 0;
}

/* 结果卡片：与年礼卡同风格 */
.couplet-card {
  background:
    radial-gradient(120% 80% at 50% 40%, rgba(168,32,26,.95) 0%, rgba(125,15,12,.96) 55%, rgba(77,8,6,.98) 100%);
  border: 1px solid rgba(232,201,138,.42);
  border-radius: 14px;
  padding: 18px 14px 14px;
  position: relative;
  overflow: hidden;
}
.couplet-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cg fill='none' stroke='%23f2d9a4' stroke-opacity='0.10' stroke-width='1.1'%3E%3Cpath d='M28 62c-8-1-13-8-11-16 2-7 9-11 16-9 2-8 10-13 18-11 6 1 10 5 12 10 3-2 7-3 11-2 8 2 13 10 11 18'/%3E%3Cpath d='M44 148c-9-1-15-9-12-18 2-8 10-12 18-10 2-9 11-15 20-12 7 1 12 6 14 12 4-2 8-2 12-1 9 2 14 11 12 20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 220px;
  opacity: .9;
}
.cp-visual { position: relative; }

/* 中间双福 */
.cp-fu {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 16px;
  pointer-events: none;
}
.cp-fu img {
  width: 62px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.45));
}

/* 两联推向两侧，中间给福字留空 */
.couplet-card .pair-row {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0;
  padding: 0 4px;
  width: 100%;
  box-sizing: border-box;
}
/* 福字缩小，保证与联条有间隙 */
.cp-fu {
  gap: 12px;
}
.cp-fu img {
  width: 54px;
}

/* 强制：容器满宽，联条推到最外侧，福字仍居中 */
.couplet-card .cp-visual {
  width: 100%;
  display: block;
  position: relative;
}
.couplet-card .pair-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 0;
  padding: 0;
  box-sizing: border-box;
}
.couplet-card .strip {
  flex: 0 0 56px;
  width: 56px;
}
.couplet-card .strip.len5 {
  flex: 0 0 62px;
  width: 62px;
}

/* 联条按绿框位置内收，两侧对称 */
.couplet-card .pair-row {
  padding: 0 56px;
  box-sizing: border-box;
}
.cp-fu img {
  width: 52px;
}
.cp-fu {
  gap: 10px;
}

.chip-row.house-row { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(232,201,138,.16); }
.chip.house.on { background: linear-gradient(180deg,#e8c98a,#d4ab6a); color: #4a1010; font-weight: 600; }

.door-group { margin-bottom: 10px; }
.door-group-name {
  font-size: 12px;
  color: rgba(232,201,138,.6);
  letter-spacing: .1em;
  margin-bottom: 6px;
}

/* ===== 悬停高亮（电脑端） ===== */
.dp-cell,
.dp-btn,
.chip,
.dir-btn,
.copy-btn,
.ghost-btn,
.primary-btn,
.scene-skip,
.scene-share,
.photo-btn,
.link-btn {
  transition: background-color .16s ease, border-color .16s ease,
              color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.dp-cell:hover {
  background: linear-gradient(180deg, #e8c98a, #d4ab6a);
  color: #4a1010;
  border-color: #f2d9a4;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.dp-btn:hover {
  border-color: #f2d9a4;
  background: rgba(232,201,138,.16);
  color: #fff2d2;
}
.dp-btn.on:hover { background: linear-gradient(180deg,#d63a25,#a81a14); }

.chip:hover {
  border-color: rgba(242,217,164,.85);
  background: rgba(232,201,138,.14);
  color: #fff2d2;
}
.chip.on:hover {
  background: linear-gradient(180deg,#f0d49b,#d9b271);
  color: #4a1010;
}

.dir-btn:hover {
  border-color: #f2d9a4;
  background: rgba(232,201,138,.18);
  color: #fff2d2;
}

.copy-btn:hover, .ghost-btn:hover {
  border-color: #f2d9a4;
  color: #fff2d2;
  background: rgba(232,201,138,.12);
}
.primary-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.photo-btn:hover, .link-btn:hover { color: #ffe9b8; }

/* 触屏设备不用悬停 */
@media (hover: none) {
  /* 触屏不做悬停效果，但绝不改动背景色 */
  .dp-cell:hover, .chip:hover, .dir-btn:hover,
  .dp-btn:hover, .copy-btn:hover, .ghost-btn:hover,
  .primary-btn:hover, .shichen-btn:hover {
    transform: none;
    box-shadow: none;
    filter: none;
  }
}

/* 已选中的日期格子：金色（原来红色与底色冲突） */
.dp-cell.on {
  background: linear-gradient(180deg, #e8c98a, #d4ab6a);
  color: #5e0b09;
  font-weight: 700;
  border-color: #f2d9a4;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.dp-cell.on:hover {
  background: linear-gradient(180deg, #f3d79f, #e0ba7a);
}
/* 面板滚动条也改成暗色，去掉刺眼白条 */
.dp-panel::-webkit-scrollbar { width: 6px; }
.dp-panel::-webkit-scrollbar-track { background: rgba(0,0,0,.2); border-radius: 3px; }
.dp-panel::-webkit-scrollbar-thumb { background: rgba(232,201,138,.45); border-radius: 3px; }

/* 日期格子：字变金色，底色只轻微提亮（不抢眼） */
.dp-cell { color: #e8dcc8; }
.dp-cell:hover {
  color: #ffe9b8;
  background: rgba(232,201,138,.18);
  border-color: rgba(242,217,164,.8);
  transform: none;
  box-shadow: none;
}
.dp-cell.on {
  color: #ffd98a;
  font-weight: 700;
  background: rgba(232,201,138,.16);
  border-color: #f2d9a4;
  box-shadow: 0 0 0 1px rgba(242,217,164,.35);
}
.dp-cell.on:hover {
  color: #fff2d2;
  background: rgba(232,201,138,.24);
}

/* 日期格子：整体加粗，选中更粗 */
.dp-cell {
  font-weight: 600;
  font-size: 15px;
}
.dp-cell.on {
  font-weight: 800;
  letter-spacing: .02em;
}
.dp-btn {
  font-weight: 700;
}

/* 联条金属质感 */
.couplet-card .strip {
  border: 2px solid #e8c98a;
  font-weight: 800;
  color: #ffeec2;
  text-shadow:
    0 1px 0 rgba(140,80,10,.75),
    0 2px 3px rgba(0,0,0,.5),
    0 0 6px rgba(255,236,190,.28);
  box-shadow:
    inset 0 0 0 1px rgba(255,244,205,.45),
    inset 0 0 22px rgba(110,0,0,.55),
    0 8px 22px rgba(0,0,0,.45);
}
.couplet-card .hp-bar {
  border: 2px solid #e8c98a;
  font-weight: 800;
  color: #ffeec2;
  text-shadow: 0 1px 0 rgba(140,80,10,.7), 0 2px 3px rgba(0,0,0,.45);
  box-shadow: inset 0 0 0 1px rgba(255,244,205,.4), 0 6px 18px rgba(0,0,0,.4);
}
.stage-strip {
  border: 2px solid #e8c98a;
  font-weight: 800;
  color: #ffeec2;
  text-shadow: 0 1px 0 rgba(140,80,10,.7), 0 2px 3px rgba(0,0,0,.45);
}
.stage-hp {
  border: 2px solid #e8c98a;
  font-weight: 800;
  color: #ffeec2;
  text-shadow: 0 1px 0 rgba(140,80,10,.7), 0 2px 3px rgba(0,0,0,.4);
}
/* 祥云加密 */
.couplet-card::before {
  background-size: 140px 140px !important;
  opacity: 1 !important;
}
.reveal {
  background-size: 150px 150px, cover !important;
}

.dp-cell { text-align: center; }
.dp-btn { text-align: center; }

.shichen-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
.shichen-btn {
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #e8dcc8;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(232,201,138,.35);
  border-radius: 8px;
  cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.shichen-btn:hover { color: #ffe9b8; background: rgba(232,201,138,.16); border-color: #f2d9a4; }
.shichen-btn.on {
  color: #ffd98a;
  font-weight: 800;
  background: rgba(232,201,138,.16);
  border-color: #f2d9a4;
  box-shadow: 0 0 0 1px rgba(242,217,164,.35);
}

/* 出生时间：原生控件透明覆盖 → 手机弹轮盘 */
label.field.pick { position: relative; }
.time-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.time-overlay::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
/* 时辰按钮隐藏（保留代码备用） */
.shichen-row { display: none; }

/* 隐藏原生时间控件（改用自绘滚轮） */
.time-overlay { opacity: 0 !important; position: absolute; inset: 0; width: 100%; height: 100%; }

.wheel { position: fixed; inset: 0; z-index: 400; display: grid; place-items: end center; }
.wheel-mask { position: absolute; inset: 0; background: rgba(10,2,2,.6); }
.wheel-card {
  position: relative; width: 100%; max-width: 420px;
  background: linear-gradient(180deg,#2a0f0d,#1a0808);
  border-top: 1px solid rgba(232,201,138,.45);
  border-radius: 18px 18px 0 0;
  padding: 16px 16px 22px;
  animation: wheelUp .25s ease-out;
}
@keyframes wheelUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.wheel-title { text-align: center; font-size: 14px; color: #ffe9b8; margin-bottom: 12px; letter-spacing: .1em; }
.wheel-body { position: relative; display: flex; justify-content: center; gap: 22px; height: 190px; }
.wheel-col {
  width: 96px; height: 190px; overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  text-align: center;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item {
  height: 46px; line-height: 46px;
  scroll-snap-align: center;
  font-size: 20px; font-weight: 600;
  color: rgba(232,220,200,.45);
  transition: color .15s, transform .15s;
}
.wheel-item.sel { color: #ffd98a; font-weight: 800; transform: scale(1.08); }
.wheel-band {
  position: absolute; left: 50%; top: 72px; transform: translateX(-50%);
  width: 220px; height: 46px; pointer-events: none;
  border-top: 1px solid rgba(232,201,138,.5);
  border-bottom: 1px solid rgba(232,201,138,.5);
  background: rgba(232,201,138,.07);
  border-radius: 8px;
}
.wheel-actions { display: flex; gap: 12px; margin-top: 16px; }
.wheel-actions button { flex: 1; }

/* 原生控件不再拦截点击，改由行容器打开自绘滚轮 */
.time-overlay {
  pointer-events: none !important;
  opacity: 0 !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* 遮罩减淡、面板实心浮起，避免整页发暗 */
.wheel-mask { background: rgba(0, 0, 0, .32) !important; }
.wheel-card {
  background: #2b100e !important;
  border: 1px solid rgba(232,201,138,.42) !important;
  border-bottom: none !important;
  box-shadow: 0 -14px 40px rgba(0,0,0,.6) !important;
  padding-bottom: 26px !important;
}
.wheel-title { color: #ffe9b8 !important; }
.wheel-item { color: rgba(232,220,200,.5) !important; }
.wheel-item.sel { color: #ffd98a !important; }

/* ============ 响应式加固：小屏不溢出 ============ */

/* 年礼卡：按比例缩放，绝不超出屏幕 */
.stage {
  width: min(336px, 92vw);
  height: auto;
  aspect-ratio: 336 / 596;
  max-height: 78vh;
}

/* 支付弹窗 */
.modal-card {
  width: min(330px, 88vw);
  max-width: 88vw;
}

/* 图片预览浮层 */
.gp-card {
  width: min(320px, 86vw);
  max-width: 86vw;
}

/* 时间滚轮面板 */
.wheel-card {
  width: 100%;
  max-width: min(420px, 100vw);
}

/* 日期面板不超出 */
.dp-panel {
  max-width: 100%;
  box-sizing: border-box;
}
.dp-grid {
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
}

/* 极窄屏（≤340px）：缩小一点字号 */
@media (max-width: 340px) {
  .stage-strip { font-size: 24px; line-height: 26px; }
  .stage-hp { font-size: 14px; }
  .dp-cell { font-size: 13px; }
  .wheel-item { height: 42px; line-height: 42px; font-size: 18px; }
}

/* 横屏/矮屏：年礼卡限制高度 */
@media (max-height: 620px) {
  .stage { max-height: 92vh; width: min(300px, 92vw); }
}

/* ===== 面向中老年：字号整体加大 ===== */
.hero-sub { font-size: 15px !important; }
.card-head h2 { font-size: 21px !important; }
.card-head .sub { font-size: 14px !important; line-height: 1.7 !important; }
.field-label { font-size: 15px !important; }
.chip { font-size: 15px !important; padding: 10px 16px !important; }
.chip.house { font-size: 15px !important; }
.door-desc { font-size: 14px !important; line-height: 1.7 !important; }
.dir-btn { font-size: 16px !important; }
.dp-btn { font-size: 17px !important; }
.dp-cell { font-size: 16px !important; }
.pick-val { font-size: 19px !important; }
.primary-btn { font-size: 19px !important; }
.primary-btn .btn-price { font-size: 15px !important; }
.checkbox { font-size: 14px !important; line-height: 1.7 !important; }
.cp-hand { font-size: 14px !important; }
.cp-more summary { font-size: 14px !important; }
.cp-reasons li { font-size: 14.5px !important; line-height: 1.85 !important; }
.copy-btn { font-size: 14px !important; padding: 9px 18px !important; }
.gift-card .sub { font-size: 14px !important; line-height: 1.75 !important; }
.section-title { font-size: 17px !important; }
.note { font-size: 12.5px !important; line-height: 1.85 !important; }

/* ===== 产品封面 ===== */
.cover-modal { position: fixed; inset: 0; z-index: 420; }
.cover-mask { position: absolute; inset: 0; background: rgba(0,0,0,.62); }
.cover-scroll {
  position: relative; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 22px 16px 30px; gap: 14px;
}
.cover-card {
  width: min(340px, 92vw); padding: 26px 22px 20px;
  border-radius: 16px; text-align: center;
  background: radial-gradient(120% 80% at 50% 30%, #b3271c 0%, #8a1410 55%, #4e0806 100%);
  border: 1px solid rgba(232,201,138,.5);
  box-shadow: 0 18px 48px rgba(0,0,0,.6);
  position: relative; overflow: hidden;
}
.cover-seal {
  position: absolute; right: 14px; top: 14px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1.5px solid #ffe9b8; border-radius: 3px;
  background: rgba(200,40,30,.9); color: #ffe9b8; font-size: 17px;
  transform: rotate(-6deg);
}
.cover-title { font-family: var(--serif); font-size: 30px; color: #ffe9b8; letter-spacing: .12em; }
.cover-sub { margin-top: 8px; font-size: 13px; color: rgba(246,226,180,.75); letter-spacing: .1em; }
.cover-line { width: 54px; height: 1px; margin: 16px auto; background: rgba(232,201,138,.5); }
.cover-what { font-size: 14.5px; line-height: 1.85; color: #fff2d2; }
.cover-steps { margin: 18px 0 14px; display: flex; flex-direction: column; gap: 10px; }
.cover-step {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(0,0,0,.18); border: 1px solid rgba(232,201,138,.22);
}
.cover-step i {
  font-style: normal; flex: 0 0 24px; height: 24px; line-height: 24px;
  text-align: center; border-radius: 50%;
  background: rgba(232,201,138,.22); color: #ffe9b8; font-size: 12px;
}
.cover-step b { font-size: 14px; color: #ffe9b8; font-weight: 600; }
.cover-step span { margin-left: auto; font-size: 11.5px; color: rgba(246,226,180,.6); }
.cover-points { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.cover-points span {
  font-size: 11.5px; padding: 4px 12px; border-radius: 999px;
  color: #ffe9b8; background: rgba(232,201,138,.14);
  border: 1px solid rgba(232,201,138,.3);
}
.cover-qr { display: grid; place-items: center; }
.cover-qr canvas { border-radius: 6px; }
.cover-foot { margin-top: 8px; font-size: 11.5px; color: rgba(246,226,180,.66); }
.cover-actions { display: flex; gap: 10px; width: min(340px, 92vw); }
.cover-actions button { flex: 1; }

/* 转赠署名 */
.cover-sign {
  margin: 14px 0 10px;
  font-family: var(--serif);
  font-size: 15px;
  color: #ffe9b8;
  letter-spacing: .12em;
}
.cover-sign.off { display: none; }
.cover-name-input {
  width: min(340px, 92vw);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(232,201,138,.4);
  background: rgba(0,0,0,.35);
  color: #ffe9b8;
  font-size: 14.5px;
  text-align: center;
  outline: none;
}
.cover-name-input::placeholder { color: rgba(246,226,180,.45); }
.cover-name-input:focus { border-color: #f2d9a4; background: rgba(0,0,0,.5); }

/* 首页介绍模式：只展示海报本身，不含转赠功能 */
.cover-modal.mode-intro #giverName,
.cover-modal.mode-intro #coverShare,
.cover-modal.mode-intro #coverSave,
.cover-modal.mode-intro #coverSign { display: none !important; }
.cover-modal.mode-intro .cover-actions { display: flex; }

/* 封面内嵌主按钮（原二维码位置） */
.cover-cta { margin-top: 18px; }
.cover-cta .primary-btn {
  width: 100%;
  margin-top: 0;
  padding: 15px;
  font-size: 17px;
}

/* 封面精简优化 */
.cover-card { padding: 24px 20px 22px; }
.cover-title { font-size: 32px; letter-spacing: .14em; }
.cover-sub { margin-top: 10px; font-size: 13.5px; color: rgba(246,226,180,.8); }
.cover-line { margin: 14px auto; }
.cover-what {
  font-size: 19px !important;
  line-height: 1.65 !important;
  letter-spacing: .06em;
  color: #ffe9b8 !important;
  font-family: var(--serif);
}
.cover-steps { margin: 16px 0 6px; gap: 9px; }
.cover-step { padding: 11px 12px; }
.cover-step b { font-size: 15px; }
.cover-step span { font-size: 12.5px !important; color: rgba(246,226,180,.72) !important; }
.cover-cta { margin-top: 16px; }

/* 主文案：字号略收，避免两行过长 */
.cover-what {
  font-size: 17.5px !important;
  line-height: 1.7 !important;
  letter-spacing: .04em;
}
.cover-step span { white-space: nowrap; font-size: 12px !important; }

/* 封面精简版：只留标题 + 主张 + 按钮 */
.cover-card { padding: 30px 22px 30px; }
.cover-line { margin: 18px auto 22px; width: 64px; }
.cover-what {
  font-size: 18px !important;
  line-height: 1.75 !important;
  margin-bottom: 6px;
}
.cover-cta { margin-top: 26px; }
.cover-cta .primary-btn { padding: 16px; font-size: 17.5px; }

/* 首页封面：铺满整屏，盖住下面的页面 */
.cover-modal.mode-intro .cover-scroll {
  padding: 0 !important;
  gap: 0 !important;
  display: block !important;
}
.cover-modal.mode-intro .cover-card {
  width: 100vw !important;
  min-height: 100vh !important;
  height: auto;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 26px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.cover-modal.mode-intro .cover-title {
  font-size: 42px !important;
  letter-spacing: .16em;
}
.cover-modal.mode-intro .cover-seal {
  width: 40px; height: 40px; font-size: 20px;
  right: 22px; top: 24px;
}
.cover-modal.mode-intro .cover-line {
  width: 80px; margin: 24px auto 28px;
}
.cover-modal.mode-intro .cover-what {
  font-size: 21px !important;
  line-height: 1.85 !important;
}
.cover-modal.mode-intro .cover-cta {
  margin-top: 46px;
  width: 100%;
  max-width: 320px;
}
.cover-modal.mode-intro .cover-cta .primary-btn {
  padding: 18px;
  font-size: 18px;
  border-radius: 12px;
}

/* 全屏封面加祥云纹，避免大片空白 */
.cover-modal.mode-intro .cover-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cg fill='none' stroke='%23f2d9a4' stroke-opacity='0.09' stroke-width='1.1'%3E%3Cpath d='M34 70c-9-1-15-9-12-18 2-8 10-12 18-10 2-9 11-15 20-12 7 1 12 6 14 12 4-2 8-2 12-1 9 2 14 11 12 20'/%3E%3Cpath d='M150 170c-10-1-17-10-13-20 3-9 11-13 20-11 2-10 12-16 22-13 7 1 13 7 15 13 4-2 9-2 13-1 10 2 15 12 13 22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 240px 240px;
}
.cover-modal.mode-intro .cover-card > * { position: relative; z-index: 1; }
.cover-modal.mode-intro .cover-title { margin-top: -40px; }

/* 修正：春印必须恢复绝对定位，固定在右上角 */
.cover-modal.mode-intro .cover-seal {
  position: absolute !important;
  top: 26px !important;
  right: 24px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 3 !important;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 21px;
  transform: rotate(-6deg);
}
/* 标题不受春印影响 */
.cover-modal.mode-intro .cover-title {
  position: relative;
  z-index: 2;
  padding: 0 30px;
}

.wheel-body.three { gap: 8px; }
.wheel-col.narrow { width: 74px; }
.wheel-band.three { width: 246px; }
.wheel-item small { font-size: 12px; opacity: .65; margin-left: 2px; }

.cover-bless {
  margin: 16px auto 4px;
  font-family: var(--serif);
  font-size: 17px;
  color: #ffe9b8;
  letter-spacing: .1em;
  line-height: 1.7;
}
.cover-bless.off { display: none; }
/* 转赠海报同样铺满整屏 */
.cover-modal.mode-gift .cover-scroll { padding: 0 !important; gap: 0 !important; display: block !important; }
.cover-modal.mode-gift .cover-card {
  width: 100vw !important; min-height: 100vh !important;
  border-radius: 0 !important; border: none !important; box-shadow: none !important;
  padding: 0 26px !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-sizing: border-box;
}
.cover-modal.mode-gift .cover-name-input,
.cover-modal.mode-gift .cover-actions { margin-top: 14px; }

/* 竖排居中：不依赖 line-height，改 flex（截图也准） */
.couplet-card .strip,
.stage-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 22px 0 !important;
}
.strip-inner,
.stage-strip .strip-inner {
  writing-mode: vertical-rl;
  text-orientation: upright;
  line-height: 1.08;
  letter-spacing: .1em;
  display: block;
  margin: 0 auto;
  text-align: center;
}
.stage-strip { width: 46px !important; font-size: 28px !important; }
.couplet-card .strip.len7 { width: 56px !important; font-size: 40px !important; }
.couplet-card .strip.len5 { width: 62px !important; font-size: 44px !important; }
.couplet-card .strip.len9 { width: 56px !important; font-size: 32px !important; }

/* 出生时间：透明覆盖，点击弹出系统原生时间选择（手机为轮盘） */
.time-overlay {
  pointer-events: auto !important;
  opacity: 0 !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  cursor: pointer;
}
.time-overlay::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer;
}

.cover-wx {
  margin: 2px auto 0;
  font-size: 12.5px;
  color: rgba(246,226,180,.7);
  letter-spacing: .08em;
}
.cover-wx.off { display: none; }
.sign-row { display: flex; gap: 10px; margin: 12px 0 8px; }
.sign-row input { flex: 1; }

/* 亲朋联春：海报预览 */
.gift-poster { margin: 12px 0 6px; }
.gift-poster img { width: 100%; display: block; border-radius: 12px; }

/* 转发按钮：长条、文字居中、金额在右下 */
#giftBtn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin-top: 12px;
  font-size: 18px;
  letter-spacing: .3em;
  text-indent: .3em;
}
#giftBtn .btn-price {
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 13px;
  letter-spacing: 0;
  text-indent: 0;
  opacity: .85;
}

/* 卡片内海报：紧凑竖版（非满屏） */
.cover-modal.poster-mode .cover-card {
  width: 340px !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 42px 24px 46px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(232,201,138,.45) !important;
}
.cover-modal.poster-mode .cover-title { font-size: 34px !important; margin-top: 0 !important; }
.cover-modal.poster-mode .cover-what { font-size: 17px !important; }
.cover-modal.poster-mode .cover-line { margin: 18px auto 20px; }

/* 亲朋联春：放大说明文字 */
.sub.big { font-size: 17px !important; line-height: 1.75 !important; color: #ffe9b8 !important; letter-spacing: .04em; }

/* 转赠海报：加祥云纹 + 字放大 */
.cover-modal.mode-gift .cover-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, #b3271c 0%, #8a1410 55%, #4e0806 100%) !important;
}
.cover-modal.mode-gift .cover-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cg fill='none' stroke='%23f2d9a4' stroke-opacity='0.13' stroke-width='1.2'%3E%3Cpath d='M30 64c-9-1-15-9-12-18 2-8 10-12 18-10 2-9 11-15 20-12 7 1 12 6 14 12 4-2 8-2 12-1 9 2 14 11 12 20'/%3E%3Cpath d='M140 160c-10-1-17-10-13-20 3-9 11-13 20-11 2-10 12-16 22-13 7 1 13 7 15 13 4-2 9-2 13-1 10 2 15 12 13 22'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 200px 200px;
}
.cover-modal.mode-gift .cover-card > * { position: relative; z-index: 1; }
.cover-modal.mode-gift .cover-title { font-size: 38px !important; letter-spacing: .16em; }
.cover-modal.mode-gift .cover-what { font-size: 20px !important; line-height: 1.8 !important; }
.cover-modal.mode-gift .cover-bless { font-size: 21px !important; }
.cover-modal.mode-gift .cover-sign { font-size: 17px !important; }
.cover-modal.mode-gift .cover-wx { font-size: 14px !important; }
.cover-modal.mode-gift .cover-seal { position: absolute !important; top: 26px; right: 24px; z-index: 3; }
