/* ═══════════════════════════════════════════
   拾光机 · 视觉系统
   暖胶片 / 宋体标题 / 深色底 / 移动优先
   ═══════════════════════════════════════════ */

:root {
  --bg: #0c0a09;
  --bg-2: #100d0b;
  --surface: #17130f;
  --surface-2: #1e1813;
  --line: rgba(243, 233, 216, 0.12);
  --line-strong: rgba(243, 233, 216, 0.26);
  --text: #f4ecdd;
  --muted: #a99b87;
  --muted-2: #7c7060;
  --accent: #e6a768;
  --accent-2: #c9794f;
  --rose: #d78e80;
  --green: #8fae8b;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Songti TC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.85);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --header-h: 58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.01em; margin: 0; }
p { margin: 0; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── 通用元素 ────────────────────────────── */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(230, 167, 104, 0.6);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active { transform: scale(0.975); }
.btn:disabled { opacity: 0.42; pointer-events: none; }
.btn-primary {
  color: #24160c;
  background: linear-gradient(135deg, #f0b97f 0%, var(--accent) 46%, #cf814f 100%);
  box-shadow: 0 12px 30px -12px rgba(230, 167, 104, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-tail {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(36, 22, 12, 0.16);
  letter-spacing: 0.1em;
}
.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.055); }
.btn-outline {
  color: var(--text);
  background: transparent;
  border-color: var(--line-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 17px 40px; font-size: 16px; }
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }

.icon-btn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex: none;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm svg { width: 18px; height: 18px; }
.icon-btn.is-on { color: var(--accent); }

.pill {
  font-size: 10px;
  letter-spacing: 0.16em;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--accent);
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: rgba(230, 167, 104, 0.4);
  text-underline-offset: 3px;
  cursor: pointer;
}
.fine { color: var(--muted-2); font-size: 12px; }

/* ── 落地页 ──────────────────────────────── */

.screen { min-height: 100dvh; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + var(--safe-t)) clamp(20px, 5vw, 56px) 14px;
  max-width: 1180px; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark { width: 30px; height: 30px; color: var(--accent); display: grid; place-items: center; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { font-family: var(--serif); font-size: 19px; letter-spacing: 0.12em; }
.pill-quiet { opacity: 0.75; }

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 70px) clamp(20px, 5vw, 56px) clamp(40px, 6vw, 60px);
  display: grid;
  gap: clamp(32px, 5vw, 60px);
  align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 {
  font-size: clamp(38px, 8.6vw, 68px);
  line-height: 1.16;
  letter-spacing: 0.005em;
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #f6d9b3 0%, var(--accent) 42%, #c97a52 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.85;
  max-width: 440px;
  margin-bottom: 30px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .btn-primary { flex: 1 1 190px; }
.hero-cta .btn-ghost { flex: 1 1 150px; }
.trust {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  list-style: none; padding: 0; margin: 26px 0 0;
  color: var(--muted-2); font-size: 12px; letter-spacing: 0.04em;
}
.trust li { position: relative; padding-left: 13px; }
.trust li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 4px; height: 4px; margin-top: -2px;
  border-radius: 50%; background: var(--accent); opacity: 0.6;
}

.hero-visual {
  position: relative;
  min-height: 340px;
  height: clamp(360px, 58vw, 560px);
  margin: 0 auto;
  width: 100%;
  max-width: 520px;
}
.hero-glow {
  position: absolute; inset: 10% 0 0 10%;
  background: radial-gradient(ellipse at 60% 40%, rgba(230, 167, 104, 0.22), transparent 62%);
  filter: blur(20px);
  z-index: 0;
}
.frame {
  position: absolute;
  border-radius: 6px;
  overflow: hidden;
  background: #1a1512;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-back { width: 46%; aspect-ratio: 3 / 4; left: 4%; top: 3%; transform: rotate(-7deg); opacity: 0.55; }
.frame-mid { width: 50%; aspect-ratio: 3 / 4; right: 1%; top: 14%; transform: rotate(6deg); opacity: 0.8; }
.frame-front {
  width: 61%; aspect-ratio: 3 / 4;
  left: 20%; top: 24%;
  z-index: 2;
  animation: floaty 9s ease-in-out infinite;
}
.frame-front::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8, 6, 4, 0.85), transparent 55%);
}
.frame-caption {
  position: absolute; left: 16px; right: 16px; bottom: 17px;
  z-index: 1;
}
.frame-kicker {
  font-size: 9px; letter-spacing: 0.28em; color: var(--accent); text-transform: uppercase;
  display: block; margin-bottom: 6px;
}
.frame-caption p {
  font-family: var(--serif);
  font-size: clamp(14px, 3.6vw, 17px);
  line-height: 1.55;
  color: #f8efe0;
  letter-spacing: 0.04em;
}
.frame-time {
  position: absolute; top: 12px; right: 14px; z-index: 1;
  font-size: 10px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 15px 0;
  margin: 0 0 clamp(48px, 9vw, 96px);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.strip-inner {
  display: flex; align-items: center; gap: 26px;
  width: max-content;
  animation: marquee 46s linear infinite;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.3em;
}
.strip-inner i { width: 3px; height: 3px; border-radius: 50%; background: var(--accent); opacity: 0.5; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 44px); }
.section-head h2 {
  font-size: clamp(26px, 5.6vw, 40px);
  line-height: 1.35;
  text-wrap: balance;
}
.how, .moments, .privacy, .final-cta {
  padding: clamp(20px, 4vw, 40px) clamp(20px, 5vw, 56px);
  max-width: 1180px;
  margin: 0 auto;
}
.how { margin-bottom: clamp(56px, 10vw, 110px); }
.how-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 0;
  border-top: 1px solid var(--line);
}
.how-list li {
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-areas: "num title" "num text";
  gap: 2px 18px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--line);
}
.how-num {
  grid-area: num;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
  padding-top: 4px;
  letter-spacing: 0.06em;
}
.how-list h3 { grid-area: title; font-size: 19px; letter-spacing: 0.02em; }
.how-list p { grid-area: text; color: var(--muted); font-size: 14px; max-width: 520px; }

.moments { margin-bottom: clamp(56px, 10vw, 110px); }
.moment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.moment {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.028), transparent 60%);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
  cursor: pointer;
}
.moment:hover { border-color: rgba(230, 167, 104, 0.4); background: rgba(230, 167, 104, 0.04); transform: translateY(-2px); }
.moment-glyph {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(230, 167, 104, 0.35);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 16px;
  margin-bottom: 14px;
}
.moment h3 { font-size: 17px; margin-bottom: 5px; letter-spacing: 0.04em; }
.moment p { color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.privacy { margin-bottom: clamp(56px, 10vw, 100px); }
.privacy-card {
  display: flex; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(215, 142, 128, 0.09), transparent 55%),
    var(--bg-2);
}
.privacy-icon { color: var(--accent); flex: none; width: 34px; height: 34px; }
.privacy-icon svg { width: 100%; height: 100%; }
.privacy-card h2 { font-size: clamp(20px, 4.4vw, 26px); margin-bottom: 8px; }
.privacy-card p { color: var(--muted); font-size: 13.5px; line-height: 1.8; max-width: 640px; }

.final-cta {
  text-align: center;
  padding-top: clamp(40px, 8vw, 80px);
  padding-bottom: clamp(60px, 12vw, 120px);
}
.final-cta h2 { font-size: clamp(28px, 6.4vw, 46px); line-height: 1.35; margin-bottom: 28px; }
.final-cta .fine { margin-top: 16px; letter-spacing: 0.06em; }

.footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(20px, 5vw, 56px) calc(40px + var(--safe-b));
  max-width: 1180px; margin: 0 auto;
  color: var(--muted-2); font-size: 12px;
}
.footer-brand { font-family: var(--serif); color: var(--text); font-size: 16px; letter-spacing: 0.14em; margin-bottom: 10px; }
.footer-brand span { font-size: 9px; letter-spacing: 0.3em; color: var(--muted-2); margin-left: 8px; }
.footer-fine { margin-top: 8px; opacity: 0.75; }

/* ── 制作流程外壳 ────────────────────────── */

.screen.app {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(230, 167, 104, 0.07), transparent 60%),
    var(--bg);
  max-width: 620px;
  margin: 0 auto;
  border-left: 1px solid rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.03);
}
.app-nav {
  flex: none;
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: calc(6px + var(--safe-t)) 10px 6px;
  background: linear-gradient(to bottom, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.82) 70%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.steps {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 11px; letter-spacing: 0.08em; color: var(--muted-2);
  white-space: nowrap;
}
.steps span { transition: color 0.25s; padding: 3px 2px; }
.steps span.is-on { color: var(--accent); }
.steps span.is-done { color: var(--muted); }
.steps i { width: 12px; height: 1px; background: var(--line); }
#step-host {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px clamp(18px, 5vw, 30px) 30px;
  scrollbar-width: none;
}
#step-host::-webkit-scrollbar { display: none; }
.step { animation: stepIn 0.42s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.step-head { padding: 12px 0 26px; }
.step-head h2 {
  font-size: clamp(25px, 6.6vw, 32px);
  line-height: 1.34;
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}
.step-sub { color: var(--muted); font-size: 13px; line-height: 1.7; }

.field { margin-bottom: 24px; }
.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  margin-bottom: 10px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--text);
  font-size: 16px; /* 防止 iOS 自动放大 */
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
}
.input::placeholder { color: var(--muted-2); opacity: 0.8; }
.input:focus { outline: none; border-color: rgba(230, 167, 104, 0.55); background: var(--surface-2); }
textarea.input { resize: vertical; min-height: 62px; line-height: 1.7; }
.input-title {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--line);
  border-radius: 0;
}
.input-title:focus { border-color: transparent; border-bottom-color: var(--accent); background: transparent; }

.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.theme-card {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.03), transparent 65%);
  padding: 15px 14px 13px;
  cursor: pointer;
  transition: border-color 0.22s, background 0.22s, transform 0.16s;
  overflow: hidden;
}
.theme-card::after {
  content: ""; position: absolute; inset: auto -30% -60% auto;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 167, 104, 0.16), transparent 70%);
  opacity: 0; transition: opacity 0.3s;
}
.theme-card:active { transform: scale(0.985); }
.theme-card.is-on { border-color: rgba(230, 167, 104, 0.62); background: rgba(230, 167, 104, 0.07); }
.theme-card.is-on::after { opacity: 1; }
.theme-card .t-glyph {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 10px;
  opacity: 0.9;
}
.theme-card h3 { font-size: 15px; font-family: var(--sans); letter-spacing: 0.03em; margin-bottom: 3px; font-weight: 500; }
.theme-card p { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-on {
  color: #2a180c;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 500;
}
.chips-sm .chip { padding: 8px 14px; font-size: 12.5px; }

/* ── 素材 ─────────────────────────────────── */

.add-row { display: flex; gap: 9px; margin-bottom: 16px; }
.add-row .btn { flex: 1; padding: 13px 10px; font-size: 13.5px; border-radius: 12px; }
.add-row .btn svg { width: 17px; height: 17px; }
.media-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--muted-2);
  margin-bottom: 14px;
}
.media-meta .link-btn { font-size: 12px; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.media-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  animation: popIn 0.3s ease both;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
.media-item img { width: 100%; height: 100%; object-fit: cover; }
.media-item.is-first { border-color: rgba(230, 167, 104, 0.6); }
.media-badge {
  position: absolute; left: 6px; top: 6px;
  font-size: 9px; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(8, 6, 4, 0.72);
  color: var(--text);
  backdrop-filter: blur(4px);
}
.media-badge.video { color: #f3d3a9; }
.media-actions {
  position: absolute; right: 4px; top: 4px;
  display: flex; gap: 3px;
}
.media-actions button {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(8, 6, 4, 0.62);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(4px);
  font-size: 13px; line-height: 1;
}
.media-actions button:disabled { opacity: 0.25; }
.media-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 7px 5px;
  background: linear-gradient(to top, rgba(8, 6, 4, 0.8), transparent);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.7);
  display: flex; justify-content: space-between;
  pointer-events: none;
}
.media-empty {
  text-align: center;
  padding: 46px 20px 30px;
  border: 1px dashed rgba(243, 233, 216, 0.16);
  border-radius: var(--r);
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.8;
  margin-bottom: 16px;
}
.media-empty-art { display: flex; justify-content: center; gap: 7px; margin-bottom: 18px; }
.media-empty-art span {
  width: 34px; height: 44px;
  border-radius: 4px;
  border: 1px solid rgba(230, 167, 104, 0.3);
  opacity: 0.5;
}
.media-empty-art span:nth-child(2) { transform: translateY(-8px) rotate(-5deg); opacity: 0.8; }
.media-empty-art span:nth-child(3) { transform: rotate(5deg); }
.tip { margin-top: 14px; font-size: 11.5px; color: var(--muted-2); line-height: 1.7; }

/* ── 编导 ─────────────────────────────────── */

.story-loading { padding: 40px 0 30px; text-align: center; }
.loading-orbit {
  position: relative;
  width: 74px; height: 74px;
  margin: 0 auto 26px;
  border: 1px solid rgba(230, 167, 104, 0.2);
  border-radius: 50%;
  animation: spin 4s linear infinite;
}
.loading-orbit::before {
  content: ""; position: absolute; inset: 16px;
  border: 1px solid rgba(230, 167, 104, 0.4);
  border-radius: 50%;
}
.loading-orbit i {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(230, 167, 104, 0.5);
  top: 50%; left: 50%;
}
.loading-orbit i:nth-child(1) { transform: rotate(0deg) translateX(37px); }
.loading-orbit i:nth-child(2) { transform: rotate(120deg) translateX(37px); opacity: 0.7; }
.loading-orbit i:nth-child(3) { transform: rotate(240deg) translateX(37px); opacity: 0.45; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-line { font-family: var(--serif); font-size: 17px; letter-spacing: 0.04em; }
.loading-fine { font-size: 11.5px; color: var(--muted-2); margin-top: 7px; }

.story-meta {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 16px;
}
.story-meta .field-label:not(:first-child) { margin-top: 14px; }
.story-meta .input { background: transparent; border-color: transparent; padding-left: 0; padding-right: 0; }
.story-meta .input:focus { border-color: transparent; border-bottom-color: rgba(230, 167, 104, 0.5); background: transparent; }
.story-meta .input-area { min-height: 52px; }
.story-source {
  margin-top: 10px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  display: flex; align-items: center; gap: 6px;
}
.story-source i { width: 4px; height: 4px; border-radius: 50%; background: var(--green); }
.story-source.is-local i { background: var(--muted-2); }

.storyboard { display: flex; flex-direction: column; gap: 9px; }
.scene-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px;
  background: var(--surface);
  align-items: start;
}
.scene-thumb {
  position: relative;
  width: 62px; aspect-ratio: 3 / 4;
  border-radius: 7px;
  overflow: hidden;
  background: #000;
}
.scene-thumb img { width: 100%; height: 100%; object-fit: cover; }
.scene-thumb .scene-num {
  position: absolute; left: 4px; top: 4px;
  font-size: 9px; color: rgba(255, 255, 255, 0.85);
  background: rgba(8, 6, 4, 0.6);
  padding: 1px 5px; border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.scene-thumb .scene-pip {
  position: absolute; right: 2px; bottom: 2px;
  font-size: 8px; padding: 1px 4px;
  border-radius: 3px;
  background: rgba(230, 167, 104, 0.85);
  color: #24160c;
}
.scene-edit { min-width: 0; }
.scene-edit textarea {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  resize: none;
  padding: 4px 0 6px;
  min-height: 48px;
  overflow: hidden;
}
.scene-edit textarea:focus { outline: none; border-bottom: 1px dashed rgba(230, 167, 104, 0.45); }
.scene-info {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px; color: var(--muted-2);
  letter-spacing: 0.04em;
}
.scene-info span { white-space: nowrap; }
.scene-info .dot-sep { opacity: 0.4; }
.scene-tools { margin-left: auto; display: flex; gap: 2px; }
.scene-tools button {
  border: 0; background: transparent; color: var(--muted-2);
  width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; display: grid; place-items: center; font-size: 12px;
}
.scene-tools button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.story-end { margin-top: 16px; }
.story-actions { display: flex; gap: 10px; margin-top: 12px; }
.story-actions .btn { flex: 1; padding: 12px 10px; font-size: 13px; border-radius: 10px; }

/* ── 成片 ─────────────────────────────────── */

.step-preview .step-head { padding-bottom: 18px; }
.player {
  position: relative;
  margin: 0 auto 14px;
  width: 100%;
  max-width: var(--stage-w, 330px);
}
.stage {
  position: relative;
  margin: 0 auto;
  width: 100%;
  aspect-ratio: var(--ar, 9 / 16);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.stage canvas { width: 100%; height: 100%; display: block; }
.play-overlay {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: end center;
  padding-bottom: 76px;
  border: 0; background: rgba(8, 6, 4, 0.14);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: opacity 0.25s, background 0.25s;
}
.play-overlay svg {
  width: 48px; height: 48px;
  padding: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(10, 8, 6, 0.4);
  backdrop-filter: blur(6px);
}
.play-overlay:hover { background: rgba(8, 6, 4, 0.12); }
.play-overlay.is-hidden { opacity: 0; pointer-events: none; }
.stage-meta {
  position: absolute; right: 12px; top: 12px; left: auto; z-index: 2;
  font-size: 9.5px; letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  display: flex; gap: 8px;
  pointer-events: none;
}
.player-bar {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  z-index: 3;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(8, 6, 4, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.scrub {
  flex: 1; height: 22px;
  display: flex; align-items: center;
  cursor: pointer;
  touch-action: none;
}
.scrub::before {
  content: ""; width: 100%; height: 2px;
  background: rgba(243, 233, 216, 0.16);
  border-radius: 2px;
}
.scrub { position: relative; }
.scrub-fill {
  position: absolute; left: 0; top: 50%;
  height: 2px; margin-top: -1px;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  pointer-events: none;
}
.scrub-fill::after {
  content: ""; position: absolute; right: -4px; top: 50%;
  width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(230, 167, 104, 0.6);
}
.time { font-size: 10.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.scene-strip {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 12px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.scene-strip::-webkit-scrollbar { display: none; }
.strip-item {
  flex: none;
  width: 58px;
  scroll-snap-align: center;
  cursor: pointer;
  border: 0; background: none; padding: 0;
  text-align: left;
}
.strip-thumb {
  position: relative;
  width: 58px; aspect-ratio: 3 / 4;
  border-radius: 7px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s;
}
.strip-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.strip-item.is-on .strip-thumb { border-color: var(--accent); }
.strip-item.is-on .strip-thumb img { opacity: 1; }
.strip-item span {
  display: block; font-size: 9px; color: var(--muted-2);
  margin-top: 5px; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.preview-notes p { font-size: 11.5px; color: var(--muted-2); line-height: 1.7; }

/* ── 底部操作条 ──────────────────────────── */

.app-footer {
  flex: none;
  position: sticky; bottom: 0; z-index: 20;
  padding: 10px clamp(18px, 5vw, 30px) calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 55%, rgba(12, 10, 9, 0.86) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.app-footer .hint {
  text-align: center;
  font-size: 10.5px;
  color: var(--muted-2);
  margin-bottom: 8px;
  min-height: 14px;
  letter-spacing: 0.03em;
}
.app-footer .btn-block { padding: 15px 20px; }

/* ── 导出面板 ────────────────────────────── */

.sheet {
  position: fixed; inset: 0; z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(4, 3, 2, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet[hidden] { display: none; }
.sheet-card {
  width: 100%;
  max-width: 620px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--bg-2);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-top: 1px solid var(--line);
  padding: 10px clamp(20px, 5vw, 30px) calc(26px + var(--safe-b));
  animation: sheetUp 0.34s cubic-bezier(0.22, 0.9, 0.3, 1);
  scrollbar-width: none;
}
.sheet-card::-webkit-scrollbar { display: none; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.sheet-grab {
  width: 36px; height: 4px; border-radius: 4px;
  background: rgba(243, 233, 216, 0.2);
  margin: 4px auto 18px;
}
.sheet-card h2 { font-size: 24px; margin-bottom: 6px; letter-spacing: 0.02em; }
.sheet-sub { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin-bottom: 18px; }
.sheet-card .field { margin-bottom: 16px; }
.sheet-card .btn-block { margin-bottom: 9px; padding: 14px 20px; }
.sheet-card video {
  width: 100%;
  max-height: 46dvh;
  border-radius: 12px;
  background: #000;
  margin: 10px 0 12px;
}
.export-warn {
  border: 1px solid rgba(215, 142, 128, 0.35);
  background: rgba(215, 142, 128, 0.08);
  color: #e8b6a8;
  font-size: 11.5px;
  line-height: 1.65;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.progress {
  height: 4px;
  border-radius: 4px;
  background: rgba(243, 233, 216, 0.12);
  overflow: hidden;
  margin: 20px 0 10px;
}
.progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 4px;
  transition: width 0.25s linear;
}
.progress-time { text-align: right; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.row-toggle {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.switch {
  width: 44px; height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  position: relative;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex: none;
}
.switch i {
  position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted);
  transition: transform 0.22s, background 0.22s;
}
.switch.is-on { background: rgba(230, 167, 104, 0.2); border-color: rgba(230, 167, 104, 0.6); }
.switch.is-on i { transform: translateX(18px); background: var(--accent); }
.result-stage { position: relative; margin: 10px 0 12px; }
.result-poster, .result-stage video {
  width: 100%;
  max-height: 46dvh;
  border-radius: 12px;
  background: #000;
  display: block;
  margin: 0;
  object-fit: contain;
}
.result-stage video { object-fit: contain; }
.result-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border: 0; background: rgba(6, 4, 3, 0.12);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  border-radius: 12px;
}
.result-play svg {
  width: 58px; height: 58px; padding: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(8, 6, 4, 0.42);
  backdrop-filter: blur(6px);
}
.result-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 4px; }
.result-actions .btn { padding: 13px 20px; }

/* ── toast ───────────────────────────────── */

.toast {
  position: fixed;
  left: 50%; bottom: calc(26px + var(--safe-b));
  transform: translate(-50%, 20px);
  z-index: 700;
  max-width: min(88vw, 420px);
  background: rgba(28, 22, 17, 0.96);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s, transform 0.26s;
  text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── 响应式 ──────────────────────────────── */

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; }
  .theme-grid { grid-template-columns: repeat(3, 1fr); }
  .media-grid { grid-template-columns: repeat(4, 1fr); }
  .moment-grid { grid-template-columns: repeat(3, 1fr); }
  .how-list { grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
  .how-list li {
    grid-template-columns: 1fr;
    grid-template-areas: "num" "title" "text";
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: 26px 24px 30px;
    gap: 4px;
  }
  .how-list li:first-child { padding-left: 0; }
  .how-list li:last-child { border-right: 0; }
  .how-num { margin-bottom: 18px; }
  .player { max-width: min(360px, var(--stage-w, 360px)); }
}

@media (min-width: 1000px) {
  .hero-visual { height: 560px; }
  .screen.app { box-shadow: 0 0 120px rgba(0, 0, 0, 0.7); }
}

@media (max-width: 380px) {
  .hero h1 .h1-b { display: block; }

  .theme-card p { display: none; }
  .theme-card { padding: 13px 12px; }
  .steps { font-size: 10px; gap: 3px; }
  .steps i { width: 8px; }
  .two-col { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 小屏：成片页把标题收起来，让画面先占满 */
@media (max-height: 800px) and (max-width: 640px) {
  .step-preview .step-head { display: none; }
  .step-preview { padding-top: 6px; }
  .preview-notes { display: none; }
}
@media (max-width: 640px) {
  .screen.app[data-step="4"] .app-footer { padding-top: 4px; }
  .screen.app[data-step="4"] .app-footer .hint { display: none; }
  .screen.app[data-step="4"] .app-footer .btn-block { padding: 12px 20px; }
  .step-preview { padding-bottom: 8px; }
  .step-preview .scene-strip { padding-top: 2px; }
}

@media (min-width: 760px) {
  .hero-copy { max-width: 640px; }
  .hero h1 { font-size: clamp(44px, 4.6vw, 60px); }
}
