/* ===== 第三幕通用 ===== */
#scene-act3-photo, #scene-act3-poster, #scene-act3-voice {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(217, 164, 65, 0.18), transparent 55%),
    linear-gradient(180deg, #f2d9a6 0%, #f7efe2 40%, #efe2c8 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.a3-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 5vh 6vw 6vh;
  max-width: 620px;
  margin: 0 auto;
}
.a3-title {
  font-family: var(--font-kai);
  font-size: clamp(18px, 3.2vmin, 26px);
  color: var(--red-deep);
  text-align: center;
  letter-spacing: 2px;
  line-height: 1.6;
}
.a3-sub {
  font-family: var(--font-kai);
  font-size: clamp(14px, 2.4vmin, 18px);
  color: var(--ink);
  text-align: center;
}
.a3-canvas {
  width: min(78vw, 340px);
  aspect-ratio: 750 / 1334;
  height: auto;
  border-radius: 10px;
  border: 2px solid var(--gold);
  box-shadow: 0 12px 30px rgba(43, 35, 32, .3);
  background: var(--paper);
}
.a3-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.a3-bg-btn { font-size: 14px; padding: 8px 16px; opacity: .65; }
.a3-bg-btn--on {
  opacity: 1;
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  color: var(--gold-pale);
  box-shadow: 0 4px 14px rgba(143, 31, 31, 0.4);
}
.a3-input {
  font-family: var(--font-kai);
  font-size: 16px;
  padding: 10px 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  width: min(42vw, 200px);
  outline: none;
}
.a3-input:focus { border-color: var(--red); }
.a3-generate { font-size: 17px; }
.a3-next { margin-top: 6px; }
.a3-back { color: var(--red-deep); border-color: var(--red-deep); }

.a3-tabs { gap: 6px; }
.a3-tab {
  font-family: var(--font-kai);
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: rgba(255, 250, 240, .8);
}
.a3-tab--on {
  background: linear-gradient(180deg, var(--red), var(--red-deep));
  color: var(--gold-pale);
  border-color: var(--gold);
}

/* 保存弹层 */
.a3-save {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-height: 90vh;
  padding: 20px;
}
.a3-save__img {
  max-height: 62vh;
  max-width: 86vw;
  border-radius: 8px;
  border: 2px solid var(--gold);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .5);
}
.a3-save__hint { color: var(--gold-pale); font-size: 14px; text-align: center; }
.a3-save__dl { text-decoration: none; font-size: 15px; }
.a3-save .card__close { top: -6px; right: -6px; }

/* 分享引导 */
.a3-guide {
  position: absolute;
  top: 14px;
  right: 14px;
  max-width: 78vw;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--paper);
  border: 2px solid var(--gold);
  text-align: right;
}
.a3-guide__arrow {
  font-size: 44px;
  color: var(--red);
  line-height: 1;
  animation: guide-bounce 1s ease-in-out infinite;
}
@keyframes guide-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.a3-guide__text {
  font-family: var(--font-kai);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.8;
  text-align: left;
  margin-top: 8px;
}
.a3-guide__sub { font-size: 13px; color: var(--red-deep); text-align: left; margin-top: 6px; }

/* ===== 录音页 ===== */
.a3-rec-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.a3-rec {
  position: relative;
  width: clamp(92px, 18vmin, 130px);
  height: clamp(92px, 18vmin, 130px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--red-bright), var(--red-deep));
  border: 3px solid var(--gold);
  box-shadow: 0 10px 26px rgba(143, 31, 31, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.a3-rec__ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid rgba(224, 80, 56, .8);
  animation: rec-breathe 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rec-breathe {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.22); opacity: 0; }
}
.a3-rec__mic { width: 42%; pointer-events: none; }
.a3-rec__mic svg { display: block; width: 100%; height: auto; }
.a3-rec--on {
  background: radial-gradient(circle at 35% 30%, #ff7a5e, var(--red));
  box-shadow: 0 0 0 10px rgba(224, 80, 56, .25), 0 10px 26px rgba(143, 31, 31, .45);
}
.a3-rec--on .a3-rec__ring { animation-duration: .7s; }
.a3-rec--disabled { filter: grayscale(.9); opacity: .55; pointer-events: none; }
.a3-rec__label {
  font-family: var(--font-kai);
  font-size: 14px;
  color: var(--red-deep);
}

.a3-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.a3-result audio { width: min(84vw, 380px); }
.a3-result__title, .a3-result__ask {
  font-family: var(--font-kai);
  font-size: 15px;
  color: var(--ink);
  text-align: center;
}
.a3-result__blessing {
  font-family: var(--font-kai);
  font-size: 15px;
  color: var(--red-deep);
  text-align: center;
  line-height: 1.8;
  padding: 8px 14px;
  border: 1px dashed var(--red);
  border-radius: 8px;
  background: rgba(224, 80, 56, .06);
}

.a3-counter {
  position: relative;
  font-family: var(--font-kai);
  font-size: clamp(15px, 2.6vmin, 20px);
  color: var(--red-deep);
  padding: 10px 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: rgba(255, 250, 240, .85);
  margin-top: 6px;
}
.a3-float {
  position: absolute;
  right: -6px;
  top: -4px;
  color: var(--red);
  font-size: 15px;
  animation: float-up 1.3s ease forwards;
}
@keyframes float-up {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-26px); }
}

/* ===== 留言墙 ===== */
.wall-card { max-width: 700px; }
.wall-title {
  font-family: var(--font-kai);
  color: var(--red-deep);
  text-align: center;
  letter-spacing: 4px;
  margin-bottom: 12px;
}
.wall-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 2px;
}
.wall-note {
  flex: 0 1 auto;
  max-width: 46%;
  padding: 12px 14px;
  font-family: var(--font-kai);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: #fffaf0;
  border-top: 6px solid var(--red);
  border-radius: 3px;
  box-shadow: 0 4px 10px rgba(43, 35, 32, .18);
}
.wall-input-row { margin-top: 12px; flex-wrap: nowrap; }
.wall-input-row .a3-input { flex: 1 1 auto; width: auto; min-width: 0; }

/* ===== 最终页 ===== */
#scene-final {
  background:
    radial-gradient(ellipse at 50% 20%, rgba(217, 164, 65, 0.14), transparent 55%),
    radial-gradient(ellipse at 20% 90%, rgba(143, 31, 31, 0.3), transparent 55%),
    var(--night);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fin-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 0 7vw;
}
.fin-lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.fin-line {
  font-family: var(--font-kai);
  font-size: clamp(16px, 2.8vmin, 24px);
  letter-spacing: 2px;
  line-height: 1.8;
  color: var(--gold-pale);
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s ease, transform 1s ease;
}
.fin-line--show { opacity: 1; transform: translateY(0); }
.fin-line:last-child { color: var(--gold); }
.fin-btns {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .9s ease, transform .9s ease;
  pointer-events: none;
}
.fin-btns--show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.fin-btn { font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01s !important; transition-duration: .01s !important; }
}
