/* 故事冒險專用樣式：冒險地圖 · 漫畫格 · 動畫舞台 · TTS 控制 */
/* ---- Hub tools ---- */
.story-hub-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
  margin: 0 0 1rem;
}

/* ---- Adventure map ---- */
.adv-map {
  position: relative;
  margin-bottom: 0.35rem;
  padding: 1rem 1.1rem 0.85rem;
  background: linear-gradient(165deg, #e8f5e9 0%, #fff 52%, #fff8e1 100%);
  border: 1px solid var(--line, #d7e6db);
  border-radius: 24px;
  box-shadow: var(--soft-shadow, 0 6px 22px rgba(31, 72, 48, 0.07));
  overflow: hidden;
}
.adv-map-sky {
  position: absolute;
  inset: 0 0 auto 0;
  height: 48px;
  background: linear-gradient(180deg, rgba(129, 212, 250, 0.35), transparent);
  pointer-events: none;
}
.adv-hint { margin: 0.65rem 0 0; }
.adv-path {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.45rem;
  position: relative;
  z-index: 1;
}
.adv-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 92px;
  max-width: 120px;
  padding: 0.6rem 0.45rem 0.5rem;
  border-radius: 18px;
  border: 2px solid var(--line, #d7e6db);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}
.adv-spot:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(46, 125, 79, 0.15);
  border-color: #81c784;
}
.adv-spot.is-done {
  border-color: #66bb6a;
  background: linear-gradient(180deg, #f0faf1, #fff);
}
.adv-spot.is-locked {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.35);
}
.adv-emoji { font-size: 1.55rem; line-height: 1; }
.adv-spot strong { font-size: 0.82rem; text-align: center; line-height: 1.25; }
.adv-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.72rem;
  font-weight: 900;
}
.adv-join {
  color: #9aaa9f;
  font-weight: 900;
  align-self: center;
  font-size: 1.1rem;
}

/* ---- Story cards ---- */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.story-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #d7e6db);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--soft-shadow, 0 6px 22px rgba(31, 72, 48, 0.07));
  border-top: 4px solid var(--subject-color, #2e7d4f);
}
.story-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #e8f5e9;
}
.story-txt {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.story-emoji { font-size: 1.25rem; }
.story-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}

/* ---- Player shell ---- */
.story-player { max-width: 760px; margin: 0 auto; }
.sp-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-weight: 800;
  color: #1b5e3b;
}
.sp-top-right { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.sp-mode .seg-btn { font-size: 0.85rem; }

.sp-stage {
  position: relative;
  background: linear-gradient(180deg, #e8f5e9, #fff);
  border: 1px solid var(--line, #d7e6db);
  border-radius: 24px;
  padding: 1.15rem 1.2rem 1.2rem;
  min-height: 180px;
  overflow: hidden;
}
.sp-stage.is-comic { background: #faf8f2; }
.sp-stage.is-anim {
  background: linear-gradient(160deg, #e3f2fd, #fce4ec 48%, #fff8e1);
  min-height: 240px;
  padding-bottom: 0.85rem;
}
.sp-scene-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  pointer-events: none;
}
.sp-bg {
  position: absolute;
  right: 0.7rem;
  top: 0.45rem;
  font-size: 3.4rem;
  opacity: 0.32;
  pointer-events: none;
  z-index: 0;
}
.sp-wait-panels {
  text-align: center;
  margin: 0.85rem 0 0.2rem;
}

/* ---- Comic panels (step reveal) ---- */
.comic-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  position: relative;
  z-index: 1;
}
.comic-panel {
  background: #fff;
  border: 3px solid #2c3e2f;
  border-radius: 14px;
  overflow: hidden;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 3px 0 rgba(44, 62, 47, 0.12);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.comic-panel.is-hidden {
  opacity: 0.35;
  transform: scale(0.97);
  filter: grayscale(0.4);
}
.comic-panel.is-shown {
  animation: comicPop 0.35s ease both;
}
@keyframes comicPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.comic-panel-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  background: linear-gradient(180deg, #e8f5e9, #f5faf5);
  border-bottom: 2px solid #2c3e2f;
  font-weight: 900;
  font-size: 0.85rem;
}
.comic-panel-head img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  object-fit: cover;
}
.comic-panel-text {
  margin: 0;
  padding: 0.65rem 0.7rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 700;
}
.comic-next-row { margin-top: 0.75rem; justify-content: center; }

/* ---- Animation stage ---- */
.anim-stage {
  position: relative;
  z-index: 1;
  min-height: 200px;
  border-radius: 18px;
  overflow: hidden;
}
.anim-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.anim-bg-emoji {
  position: absolute;
  right: 0.5rem;
  top: 0.3rem;
  font-size: 3rem;
  opacity: 0.35;
}
.anim-cloud {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.7;
  animation: cloudDrift 12s linear infinite;
}
.anim-cloud.c1 { top: 12px; left: 8%; animation-duration: 14s; }
.anim-cloud.c2 { top: 28px; left: 55%; animation-duration: 18s; animation-delay: -4s; }
@keyframes cloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(40px); }
}
.anim-leaf {
  position: absolute;
  font-size: 1.1rem;
  animation: leafFall 6s ease-in-out infinite;
}
.anim-leaf.l1 { left: 18%; top: 8px; animation-delay: 0s; }
.anim-leaf.l2 { left: 72%; top: 20px; animation-delay: -2.5s; }
@keyframes leafFall {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(18px) rotate(25deg); opacity: 1; }
}
.anim-scene-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  pointer-events: none;
}
.anim-cast {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1.2rem;
  min-height: 140px;
  padding: 1.2rem 1rem 0.4rem;
  position: relative;
  z-index: 1;
}
.anim-mascot {
  width: 88px;
  background: #f9f5e9;
  border-radius: 18px;
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}
.anim-mascot.m-b { width: 70px; opacity: 0.92; }
.bob-soft { animation: bobSoft 3s ease-in-out infinite; }
@keyframes bobSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.bounce-walk { animation: walkBob 0.7s ease-in-out infinite; }
.bounce-talk { animation: talkBob 0.55s ease-in-out infinite; }
.bounce-think { animation: thinkSway 2.2s ease-in-out infinite; }
.bounce-cheer { animation: cheerJump 0.8s ease-in-out infinite; }
@keyframes walkBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
@keyframes talkBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.03); }
}
@keyframes thinkSway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}
@keyframes cheerJump {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-14px) scale(1.06); }
  60% { transform: translateY(-6px) scale(1.02); }
}
.anim-caption {
  position: relative;
  z-index: 1;
  margin: 0.4rem 0.85rem 0.2rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line, #d7e6db);
  border-radius: 16px;
  padding: 0.7rem 0.9rem;
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.anim-voice-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  position: relative;
  z-index: 1;
}

/* ---- Checkpoint quiz ---- */
.sp-quiz { margin-top: 1rem; }
.sp-q-label { font-weight: 900; color: #2e7d4f; margin: 0 0 0.5rem; }
.sp-hint-row {
  margin-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}
.sp-hint {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  font-weight: 700;
  line-height: 1.45;
}
.sp-hint img { width: 36px; height: auto; flex: none; }

.story-end .gp-end-stats { margin-bottom: 0.5rem; }

@media (max-width: 640px) {
  .adv-spot { min-width: 76px; max-width: 100px; padding: 0.45rem 0.3rem; }
  .comic-strip { grid-template-columns: 1fr; }
  .anim-mascot { width: 72px; }
  .anim-mascot.m-b { width: 58px; }
  .sp-top { flex-direction: column; align-items: flex-start; }
  .anim-cast { gap: 0.7rem; }
}
/* Image-first comic panels */
.comic-strip.is-image-first { display: flex; flex-direction: column; gap: 1rem; }
.comic-panel { background: #fff; border: 1px solid #e3eee6; border-radius: 22px; overflow: hidden; box-shadow: 0 8px 22px rgba(31,72,48,.08); }
.comic-panel.is-hidden { opacity: 0.45; filter: grayscale(0.2); }
.comic-panel-art-wrap { position: relative; background: #f4f9f6; }
.comic-panel-art { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.comic-panel-who { position: absolute; left: 10px; bottom: 10px; width: 56px; height: 56px; border-radius: 16px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.18); background: #f9f5e9; }
.comic-panel-caption { padding: 0.65rem 0.9rem 0.85rem; font-size: 0.95rem; line-height: 1.45; color: #33493c; }
.comic-panel-caption strong { color: #1b5e3a; }
.comic-panel-caption.is-hidden-cap { color: #9aaa9f; }
.comic-panel-head { display: none; } /* image-first: hide old text-first head */


/* ===== HQ photo-flow comics + real motion anim (2026-10 redo) ===== */
.sp-stage.is-photo-flow {
  background: #0f2a1c;
  border-radius: 24px;
  overflow: hidden;
  padding: 0;
  min-height: 320px;
}
.sp-stage.is-comic.is-photo-flow { background: #f4f9f6; padding: 0.75rem; }
.comic-strip.is-one-shot { display: flex; flex-direction: column; gap: 0.75rem; }
.comic-panel.is-focus {
  margin: 0;
  border: none;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 42, 28, 0.18);
  animation: comicPop 0.45s cubic-bezier(.2,.8,.2,1) both;
}
.comic-panel-art-wrap { position: relative; background: #123; }
.comic-panel.is-focus .comic-panel-art {
  aspect-ratio: 16/10;
  width: 100%;
  object-fit: cover;
  display: block;
}
.comic-doing {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.55rem 0.75rem;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent);
  color: #fff; font-weight: 800; font-size: 0.92rem;
}
.comic-doing-badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  backdrop-filter: blur(6px);
}
.comic-page { opacity: 0.9; font-size: 0.85rem; }
.comic-panel-who {
  width: 72px !important; height: 72px !important;
  left: 14px; bottom: 14px;
  border-width: 4px !important;
}
.comic-panel-caption {
  font-size: 1.08rem !important;
  line-height: 1.55 !important;
  padding: 0.85rem 1rem 1rem !important;
  background: #fff;
}
.comic-done-note { text-align: center; font-weight: 700; color: #2e7d4f; }

/* Anim stage — full bleed photo + moving hero */
.anim-stage.is-live {
  min-height: 360px;
  border-radius: 0;
  background: #0b1f16;
}
.anim-photo-wrap {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}
.anim-photo {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  animation: photoKenBurns 8s ease-in-out infinite alternate;
  transform-origin: center center;
}
@keyframes photoKenBurns {
  from { transform: scale(1) translate(0,0); }
  to { transform: scale(1.08) translate(-1.5%, -1%); }
}
.anim-photo-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.05) 40%, rgba(11,31,22,.55) 100%);
  pointer-events: none;
}
.anim-doing {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  background: rgba(255,255,255,.92);
  color: #1b4332;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.anim-fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.anim-stage.is-live .anim-cloud {
  font-size: 1.8rem; opacity: 0.85;
  animation: cloudDrift 9s linear infinite;
}
.anim-stage.is-live .anim-cloud.c1 { top: 18px; left: -10%; }
.anim-stage.is-live .anim-cloud.c2 { top: 48px; left: 40%; animation-duration: 13s; }
@keyframes cloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(120%); }
}
.anim-spark {
  position: absolute; font-size: 1.2rem;
  animation: sparkle 1.6s ease-in-out infinite;
}
.anim-spark.s1 { right: 18%; top: 22%; }
.anim-spark.s2 { right: 28%; top: 40%; animation-delay: .4s; }
@keyframes sparkle {
  0%,100% { opacity: .35; transform: scale(.8) rotate(0); }
  50% { opacity: 1; transform: scale(1.25) rotate(18deg); }
}
.anim-stage.is-live .anim-leaf {
  font-size: 1.4rem;
  animation: leafFall 4.5s linear infinite;
}
@keyframes leafFall {
  0% { transform: translateY(-10px) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(260px) rotate(120deg); opacity: 0; }
}

.anim-cast {
  position: absolute; left: 0; right: 0; bottom: 12px;
  display: flex; justify-content: center; align-items: flex-end;
  z-index: 4; min-height: 0; padding: 0; gap: 0;
  pointer-events: none;
}
.anim-mascot.m-hero {
  width: 110px;
  height: auto;
  border-radius: 22px;
  border: 4px solid #fff;
  background: #f9f5e9;
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  will-change: transform;
}

/* REAL motion presets */
.motion-walk { animation: hqWalk 0.85s ease-in-out infinite; }
.motion-talk { animation: hqTalk 0.7s ease-in-out infinite; }
.motion-think { animation: hqThink 2s ease-in-out infinite; }
.motion-cheer { animation: hqCheer 0.75s ease-in-out infinite; }
.motion-fly { animation: hqFly 1.1s ease-in-out infinite; }
.motion-swim { animation: hqSwim 1.2s ease-in-out infinite; }
.motion-nap { animation: hqNap 2.8s ease-in-out infinite; }
@keyframes hqWalk {
  0% { transform: translate(-28px, 0) rotate(-6deg); }
  50% { transform: translate(28px, -14px) rotate(6deg); }
  100% { transform: translate(-28px, 0) rotate(-6deg); }
}
@keyframes hqTalk {
  0%,100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.06); }
}
@keyframes hqThink {
  0%,100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-6px); }
}
@keyframes hqCheer {
  0%,100% { transform: translateY(0) scale(1) rotate(0); }
  40% { transform: translateY(-28px) scale(1.1) rotate(-5deg); }
  70% { transform: translateY(-10px) scale(1.04) rotate(4deg); }
}
@keyframes hqFly {
  0% { transform: translate(-40px, 10px) rotate(-12deg) scale(0.95); }
  50% { transform: translate(40px, -36px) rotate(8deg) scale(1.08); }
  100% { transform: translate(-40px, 10px) rotate(-12deg) scale(0.95); }
}
@keyframes hqSwim {
  0% { transform: translate(-36px, 8px) rotate(4deg); }
  50% { transform: translate(36px, -8px) rotate(-6deg); }
  100% { transform: translate(-36px, 8px) rotate(4deg); }
}
@keyframes hqNap {
  0%,100% { transform: translateY(6px) rotate(-3deg) scale(0.96); opacity: 0.92; }
  50% { transform: translateY(0) rotate(2deg) scale(1); opacity: 1; }
}
.cast-fly .m-hero { filter: drop-shadow(0 8px 12px rgba(100,180,255,.45)); }
.cast-swim .m-hero { filter: drop-shadow(0 8px 12px rgba(80,160,220,.4)); }

.anim-stage.is-live .anim-caption {
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,.12);
  background: #123528;
  color: #f4fff8;
  font-size: 1.1rem;
  padding: 0.9rem 1.1rem 1rem;
}
.anim-stage.is-live .anim-caption strong { color: #b6f5c8; }
.anim-caption.pop-in { animation: capIn .35s ease both; }
@keyframes capIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-voice-row {
  display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center;
  justify-content: center;
  padding: 0.65rem 0.75rem 0.85rem;
  background: #0f2a1c;
}
.anim-voice-row .btn { border-color: rgba(255,255,255,.25); color: #e8fff0; }
.anim-voice-row .btn-primary { background: #3dcf74; border-color: #3dcf74; color: #083018; font-weight: 900; }

@media (min-width: 720px) {
  .anim-photo { height: 360px; }
  .anim-mascot.m-hero { width: 130px; }
  .comic-panel.is-focus .comic-panel-art { aspect-ratio: 16/9; }
}


/* ===== Fun filmstrip + dual cast (2026-10 v3) ===== */
.comic-strip.is-film { gap: 0.85rem; }
.comic-filmstrip {
  display: flex; gap: 0.45rem; overflow-x: auto; padding: 0.25rem 0.15rem 0.45rem;
  scrollbar-width: thin;
}
.comic-thumb {
  flex: none; width: 64px; border: 3px solid #c8e6c9; border-radius: 12px;
  padding: 0; background: #fff; position: relative; overflow: hidden; cursor: pointer;
}
.comic-thumb img { display: block; width: 64px; height: 44px; object-fit: cover; }
.comic-thumb span {
  position: absolute; right: 3px; bottom: 2px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 0.65rem; font-weight: 800; border-radius: 6px; padding: 0 4px;
}
.comic-thumb.is-now { border-color: #2e7d4f; box-shadow: 0 0 0 3px rgba(46,125,79,.25); transform: scale(1.06); }
.comic-thumb.is-past { opacity: 0.92; }
.comic-thumb.is-future { opacity: 0.4; filter: grayscale(0.4); cursor: default; }
.comic-speech {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; align-items: flex-end; gap: 0.55rem; z-index: 2;
}
.comic-speech .comic-panel-who {
  position: static !important; width: 64px !important; height: 64px !important; flex: none;
  animation: whoPop .45s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes whoPop {
  from { transform: scale(.6) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.comic-bubble {
  flex: 1; background: rgba(255,255,255,.96); border-radius: 18px 18px 18px 6px;
  padding: 0.55rem 0.75rem; border: 2px solid #fff; box-shadow: 0 8px 20px rgba(0,0,0,.2);
  animation: capIn .35s ease both;
}
.comic-bubble b { display: block; color: #1b5e3a; font-size: 0.85rem; margin-bottom: 0.15rem; }
.comic-bubble p { margin: 0; font-weight: 800; font-size: 1.02rem; line-height: 1.4; color: #24362c; }
.comic-panel.is-focus .comic-panel-caption { display: none; } /* speech on photo */
.pop-scene { animation: sceneIn .5s cubic-bezier(.2,.85,.2,1) both; }
@keyframes sceneIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.btn-xl { font-size: 1.05rem; padding: 0.85rem 1.25rem; border-radius: 999px; font-weight: 900; }

.anim-mascot.m-buddy {
  width: 72px; opacity: 0.88; margin-right: -8px; z-index: 1;
  border-radius: 18px; border: 3px solid #fff; background: #f9f5e9;
  box-shadow: 0 8px 16px rgba(0,0,0,.25);
}
.anim-mascot.m-hero { z-index: 2; }
.anim-dots {
  position: absolute; right: 12px; top: 14px; z-index: 3;
  display: flex; gap: 5px;
}
.anim-dots i {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.45);
  display: block;
}
.anim-dots i.on { background: #ffd54f; transform: scale(1.35); box-shadow: 0 0 0 3px rgba(255,213,79,.35); }
.anim-dots i.done { background: #69f0ae; }
.anim-bird {
  position: absolute; top: 30%; left: -10%; font-size: 1.4rem;
  animation: birdFly 7s linear infinite;
}
@keyframes birdFly {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(70vw, -20px) scale(1.1); }
  100% { transform: translate(110vw, 10px) scale(1); }
}
.anim-photo.scene-swap { animation: photoKenBurns 7s ease-in-out infinite alternate, sceneFlash .45s ease both; }
@keyframes sceneFlash {
  from { filter: brightness(1.25) saturate(1.1); }
  to { filter: brightness(1) saturate(1); }
}
.anim-ready { color: #b6f5c8; font-weight: 900; }
.sp-quiz-fun {
  border: 3px solid #ffd54f !important;
  background: linear-gradient(180deg, #fffde7, #fff) !important;
  border-radius: 22px !important;
  box-shadow: 0 12px 28px rgba(255,193,7,.18);
  animation: quizPop .45s ease both;
}
@keyframes quizPop {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.sp-quiz-fun .sp-q-label { font-size: 1.05rem; font-weight: 900; color: #f57f17; }
.sp-quiz-fun .gp-choice {
  border-width: 3px; font-weight: 800; min-height: 52px;
  transition: transform .12s ease;
}
.sp-quiz-fun .gp-choice:hover { transform: translateY(-2px) scale(1.01); }

/* Amplify motion — even if reduced-motion globally, stories opt-in slightly via longer distances */
.story-player .motion-walk { animation-duration: 0.7s; }
.story-player .motion-fly { animation-duration: 0.95s; }
.story-player .motion-cheer { animation-duration: 0.65s; }


/* BB咩／BB都：半大細隻 */
.anim-mascot.is-bb { width: 58px !important; height: 58px !important; }
.comic-speech .comic-panel-who[src*="xiaome"],
.comic-speech .comic-panel-who[src*="xiaodu"] { width: 48px !important; height: 48px !important; }

/* 對話氣泡再清楚啲 */
.comic-bubble {
  backdrop-filter: blur(2px);
  border: 2.5px solid #e8f5e9;
  max-width: min(92%, 560px);
}
.comic-bubble p { font-size: 1.06rem; letter-spacing: 0.01em; }
.anim-caption {
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
  font-size: 1.05rem;
  line-height: 1.45;
}

/* ===== Real MP4 animation player (2026-10 vid1) — no CSS doll bobbing as 動畫 ===== */
.sp-stage.is-video-flow {
  background: #0b1f16;
  border-radius: 24px;
  overflow: hidden;
  padding: 0;
  min-height: 280px;
}
.anim-stage.is-video,
.anim-stage.is-pending {
  min-height: 280px;
  border-radius: 0;
  background: #0b1f16;
}
.anim-video-wrap {
  position: relative;
  background: #000;
}
.anim-video {
  display: block;
  width: 100%;
  max-height: min(62vh, 480px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}
.anim-stage.is-video .anim-doing {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  background: rgba(255,255,255,.92);
  color: #1b4332;
  font-weight: 900;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  pointer-events: none;
}
.anim-stage.is-video .anim-caption {
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,.12);
  background: #123528;
  color: #f4fff8;
  font-size: 1.08rem;
  padding: 0.9rem 1.1rem 1rem;
  font-weight: 700;
  line-height: 1.5;
}
.anim-stage.is-video .anim-caption strong { color: #b6f5c8; }
.anim-playing-hint { color: #a8d4b8 !important; }
.anim-ready { color: #b6f5c8; font-weight: 800; }

.anim-pending-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 0;
  min-height: 280px;
  background: #0f2a1c;
}
.anim-pending-poster {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.7);
}
.anim-pending-body {
  padding: 1.25rem 1.35rem;
  color: #e8fff0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
}
.anim-pending-badge {
  margin: 0;
  font-weight: 900;
  color: #7dffa8;
  letter-spacing: 0.02em;
}
.anim-pending-body h3 {
  margin: 0;
  font-size: 1.45rem;
  color: #fff;
}
.anim-pending-body > p {
  margin: 0;
  line-height: 1.55;
  color: #cfe9d8;
  font-weight: 600;
}
.anim-stage.is-pending .anim-voice-row {
  justify-content: flex-start;
  padding: 0.5rem 0 0;
  background: transparent;
}
.anim-stage.is-pending .anim-caption {
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255,255,255,.12);
  background: #123528;
  color: #f4fff8;
  padding: 0.9rem 1.1rem;
}
@media (max-width: 720px) {
  .anim-pending-card { grid-template-columns: 1fr; }
  .anim-pending-poster { min-height: 160px; max-height: 200px; }
}


/* mobile video */
@media (max-width: 720px) {
  .anim-video {
    max-height: min(56vh, 420px);
  }
  .anim-stage.is-video .anim-doing {
    font-size: 0.78rem;
    padding: 0.28rem 0.6rem;
  }
  .sp-stage.is-video-flow {
    min-height: 220px;
  }
}
