/* ============ 调色板 + 字体变量 ============ */
/* 老钱风（Old Money）：哑光香槟金 · 烟粉 · 胡桃棕 · 米奶白
 * 灵感：意大利婚礼请柬 / Brunello Cucinelli / Loro Piana
 */
:root {
  /* 香槟金 — 哑光低饱和，比纯金更"贵气" */
  --c-gold: #BFA068;
  --c-gold-light: #D5BC92;
  --c-gold-deep: #8E7445;

  /* 烟粉 — 婚礼浪漫的甜，但内敛 */
  --c-rose: #D4B5A8;
  --c-rose-deep: #B89283;

  /* 胡桃棕 — 主文字色，比酒红更"老钱" */
  --c-wine: #5C4A3E;
  --c-ink: #3A2E26;
  --c-ink-2: #8E7B6D;

  /* 米奶白 — 暖底色 */
  --c-cream: #F5EFE3;
  --c-cream-2: #EAE0CB;
  --c-shadow: rgba(92, 74, 62, 0.13);

  --f-cn-title: 'Long Cang', 'STKaiti', 'KaiTi', serif;
  --f-en-title: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-body: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  --f-num: 'Playfair Display', 'Cormorant Garamond', serif;
  --f-brand: 'Great Vibes', 'Cormorant Garamond', cursive;
}

/* ============ DDfamily♥ 品牌 logo ============ */
.brand {
  font-family: var(--f-brand);
  display: inline-flex;
  align-items: baseline;
  color: var(--c-wine);
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand-dd {
  color: var(--c-gold);
  font-size: 1.35em;
  margin-right: -0.02em;
  text-shadow: 0 1px 3px rgba(143, 116, 69, 0.22);
}
.brand-family {
  color: var(--c-wine);
  font-style: italic;
}
.brand-heart {
  color: var(--c-rose-deep);
  font-size: 0.78em;
  margin-left: 0.18em;
  display: inline-block;
  animation: heartBeat 2.4s ease-in-out infinite;
  transform-origin: center;
}
.brand--xs { font-size: 1.1rem; }
.brand--sm { font-size: 1.6rem; }
.brand--md { font-size: 2.6rem; }
.brand--lg { font-size: clamp(3rem, 7vw, 4.8rem); }

/* 深色背景上的变体（waiting / paused / ended 全屏照片上） */
.brand--on-dark {
  color: #fff;
}
.brand--on-dark .brand-dd {
  color: var(--c-gold-light);
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}
.brand--on-dark .brand-family {
  color: #fff;
  text-shadow: 0 1px 10px rgba(0,0,0,0.6);
}
.brand--on-dark .brand-heart {
  color: #F0C8BD;
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.22); }
  35% { transform: scale(0.95); }
  50% { transform: scale(1.1); }
  65% { transform: scale(1); }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-cream);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

.hidden { display: none !important; }

/* ============ 装饰元素 ============ */
.ornament {
  font-family: var(--f-en-title);
  color: var(--c-gold);
  font-size: 1.6em;
  letter-spacing: 0.4em;
  text-align: center;
}
.ornament.big { font-size: 2.4em; }

.gold-divider {
  width: 60%;
  max-width: 280px;
  height: 1px;
  margin: 1em auto;
  background: linear-gradient(to right, transparent, var(--c-gold), var(--c-gold-light), var(--c-gold), transparent);
}
.gold-divider.wide { width: 80%; max-width: 420px; }

/* 角落装饰：玫瑰金 + 香槟金 水彩光晕 */
.corner-deco {
  position: absolute;
  width: 200px;
  height: 200px;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(ellipse 100px 70px at 30% 30%, rgba(212, 181, 168, 0.7), transparent 70%),
    radial-gradient(ellipse 80px 60px at 60% 20%, rgba(191, 160, 104, 0.5), transparent 70%),
    radial-gradient(ellipse 70px 90px at 20% 70%, rgba(213, 188, 146, 0.5), transparent 70%);
  filter: blur(3px);
}
.corner-tl { top: -30px; left: -30px; }
.corner-tr { top: -30px; right: -30px; transform: scaleX(-1); }
.corner-bl { bottom: -30px; left: -30px; transform: scaleY(-1); }
.corner-br { bottom: -30px; right: -30px; transform: scale(-1, -1); }
.corner-deco.on-photo { opacity: 0.4; mix-blend-mode: screen; }

@media (max-width: 640px) {
  .corner-deco { width: 110px; height: 110px; }
}

/* ============ 标题 ============ */
.cn-title {
  font-family: var(--f-cn-title);
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--c-wine);
  text-align: center;
  margin: 0.2em 0;
}
.cn-title.hero { font-size: clamp(2.4rem, 8vw, 5rem); color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,0.6); }
.cn-title.medium { font-size: clamp(1.8rem, 5vw, 3rem); color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,0.5); }

.en-title {
  font-family: var(--f-en-title);
  font-style: italic;
  letter-spacing: 0.3em;
  color: var(--c-gold);
  text-align: center;
  font-size: 1.1em;
}
.en-title.hero {
  font-size: clamp(1rem, 3vw, 1.8rem);
  color: var(--c-gold-light);
  letter-spacing: 0.5em;
  margin-bottom: 0.4em;
}

/* ============ 按钮 + 输入 ============ */
.primary-btn {
  display: inline-block;
  padding: 0.75em 2.4em;
  background: var(--c-gold);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-family: var(--f-body);
  font-size: 1rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
  box-shadow: 0 6px 18px rgba(201, 169, 110, 0.35);
}
.primary-btn:hover { background: #b69257; }
.primary-btn:active { transform: scale(0.98); }
.primary-btn.small { padding: 0.55em 1.4em; font-size: 0.92rem; letter-spacing: 0.12em; }
.primary-btn:disabled { background: #c8b8aa; box-shadow: none; cursor: not-allowed; }

input[type="text"], input[type="password"] {
  font-family: var(--f-body);
  font-size: 1rem;
  padding: 0.7em 1em;
  border: 1px solid #c5c0b0;
  border-radius: 8px;
  background: #fff;
  color: var(--c-ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input[type="text"]:focus, input[type="password"]:focus {
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(191, 160, 104, 0.2);
}

.form-error {
  color: #b04040;
  font-size: 0.88rem;
  text-align: center;
  min-height: 1.2em;
  margin-top: 0.6em;
}

/* ============ 名字输入 overlay ============ */
.name-gate {
  position: fixed;
  inset: 0;
  background: var(--c-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.name-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 1px solid #d8d2c2;
  border-radius: 14px;
  padding: 48px 40px 36px;
  text-align: center;
  box-shadow: 0 20px 50px var(--c-shadow);
  overflow: hidden;
}
.name-card .cn-title { color: var(--c-wine); font-size: clamp(2rem, 6vw, 3rem); }
.name-card .en-title { font-size: 1rem; }
.invite-text {
  color: var(--c-ink-2);
  margin: 0.8em 0 1.6em;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
}
.name-input {
  width: 100%;
  margin-bottom: 1em;
  text-align: center;
  letter-spacing: 0.1em;
}

/* 全屏背景图 */
.bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: #2a1a1a;
}
.bg-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.7));
  pointer-events: none;
}
.bg-mask.light {
  background: linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.55));
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

/* ICP 备案号 footer — 全页面可见，底部居中小灰字 */
.icp-footer {
  position: fixed;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  font-family: var(--f-body);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: rgba(60, 50, 40, 0.45);
  pointer-events: auto;
  white-space: nowrap;
}
.icp-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.icp-footer a:hover {
  color: var(--c-wine);
  text-decoration: underline;
  text-decoration-color: rgba(92, 74, 62, 0.3);
}

/* 在 waiting/paused/ended 这种深色全屏 bg 上要换浅色 */
body.is-waiting .icp-footer,
body.is-paused .icp-footer,
body.is-ended .icp-footer {
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
body.is-waiting .icp-footer a:hover,
body.is-paused .icp-footer a:hover,
body.is-ended .icp-footer a:hover {
  color: #fff;
}
