*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #ff6b9d;
  --accent: #c4a1ff;
  --gold: #e8c4a0;
  --bg: #0f0a12;
  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

body {
  font-family: var(--font);
  background: #08050c;
  color: #fff;
  min-height: 100vh;
}

.poster-page {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.tool-btn {
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
  transition: background .2s;
}

.tool-btn:hover { background: rgba(255,255,255,.16); }
.tool-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  box-shadow: 0 6px 24px rgba(255,107,157,.35);
}

/* 海报画布 9:16 */
.poster-canvas {
  position: relative;
  width: 100%;
  max-width: 405px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 24px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
}

.poster-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(255,107,157,.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 25%, rgba(196,161,255,.28), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 90%, rgba(232,196,160,.12), transparent 45%),
    linear-gradient(180deg, #1a0f1e 0%, #0f0a12 45%, #120a14 100%);
}

.poster-grain {
  position: absolute;
  inset: 0;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.poster-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 28px 32px;
  text-align: center;
}

.brand-mark {
  font-size: 11px;
  letter-spacing: .4em;
  color: var(--gold);
  opacity: .9;
  margin-bottom: 12px;
}

.poster-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 10vw, 44px);
  font-weight: 600;
  letter-spacing: .08em;
  background: linear-gradient(135deg, #fff 20%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.poster-tagline {
  font-size: 13px;
  color: rgba(255,255,255,.65);
  letter-spacing: .15em;
  margin-bottom: 24px;
}

.poster-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 22px;
}

.badge {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.85);
}

.poster-features {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.feat {
  padding: 12px 6px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}

.feat-icon { font-size: 18px; margin-bottom: 6px; color: var(--gold); }
.feat strong { display: block; font-size: 11px; margin-bottom: 3px; }
.feat small { font-size: 9px; color: rgba(255,255,255,.45); line-height: 1.35; }

.qr-wrap {
  margin-top: auto;
  padding: 16px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.qr-wrap img, #qrCanvas {
  display: block;
  width: 160px;
  height: 160px;
}

.qr-hint {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,.7);
  line-height: 1.6;
}

.qr-url {
  margin-top: 4px;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: .05em;
  word-break: break-all;
}

.poster-footer {
  margin-top: 10px;
  font-size: 10px;
  color: rgba(255,255,255,.35);
  letter-spacing: .1em;
}

.hint-bar {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

@media print {
  body { background: #fff; }
  .toolbar, .hint-bar { display: none !important; }
  .poster-page { padding: 0; max-width: none; }
  .poster-canvas {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    page-break-inside: avoid;
  }
}
