/* 追星加油站 · 暗夜私人放映室 —— 纯 CSS，无外部字体 / 图标 */
:root {
  --bg: #09090d;
  --surface: #101118;
  --surface-2: #151621;
  --text: #f2efe9;
  --muted: rgba(242, 239, 233, 0.66);
  --faint: rgba(242, 239, 233, 0.42);
  --line: rgba(242, 239, 233, 0.09);
  --line-2: rgba(242, 239, 233, 0.16);
  --accent: #7b93ff;
  --accent-rgb: 123, 147, 255;
  --ink: #0a0b12;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-color: 0.7s;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, textarea { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 2px; }
p { margin: 0; }
[hidden] { display: none !important; }

/* ---------- 氛围层 ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient__layer {
  position: absolute; inset: -10% -30% 0;
  opacity: 0;
  transition: opacity 1.1s var(--ease);
  background:
    radial-gradient(60% 38% at 50% 0%, rgba(var(--g), 0.36), rgba(var(--g), 0) 70%),
    radial-gradient(48% 30% at 85% 72%, rgba(var(--g), 0.10), rgba(var(--g), 0) 70%),
    radial-gradient(42% 26% at 8% 48%, rgba(var(--g), 0.07), rgba(var(--g), 0) 70%);
}
.ambient__layer.is-on { opacity: 1; }
.ambient__beam {
  position: absolute; left: 50%; top: -12%; width: 140%; height: 70%;
  transform: translateX(-50%);
  background: conic-gradient(from 180deg at 50% 0%, transparent 168deg, rgba(242, 239, 233, 0.035) 176deg, rgba(242, 239, 233, 0.05) 180deg, rgba(242, 239, 233, 0.035) 184deg, transparent 192deg);
  filter: blur(6px);
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
}
.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  animation: grain 1.2s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); }
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  max-width: 520px; margin: 0 auto;
  padding: calc(var(--safe-top) + 6px) 14px 6px 16px;
  background: linear-gradient(to bottom, rgba(9, 9, 13, 0.92), rgba(9, 9, 13, 0.72) 70%, rgba(9, 9, 13, 0));
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.topbar__brand { display: flex; align-items: center; gap: 8px; min-height: 44px; min-width: 0; text-align: left; }
.topbar__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--accent);
  box-shadow: 0 0 10px 2px rgba(var(--accent-rgb), 0.55);
  transition: background-color var(--t-color) var(--ease), box-shadow var(--t-color) var(--ease);
}
.topbar__name { font-family: var(--serif); font-size: 16px; letter-spacing: 0.12em; white-space: nowrap; }
.topbar__sub { font-size: 12px; color: var(--faint); letter-spacing: 0.18em; white-space: nowrap; }
.topbar__actions { display: flex; align-items: center; gap: 4px; flex: none; }
.iconbtn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 12px;
  border-radius: 22px; color: var(--muted); font-size: 14px;
  transition: color 0.3s, background-color 0.3s;
}
.iconbtn--round { padding: 0; justify-content: center; }
.iconbtn:active { background: rgba(242, 239, 233, 0.06); color: var(--text); }

/* ---------- 舞台 & 视图 ---------- */
.stage {
  position: relative; z-index: 3;
  max-width: 520px; margin: 0 auto;
  padding: 8px 20px calc(40px + var(--safe-bottom));
  min-height: calc(100vh - 56px);
}
.view { animation: viewIn 0.6s var(--ease) both; }
.view.is-leaving { animation: viewOut 0.22s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes viewOut { to { opacity: 0; transform: translateY(-6px); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.32em; color: var(--faint); text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }
.title { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.35; letter-spacing: 0.06em; margin: 10px 0 8px; }
.lead { color: var(--muted); font-size: 15px; line-height: 1.8; }
.hero { padding: 18px 0 22px; }

.section { margin-top: 26px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section__label { font-size: 14px; color: var(--muted); letter-spacing: 0.14em; }
.section__hint { font-size: 12px; color: var(--faint); }

/* 选项片 */
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.chip {
  min-height: 50px; padding: 8px 6px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: rgba(16, 17, 24, 0.7);
  color: var(--text); font-size: 15px; letter-spacing: 0.06em;
  transition: border-color var(--t-color) var(--ease), background-color 0.4s var(--ease), color var(--t-color) var(--ease), box-shadow var(--t-color) var(--ease), transform 0.15s;
}
.chip:active { transform: scale(0.98); }
.chip.is-active {
  border-color: var(--accent); color: var(--accent);
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow: 0 0 0 0.5px var(--accent) inset, 0 0 22px -4px rgba(var(--accent-rgb), 0.45);
}

/* 应援色 */
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; }
.swatch {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-height: 74px; padding: 10px 2px 8px;
  border-radius: 14px; border: 1px solid transparent;
  color: var(--muted); font-size: 12px; letter-spacing: 0.08em;
  transition: border-color 0.4s, background-color 0.4s, color 0.4s;
}
.swatch__dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 45%), var(--sw);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 0 16px -2px var(--sw);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.swatch.is-active { border-color: var(--line-2); background: rgba(242, 239, 233, 0.04); color: var(--text); }
.swatch.is-active .swatch__dot { transform: scale(1.08); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--sw), 0 0 24px 0 var(--sw); }

/* 输入 */
.field {
  display: block; width: 100%; min-height: 50px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(16, 17, 24, 0.78);
  font-size: 16px; line-height: 1.6; color: var(--text);
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; border-color: rgba(var(--accent-rgb), 0.8); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14); }
textarea.field { min-height: 108px; resize: none; }
.field-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--faint); letter-spacing: 0.06em; }
.field-note svg { flex: none; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 25px;
  font-size: 16px; letter-spacing: 0.12em; text-align: center;
  transition: background-color var(--t-color) var(--ease), color var(--t-color) var(--ease), border-color var(--t-color) var(--ease), box-shadow var(--t-color) var(--ease), opacity 0.3s, transform 0.15s;
}
.btn:active { transform: scale(0.985); }
.btn--primary {
  background: var(--accent); color: var(--ink); font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(var(--accent-rgb), 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.btn--primary.is-muted { opacity: 0.45; box-shadow: none; }
.btn--ghost { border: 1px solid var(--line-2); color: var(--text); background: rgba(16, 17, 24, 0.6); }
.btn--ghost.is-accent { border-color: rgba(var(--accent-rgb), 0.6); color: var(--accent); }
.btn--text { min-height: 44px; padding: 0 10px; color: var(--muted); font-size: 14px; letter-spacing: 0.08em; }
.btn--block { display: flex; width: 100%; }
.btn--danger { color: #f1a3a3; }
.cta { margin-top: 34px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack { display: grid; gap: 10px; }

/* 卡片 / 银幕 */
.card {
  position: relative; border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(21, 22, 33, 0.86), rgba(13, 14, 20, 0.86));
  padding: 20px 18px;
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.9);
}
.card--glow {
  border-color: rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 0 0 0.5px rgba(var(--accent-rgb), 0.2) inset, 0 24px 60px -36px rgba(var(--accent-rgb), 0.55);
  transition: border-color var(--t-color), box-shadow var(--t-color);
}
.quote { font-family: var(--serif); font-size: 19px; line-height: 1.9; letter-spacing: 0.04em; }
.quote--lg { font-size: 21px; }
.speaker { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; color: var(--accent); letter-spacing: 0.28em; transition: color var(--t-color); }
.speaker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }

/* 渐显 */
.reveal { opacity: 0; transform: translateY(10px); filter: blur(2px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; filter: none; }

/* 入场 */
.mood-chips .chip { min-height: 56px; font-family: var(--serif); font-size: 18px; letter-spacing: 0.2em; }
.greeting { margin-top: 22px; }
.greeting .quote { min-height: 3.8em; }

/* 选片 */
.films { display: grid; gap: 14px; }
.film {
  position: relative; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(var(--accent-rgb), 0.10), transparent 55%),
    linear-gradient(160deg, #13141d 0%, #0d0e14 100%);
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.film::before { /* 胶片齿孔 */
  content: ""; position: absolute; left: 10px; top: 12px; bottom: 12px; width: 6px;
  background: repeating-linear-gradient(to bottom, rgba(242, 239, 233, 0.12) 0 6px, transparent 6px 14px);
  border-radius: 2px;
}
.film.is-open { border-color: rgba(var(--accent-rgb), 0.45); box-shadow: 0 24px 60px -34px rgba(var(--accent-rgb), 0.6); }
.film__head { display: block; width: 100%; text-align: left; padding: 20px 18px 18px 32px; min-height: 44px; }
.film__meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--faint); letter-spacing: 0.22em; }
.film__en { text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.film__title { display: block; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: 0.12em; margin-top: 8px; }
.film__seen { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.film__seen i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.film__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.film.is-open .film__body { grid-template-rows: 1fr; }
.film__inner { overflow: hidden; }
.film__choices { padding: 0 18px 18px 32px; }

/* 放映 */
.screen-head { padding: 14px 0 6px; }
.screen-head .title { font-size: 24px; margin-bottom: 4px; }
.scene-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.scene-name { color: var(--muted); font-size: 14px; letter-spacing: 0.08em; min-width: 0; }
.scene-name b { font-weight: 500; color: var(--text); }
.switch {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 22px;
  border: 1px solid var(--line-2); color: var(--muted); font-size: 13px; letter-spacing: 0.08em;
}
.switch:active { color: var(--text); }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.4); color: var(--accent);
  font-size: 12px; letter-spacing: 0.14em; transition: color var(--t-color), border-color var(--t-color);
}
.intro { margin-top: 16px; }
.intro .tag { margin-bottom: 12px; }
.intro p { font-size: 16px; line-height: 1.95; color: rgba(242, 239, 233, 0.88); }
.pause { margin-top: 18px; }
.pause__label { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--faint); letter-spacing: 0.3em; margin-bottom: 10px; }
.pause__label svg { color: var(--accent); transition: color var(--t-color); }
.pause__q { font-family: var(--serif); font-size: 19px; line-height: 1.75; letter-spacing: 0.03em; margin-bottom: 16px; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  min-height: 52px; padding: 13px 14px; text-align: left;
  border-radius: 14px; border: 1px solid var(--line-2); background: rgba(9, 9, 13, 0.5);
  font-size: 15px; line-height: 1.65;
  transition: border-color 0.5s var(--ease), background-color 0.5s var(--ease), opacity 0.5s var(--ease), color 0.5s;
}
.option__key {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); font-size: 12px; color: var(--muted); font-family: var(--serif);
  transition: all 0.5s var(--ease);
}
.options.is-locked .option { pointer-events: none; }
.options.is-locked .option:not(.is-chosen) { opacity: 0.38; }
.option.is-chosen { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }
.option.is-chosen .option__key { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.answer { margin-top: 16px; display: grid; gap: 14px; }
.perspective p { font-size: 16px; line-height: 2; color: rgba(242, 239, 233, 0.9); }

/* 散场 */
.curtain { padding: 26px 0 6px; text-align: left; }
.curtain .quote { font-size: 21px; }
.homework { margin-top: 24px; }
.homework__invite { color: var(--muted); font-size: 14px; letter-spacing: 0.04em; }
.homework__q { font-family: var(--serif); font-size: 19px; line-height: 1.75; margin: 10px 0 14px; }
.saved { margin-top: 16px; }
.next { margin-top: 20px; }

/* 手账 */
.journal-list { display: grid; gap: 12px; margin-top: 8px; }
.entry { padding: 16px 16px 10px; }
.entry__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); letter-spacing: 0.08em; }
.entry__film { font-family: var(--serif); font-size: 18px; margin-top: 6px; letter-spacing: 0.04em; }
.entry__scene { font-size: 13px; color: var(--muted); margin-top: 2px; }
.entry__k { font-size: 12px; color: var(--faint); letter-spacing: 0.18em; margin-top: 12px; }
.entry__v { font-size: 15px; line-height: 1.75; margin-top: 2px; }
.entry__v.is-empty { color: var(--faint); }
.entry__q { font-size: 13px; color: var(--muted); margin-top: 2px; }
.entry__foot { display: flex; justify-content: flex-end; margin-top: 4px; }
.empty { padding: 40px 10px; text-align: center; color: var(--faint); font-size: 15px; line-height: 1.9; }
.empty svg { display: block; margin: 0 auto 14px; color: rgba(var(--accent-rgb), 0.6); }
.divider { height: 1px; background: var(--line); margin: 26px 0 8px; }

/* 反馈 */
.questions { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; counter-reset: q; }
.questions li {
  counter-increment: q; position: relative;
  padding: 14px 16px 14px 50px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(16, 17, 24, 0.6); font-size: 15px; line-height: 1.75;
}
.questions li::before {
  content: counter(q, decimal-leading-zero); position: absolute; left: 16px; top: 15px;
  font-family: var(--serif); font-size: 13px; color: var(--accent); letter-spacing: 0.06em; transition: color var(--t-color);
}
.btn--hero { min-height: 56px; font-size: 17px; border-radius: 28px; }
.fine { margin-top: 10px; font-size: 12px; color: var(--faint); text-align: center; letter-spacing: 0.06em; }

/* 抽屉 / 弹窗 / 提示 */
.sheet, .dialog { position: fixed; inset: 0; z-index: 50; }
.sheet__scrim, .dialog__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); animation: fade 0.25s ease both; }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px;
  padding: 10px 16px calc(16px + var(--safe-bottom));
  background: #12131b; border-top-left-radius: 20px; border-top-right-radius: 20px;
  border-top: 1px solid var(--line-2);
  animation: up 0.35s var(--ease) both;
}
.sheet__handle { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 10px; }
.sheet__item { display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 6px; border-bottom: 1px solid var(--line); font-size: 16px; text-align: left; }
.sheet__item--danger { color: #f1a3a3; }
.sheet__note { font-size: 12px; color: var(--faint); padding: 12px 6px 4px; }
.sheet__close { display: block; width: 100%; min-height: 48px; margin-top: 8px; border-radius: 24px; background: rgba(242, 239, 233, 0.06); color: var(--muted); }
.dialog { display: flex; align-items: center; justify-content: center; padding: 24px; }
.dialog__panel {
  position: relative; width: 100%; max-width: 340px; padding: 22px 18px 18px;
  border-radius: 18px; background: #14151e; border: 1px solid var(--line-2);
  animation: pop 0.28s var(--ease) both;
}
.dialog__text { font-size: 16px; line-height: 1.8; margin-bottom: 18px; }
.dialog__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toast {
  position: fixed; left: 50%; bottom: calc(28px + var(--safe-bottom)); z-index: 60;
  max-width: calc(100% - 48px); padding: 12px 18px; border-radius: 22px;
  background: rgba(30, 31, 42, 0.96); border: 1px solid var(--line-2);
  color: var(--text); font-size: 14px; line-height: 1.5; text-align: center;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: relative; z-index: 5; padding: 40px 24px; text-align: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } }

@media (max-width: 350px) {
  .title { font-size: 25px; }
  .topbar__sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 双列按钮：收紧字距，避免 375px 下换行 */
.row2 .btn { padding: 0 10px; letter-spacing: 0.06em; white-space: nowrap; }
