/* ============================================
   ExOracle · 前任神谕 — iOS-Native UI
   ============================================ */

:root {
  --bg-0: #0d0620;
  --bg-1: #1a0b2e;
  --bg-2: #2d1b4e;
  --bg-3: #3a1a5e;
  --gold: #d4af37;
  --gold-soft: #e8c470;
  --gold-dim: rgba(212, 175, 55, 0.3);
  --rose: #e8677e;
  --purple: #8a2be2;
  --text-1: #fef3c7;
  --text-2: #fde68a;
  --text-3: rgba(254, 243, 199, 0.7);
  --text-4: rgba(254, 243, 199, 0.45);
  --stroke: rgba(212, 175, 55, 0.18);
  --stroke-strong: rgba(212, 175, 55, 0.4);
  --card-bg: rgba(45, 27, 78, 0.35);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background: var(--bg-0);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
               'PingFang SC', 'Helvetica Neue', 'Noto Serif SC', serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, #4a1d78 0%, transparent 55%),
    radial-gradient(ellipse 100% 60% at 50% 110%, #5a1d5e 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
}

input, select, textarea, button {
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

/* ====== 背景特效 ====== */
.starfield {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 20% 15%, rgba(255,255,255,0.8) 50%, transparent 100%),
    radial-gradient(1px 1px at 80% 25%, rgba(255,255,255,0.6) 50%, transparent 100%),
    radial-gradient(1px 1px at 35% 45%, rgba(212,175,55,0.9) 50%, transparent 100%),
    radial-gradient(1px 1px at 65% 65%, rgba(255,255,255,0.7) 50%, transparent 100%),
    radial-gradient(1px 1px at 15% 75%, rgba(212,175,55,0.7) 50%, transparent 100%),
    radial-gradient(1px 1px at 85% 85%, rgba(255,255,255,0.5) 50%, transparent 100%),
    radial-gradient(2px 2px at 50% 30%, rgba(255,255,255,0.4) 50%, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(232,103,126,0.6) 50%, transparent 100%);
  background-size: 400px 600px;
  animation: twinkle 6s ease-in-out infinite;
}

.aurora {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 20%, rgba(212,175,55,0.08) 0%, transparent 60%);
  animation: aurora 8s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.4; }
}
@keyframes aurora {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-20px) scale(1.1); opacity: 1; }
}

/* ====== 布局 ====== */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  padding: calc(var(--safe-top) + 28px) 20px calc(var(--safe-bottom) + 40px);
}

.hidden { display: none !important; }

/* ====== Hero / 水晶球 ====== */
.hero {
  text-align: center;
  padding: 8px 0 32px;
  animation: fadeUp 0.8s var(--ease-out);
}

.crystal-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.crystal-halo {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.35) 0%, rgba(138,43,226,0.25) 40%, transparent 70%);
  filter: blur(20px);
  animation: halo-pulse 3s ease-in-out infinite;
}

.crystal-ball {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.4) 0%, transparent 30%),
    radial-gradient(circle at 60% 70%, rgba(232,103,126,0.3) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(138,43,226,0.5) 0%, rgba(26,11,46,0.95) 80%);
  box-shadow:
    0 0 40px rgba(212,175,55,0.4),
    inset -4px -4px 20px rgba(0,0,0,0.5),
    inset 4px 4px 20px rgba(255,255,255,0.1);
  animation: float 4s ease-in-out infinite;
}

.crystal-highlight {
  position: absolute;
  top: 12%;
  left: 20%;
  width: 35%;
  height: 18%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  transform: rotate(-20deg);
  filter: blur(1px);
}

.crystal-inner {
  position: absolute;
  inset: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.2) 0%, transparent 70%);
  animation: inner-glow 2.5s ease-in-out infinite;
}

.crystal-base {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 8px;
  background: radial-gradient(ellipse, rgba(212,175,55,0.4) 0%, transparent 70%);
  filter: blur(4px);
}

.crystal-spin .crystal-ball {
  animation: spin 5s linear infinite, float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes spin {
  0% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(180deg) translateY(-8px); }
  100% { transform: rotate(360deg) translateY(0); }
}
@keyframes halo-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes inner-glow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.title {
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin: 0 0 6px;
  text-shadow: 0 0 30px rgba(212,175,55,0.4);
  font-family: 'Noto Serif SC', 'STSong', serif;
}

.subtitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.55em;
  color: rgba(212,175,55,0.55);
  margin: 0 0 18px;
}

.tagline {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-3);
  margin: 0;
  letter-spacing: 0.05em;
}

/* ====== 表单卡片 ====== */
.card-group {
  animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.field {
  margin-bottom: 16px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  padding-left: 4px;
  opacity: 0.85;
}

.field-optional {
  font-size: 10px;
  color: var(--text-4);
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
}

/* iOS-style select */
.select-wrap {
  position: relative;
}

.ios-select {
  width: 100%;
  padding: 16px 44px 16px 18px;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 0.5px solid var(--stroke);
  border-radius: 14px;
  color: var(--text-1);
  font-size: 16px;
  letter-spacing: 0.02em;
  outline: none;
  transition: all 0.2s var(--ease-out);
  background-image: none !important;
}

.ios-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gold);
  opacity: 0.6;
  pointer-events: none;
}

/* iOS-style segment */
.segment {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 0.5px solid var(--stroke);
  border-radius: 14px;
  padding: 4px;
}

.segment-btn {
  position: relative;
  z-index: 2;
  padding: 12px 8px;
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 15px;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 10px;
  transition: color 0.3s var(--ease-out);
}

.segment-btn.active {
  color: var(--gold-soft);
  font-weight: 600;
}

.segment-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(33.333% - 0px);
  background: rgba(212,175,55,0.15);
  border: 0.5px solid var(--stroke-strong);
  border-radius: 10px;
  transition: transform 0.35s var(--spring);
  transform: translateX(-200%);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(212,175,55,0.1);
}

.segment-indicator.pos-0 { transform: translateX(0); }
.segment-indicator.pos-1 { transform: translateX(100%); }
.segment-indicator.pos-2 { transform: translateX(200%); }

/* iOS-style input */
.ios-input {
  width: 100%;
  padding: 16px 18px;
  background: var(--card-bg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 0.5px solid var(--stroke);
  border-radius: 14px;
  color: var(--text-1);
  font-size: 16px;
  letter-spacing: 0.02em;
  outline: none;
  transition: all 0.2s var(--ease-out);
}

.ios-input::placeholder {
  color: var(--text-4);
}

.ios-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

/* 主按钮 */
.primary-btn {
  position: relative;
  width: 100%;
  padding: 18px 20px;
  margin-top: 28px;
  background: linear-gradient(135deg, #e8c470 0%, #d4af37 50%, #c89b3c 100%);
  border: none;
  border-radius: 16px;
  color: #1a0b2e;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3em;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 10px 30px -10px rgba(212,175,55,0.6),
    0 0 0 0.5px rgba(255,255,255,0.15) inset;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.primary-btn:active {
  transform: scale(0.97);
  box-shadow: 0 4px 15px -5px rgba(212,175,55,0.8);
}

.btn-text {
  position: relative;
  z-index: 2;
}

.btn-shine {
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  60%, 100% { left: 200%; }
}

.disclaimer {
  text-align: center;
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-4);
  margin: 20px 0 0;
  letter-spacing: 0.05em;
}
.legal-links {
  text-align: center;
  font-size: 11px;
  color: var(--text-4);
  margin: 8px 0 0;
  letter-spacing: 0.1em;
  opacity: 0.8;
}
.legal-links a {
  color: var(--gold, #d4af37);
  text-decoration: none;
  border-bottom: 0.5px solid rgba(212, 175, 55, 0.4);
  padding-bottom: 1px;
}
.legal-links a:active { opacity: 0.6; }
.legal-links .sep { margin: 0 8px; opacity: 0.5; }

/* ====== Loading ====== */
.loading-wrap {
  text-align: center;
  padding: 80px 0;
  animation: fadeUp 0.5s var(--ease-out);
}

.loading-text {
  margin-top: 32px;
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--gold-soft);
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: dot-pulse 1.4s infinite ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 60%, 100% { transform: scale(0.6); opacity: 0.4; }
  30% { transform: scale(1.3); opacity: 1; }
}

/* ====== Result / Poster ====== */
.result-wrap {
  animation: fadeUp 0.7s var(--ease-out);
}

.poster-card {
  background: linear-gradient(145deg, rgba(58,26,94,0.8) 0%, rgba(26,11,46,0.95) 100%);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 0.5px solid var(--stroke-strong);
  border-radius: 22px;
  padding: 3px;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.6),
    0 0 0 0.5px rgba(255,255,255,0.05) inset,
    0 0 60px rgba(212,175,55,0.1);
}

.poster-inner {
  padding: 28px 22px;
  border: 0.5px solid rgba(212,175,55,0.12);
  border-radius: 19px;
  position: relative;
}

.poster-inner::before,
.poster-inner::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(212,175,55,0.35);
}
.poster-inner::before {
  top: 12px; left: 12px;
  border-right: none; border-bottom: none;
  border-top-left-radius: 6px;
}
.poster-inner::after {
  bottom: 12px; right: 12px;
  border-left: none; border-top: none;
  border-bottom-right-radius: 6px;
}

.poster-header {
  text-align: center;
  margin-bottom: 24px;
}

.poster-brand {
  font-size: 10px;
  letter-spacing: 0.55em;
  color: rgba(212,175,55,0.6);
  margin: 0;
}

.divider-with-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 14px;
}

.divider-line {
  height: 1px;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.5), transparent);
}

.divider-text {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold-soft);
}

.poster-hexagram {
  font-size: 32px;
  font-weight: 400;
  letter-spacing: 0.4em;
  color: var(--gold);
  margin: 0 0 12px;
  text-shadow: 0 0 20px rgba(212,175,55,0.3);
  font-family: 'Noto Serif SC', 'STSong', serif;
}

.poster-verse {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-1);
  letter-spacing: 0.1em;
  margin: 0 0 16px;
  font-family: 'Noto Serif SC', 'STSong', serif;
}

.poster-level {
  display: inline-block;
  padding: 5px 14px;
  border: 0.5px solid var(--stroke-strong);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold-soft);
  background: rgba(212,175,55,0.08);
}

/* 结果行 */
.result-rows {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 0 4px;
  border-top: 0.5px dashed var(--stroke);
}

.result-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.result-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-top: 2px;
  opacity: 0.9;
}

.result-content {
  flex: 1;
  min-width: 0;
}

.result-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: rgba(212,175,55,0.65);
  margin-bottom: 4px;
}

.result-value {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-1);
  letter-spacing: 0.02em;
}

.miss-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.miss-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(15,23,42,0.6);
  border-radius: 999px;
  overflow: hidden;
  border: 0.5px solid var(--stroke);
}

.miss-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose) 0%, var(--gold) 100%);
  border-radius: 999px;
  transition: width 1.2s var(--ease-out);
  box-shadow: 0 0 10px rgba(212,175,55,0.5);
}

.miss-bar-score {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  min-width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 先生曰 */
.master-block {
  margin-top: 22px;
  padding: 18px;
  border: 0.5px solid rgba(212,175,55,0.3);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(212,175,55,0.1) 0%, rgba(232,103,126,0.05) 100%);
  position: relative;
  overflow: hidden;
}

.master-block::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.master-title {
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin: 0 0 10px;
}

.master-advice {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-1);
  margin: 0;
  letter-spacing: 0.05em;
  font-family: 'Noto Serif SC', 'STSong', serif;
  position: relative;
}

.poster-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 10px;
  color: var(--text-4);
  letter-spacing: 0.2em;
}

/* Action buttons */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.secondary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: rgba(212,175,55,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid var(--stroke-strong);
  border-radius: 14px;
  color: var(--gold-soft);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.secondary-btn:active {
  transform: scale(0.96);
  background: rgba(212,175,55,0.2);
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* chuanshu 导流 */
.chuanshu-entry {
  position: relative;
  display: block;
  margin-top: 20px;
  padding: 22px 20px;
  background: linear-gradient(135deg, rgba(232,103,126,0.2) 0%, rgba(138,43,226,0.25) 100%);
  border: 0.5px solid rgba(232,103,126,0.35);
  border-radius: 18px;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s var(--spring);
}

.chuanshu-entry:active {
  transform: scale(0.98);
}

.chuanshu-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(232,103,126,0.25) 0%, transparent 70%);
  animation: chuanshu-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

.chuanshu-eyebrow {
  font-size: 10px;
  letter-spacing: 0.4em;
  color: rgba(255,200,215,0.8);
  margin: 0 0 8px;
  position: relative;
}

.chuanshu-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5em;
  color: #ffd6dd;
  margin: 0 0 6px;
  position: relative;
  font-family: 'Noto Serif SC', serif;
}

.chuanshu-sub {
  font-size: 12px;
  color: rgba(255,214,221,0.6);
  margin: 0;
  letter-spacing: 0.05em;
  position: relative;
}

@keyframes chuanshu-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 通用动画 */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 尊重用户系统偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ====== Onboarding Disclaimer ====== */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(13, 6, 32, 0.85);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-top) + 24px) 20px calc(var(--safe-bottom) + 24px);
  animation: fadeIn 0.4s var(--ease-out);
}

.onboarding-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(145deg, rgba(58,26,94,0.95) 0%, rgba(26,11,46,0.98) 100%);
  border: 0.5px solid var(--stroke-strong);
  border-radius: 24px;
  padding: 32px 24px 24px;
  box-shadow:
    0 30px 80px -10px rgba(0,0,0,0.6),
    0 0 60px rgba(212,175,55,0.15);
  animation: onboardIn 0.6s var(--spring);
}

.onboarding-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.onboarding-title {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin: 0 0 4px;
}

.onboarding-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 22px;
  letter-spacing: 0.15em;
}

.onboarding-rules {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  background: rgba(15,23,42,0.4);
  border: 0.5px solid var(--stroke);
  border-radius: 14px;
}

.rule-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.rule-icon {
  flex-shrink: 0;
  font-size: 20px;
  margin-top: 2px;
}

.rule-en {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 0.02em;
}

.rule-zh {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
  letter-spacing: 0.05em;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes onboardIn {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* iPad / 桌面 */
@media (min-width: 768px) {
  .app-container {
    max-width: 480px;
    padding-top: calc(var(--safe-top) + 48px);
  }
}

/* ============ 金句卡 · Punchline Card ============ */
.punchline-wrap {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.punchline-eyebrow {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.42em;
  color: var(--text-4);
  margin: 0;
  text-indent: 0.42em;
}
.punchline-card {
  position: relative;
  aspect-ratio: 4 / 5;
  width: 100%;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 20% 12%, rgba(212,175,55,0.14) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 88%, rgba(138,43,226,0.22) 0%, transparent 55%),
    linear-gradient(165deg, #1a0b2e 0%, #2d1b4e 45%, #0d0620 100%);
  box-shadow:
    0 0 0 1px var(--stroke-strong),
    0 20px 50px rgba(13, 6, 32, 0.55),
    inset 0 0 60px rgba(212, 175, 55, 0.08);
  overflow: hidden;
}
.punchline-card::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid var(--gold-dim);
  border-radius: 14px;
  pointer-events: none;
}
.punchline-card::after {
  content: '✦';
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--gold);
  font-size: 14px;
  opacity: 0.5;
}
.punchline-inner {
  position: relative;
  height: 100%;
  padding: 36px 28px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  color: var(--text-1);
}
.punchline-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 18% 25%, rgba(254,243,199,0.7) 50%, transparent 100%),
    radial-gradient(1px 1px at 72% 18%, rgba(254,243,199,0.55) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 30% 78%, rgba(212,175,55,0.8) 50%, transparent 100%),
    radial-gradient(1px 1px at 85% 62%, rgba(254,243,199,0.6) 50%, transparent 100%),
    radial-gradient(1px 1px at 58% 45%, rgba(212,175,55,0.6) 50%, transparent 100%);
}
.punchline-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.48em;
  text-indent: 0.48em;
  color: var(--gold);
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.punchline-seal {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: 'STSong', 'SimSun', serif;
  color: var(--gold);
  letter-spacing: 0;
  text-indent: 0;
  background: rgba(212, 175, 55, 0.08);
}
.punchline-quote-mark {
  position: absolute;
  top: 72px;
  left: 28px;
  font-size: 72px;
  line-height: 0.6;
  color: var(--gold);
  opacity: 0.35;
  font-family: 'Georgia', serif;
  font-weight: 400;
}
.punchline-headline {
  position: relative;
  z-index: 1;
  font-family: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  font-size: 26px;
  line-height: 1.55;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: 0.04em;
  padding: 0 8px;
  max-height: 50%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  text-shadow: 0 2px 14px rgba(212, 175, 55, 0.25);
}
.punchline-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 78%;
  position: relative;
  z-index: 1;
}
.punchline-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-dim), transparent);
}
.punchline-divider-text {
  font-size: 11px;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  color: var(--gold);
  white-space: nowrap;
  font-weight: 600;
}
.punchline-meta-row {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.punchline-meta-cell {
  flex: 1;
  max-width: 140px;
  padding: 10px 8px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(45, 27, 78, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.punchline-meta-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--text-4);
  margin-bottom: 6px;
}
.punchline-meta-value {
  font-family: 'Noto Serif SC', 'STSong', serif;
  font-size: 17px;
  color: var(--gold-soft);
  font-weight: 600;
}
.punchline-footer {
  font-size: 10px;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  color: var(--text-4);
  position: relative;
  z-index: 1;
}
