@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@600;700&display=swap");

:root {
  --ink: #0b0907;
  --ink-soft: #16110c;
  --champagne: #f3e2a8;
  --gold: #e6c35a;
  --gold-deep: #b8892a;
  --gold-line: rgba(230, 195, 90, 0.42);
  --gold-glow: rgba(230, 195, 90, 0.18);
  --text: #fff8ea;
  --muted: rgba(255, 248, 234, 0.68);
  --danger: #ff7a7a;
  --paper: #f7f1e6;
  --paper-deep: #efe6d6;
  --ink-app: #1c1710;
  --muted-app: #7a7163;
  --line-app: #e8dcc4;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 18px 40px rgba(20, 12, 0, 0.12);
  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: "Cormorant Garamond", "Noto Serif SC", serif;
  --page-max: 100%;
  --page-pad: 0;
  --content-pad: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img, video { max-width: 100%; display: block; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.page {
  width: min(var(--page-max), 100%);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  padding-inline: var(--page-pad);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--gold);
  color: var(--champagne);
  background: rgba(230, 195, 90, 0.04);
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s ease, box-shadow 0.25s ease;
  letter-spacing: 0.04em;
}
.btn:hover {
  background: rgba(230, 195, 90, 0.14);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.btn:active { transform: scale(0.98); }
.btn-solid {
  background: linear-gradient(135deg, #f6e4a4 0%, #e0b84a 48%, #c49228 100%);
  color: #2a1c00;
  border: none;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(180, 130, 30, 0.28);
}
.btn-solid:hover {
  background: linear-gradient(135deg, #ffe9b0 0%, #ecc357 48%, #d0a034 100%);
  box-shadow: 0 12px 28px rgba(180, 130, 30, 0.35);
}
.btn-ghost {
  border-color: rgba(255,248,234,0.22);
  color: var(--text);
  background: transparent;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(40px, calc(env(safe-area-inset-bottom) + 24px));
  transform: translateX(-50%) translateY(20px);
  background: rgba(18, 12, 6, 0.94);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.28s var(--ease);
  z-index: 99;
  border: 1px solid var(--gold-line);
  max-width: min(90vw, 420px);
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cs-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 5, 2, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}
.cs-modal.show {
  opacity: 1;
  pointer-events: auto;
}
.cs-modal-card {
  width: min(88vw, 340px);
  background: linear-gradient(180deg, #1c1610 0%, #120e0a 100%);
  border: 1px solid var(--gold-line);
  border-radius: 20px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s var(--ease);
}
.cs-modal.show .cs-modal-card {
  transform: none;
}
.cs-modal-card h3 {
  margin: 0 0 6px;
  color: var(--champagne);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.06em;
}
.cs-modal-card .cs-tip {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.cs-modal-card .cs-qr {
  width: min(72vw, 240px);
  height: min(72vw, 240px);
  margin: 0 auto 14px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  padding: 10px;
}
.cs-modal-card .cs-empty {
  margin: 0 0 14px;
  padding: 36px 16px;
  border-radius: 14px;
  border: 1px dashed rgba(230, 195, 90, 0.35);
  color: var(--muted);
  font-size: 13px;
}
.cs-modal-card .cs-close {
  width: 100%;
  border: 1px solid var(--gold-line);
  background: rgba(230, 195, 90, 0.1);
  color: var(--champagne);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  opacity: 0.75;
  margin: 24px var(--content-pad);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}
.divider span {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border: 1px solid var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

.hidden { display: none !important; }

.reveal {
  animation: revealUp 0.7s var(--ease) both;
}
.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.16s; }
.reveal-delay-3 { animation-delay: 0.24s; }

@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 640px) {
  :root { --page-max: 720px; --content-pad: 16px; }
}
@media (min-width: 900px) {
  :root { --page-max: 1040px; --content-pad: 24px; }
}
@media (min-width: 1200px) {
  :root { --page-max: 1280px; --content-pad: 28px; }
}
@media (min-width: 1440px) {
  :root { --page-max: 1380px; --content-pad: 32px; }
}
@media (max-width: 380px) {
  .btn { padding: 9px 14px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-delay-1, .reveal-delay-2, .reveal-delay-3 {
    animation: none;
  }
  html { scroll-behavior: auto; }
}
