/* ===== The story scenes: the intro, the ending, the credits and their Codex replays (cutscenes/story-scenes.js) =====
   One drawing (story-art.js) fills the screen; the caption sits on an ivory strip at the foot, always clear of
   Click to continue (30-new-hunt.css: 2.4vh up, about 40px tall); never any scrolling. */
.cine.story-scene { opacity: 1; cursor: pointer; background: var(--royal-night); }
.ss-stage, .ss-stage .ss-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ss-front { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ss-cap { position: absolute; left: 50%; bottom: max(7.5vh, calc(2.4vh + 54px)); transform: translateX(-50%); width: min(88vw, 1080px); box-sizing: border-box; padding: 1.6vh 30px;
  background: var(--ivory); color: var(--ink); text-align: center; box-shadow: inset 0 0 0 4px var(--ivory), inset 0 0 0 6px var(--royal), 0 10px 30px rgba(0, 0, 0, .55); }
.ss-cap p { margin: 0; font-family: var(--font-body); font-size: clamp(17px, 2.7vh, 29px); line-height: 1.36; }
.ss-count { position: absolute; left: 18px; top: 14px; z-index: 4; font: 15px var(--font-display); letter-spacing: .08em; color: var(--ivory); opacity: .75; text-shadow: 0 1px 4px var(--black); }
.ss-skip { position: absolute; right: 18px; top: 12px; z-index: 5; }

/* the credits: an ivory notice nailed to the tree, clawed once as the next arrives */
.ss-card { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%) rotate(-1deg); width: min(560px, 78vw); max-height: 70vh; box-sizing: border-box; padding: 4.2vh 40px 4vh;
  background: var(--ivory); color: var(--ink); text-align: center; overflow: hidden; box-shadow: inset 0 0 0 6px var(--ivory), inset 0 0 0 8px var(--royal), 0 16px 40px rgba(0, 0, 0, .6); animation: ssNail .45s ease-out; }
@keyframes ssNail { from { transform: translate(-50%, -53%) rotate(-3deg); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-1deg); } }
.ss-card h2 { margin: 0 0 2vh; font: 400 clamp(26px, 4.4vh, 44px) var(--font-display); color: var(--royal); letter-spacing: .04em; border-bottom: 3px solid var(--gilt); display: inline-block; padding: 0 16px 6px; }
.ss-card-body p { margin: 0 0 1.2vh; font: clamp(16px, 2.4vh, 22px) var(--font-body); line-height: 1.35; }
.ss-row { display: flex; justify-content: space-between; gap: 18px; text-align: left; }
.ss-row span { color: var(--ink-muted); } .ss-row b { font-weight: 400; color: var(--ink); text-align: right; }
.ss-names { word-spacing: .1em; }
.ss-joke { font-style: italic; font-size: clamp(18px, 2.8vh, 26px) !important; }
.ss-card.plain { padding-top: 6vh; padding-bottom: 6vh; }
.ss-nail { position: absolute; left: 50%; top: 12px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ink); }
.ss-claw { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ss-claw path { fill: none; stroke: var(--claw); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; }
.ss-card.torn .ss-claw path { stroke-width: 3; opacity: 1; animation: ssClaw .3s ease-in forwards; }
@keyframes ssClaw { to { stroke-dashoffset: 0; } }

/* the drawings' own motion: smoke, wind, a howl, claws drawn in (still when animations or motion are off) */
.sa-smoke { animation: saSmoke 4.5s ease-in-out infinite alternate; }
@keyframes saSmoke { from { opacity: .25; transform: translateY(6px); } to { opacity: .7; transform: translateY(-8px); } }
.sa-wind { animation: saWind 6s linear infinite; }
@keyframes saWind { from { transform: translateX(-40px); } to { transform: translateX(60px); } }
.sa-ring { transform-box: fill-box; transform-origin: 50% 50%; animation: saRing 2.7s ease-out infinite; opacity: 0; }
@keyframes saRing { from { opacity: .7; transform: scale(.3); } to { opacity: 0; transform: scale(2.6); } }
.sa-claw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ssClaw .5s .5s ease-in forwards; }
body.no-fx .story-scene *, body.reduce-motion .story-scene * { animation: none !important; }
body.no-fx .story-scene .sa-claw, body.reduce-motion .story-scene .sa-claw { stroke-dashoffset: 0; }
body.no-fx .story-scene .sa-ring, body.reduce-motion .story-scene .sa-ring { opacity: .35; }
/* the Marshal in Gold (story-scenes.js marshalWait): this player has watched the reveal and waits for the partner */
.marshal-wait { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60; padding: 8px 18px; border: 2px solid var(--gilt); border-radius: 6px; background: var(--ivory); color: var(--royal); font: 17px var(--font-body); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); pointer-events: none; }
