/* ==========================================================================
   Mahabharat360 · Mystery Rooms — the trail map with its diyas, travel scene, interludes,
   potli tokens, and the hands-on locks (leap, setu, bow).
   Loaded by games that use them (Sita ki Khoj). Phone first; tablet,
   laptop and large screens below.
   ========================================================================== */

/* ---------- the progress beads become a route ---------- */
.beads.route { position: relative; gap: 0; align-items: center; height: 10px; }
.beads.route::before { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1px; background: repeating-linear-gradient(90deg, rgba(246, 207, 131, 0.5) 0 3px, transparent 3px 6px); }
.beads.route .bead { position: relative; flex: 1; max-width: none; height: 10px; background: none; border-radius: 0; display: grid; place-items: center; }
.beads.route .bead::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--bg-4); box-shadow: 0 0 0 1px rgba(246, 207, 131, 0.35); }
.beads.route .bead.done::after { width: 6px; height: 6px; border-radius: 1px; transform: rotate(45deg); background: #ffe7a8; box-shadow: 0 0 6px rgba(255, 200, 100, 0.8); }
.beads.route .bead.skip::after { background: var(--text-faint); }
.beads.route .bead.now::after { width: 8px; height: 8px; background: radial-gradient(circle, #fffbe6 0 30%, #ffb347 60%, #ff6a1a 100%); box-shadow: 0 0 10px 3px rgba(255, 150, 60, 0.75); animation: route-flame 1.2s ease-in-out infinite alternate; }
@keyframes route-flame { from { transform: scale(0.85); } to { transform: scale(1.2); } }

/* ---------- the painted trail map ---------- */
/* Map art is in map units; the marks (diyas, names, the road) are scaled by --z so they keep one size on screen. */
.jmap { display: block; width: 100%; height: 100%; --z: 1; background: #93bab5; }
.jmap text { font-family: var(--font-body); }
.jmap .jm-river { font-size: calc(1.75px * var(--z)); font-style: italic; fill: #2f5f7c; fill-opacity: 0.85; letter-spacing: 0.05px; }
.jmap .jm-region { font: 700 calc(2.1px * var(--z)) var(--font-body); fill: #6b5332; fill-opacity: 0.72; text-anchor: middle; letter-spacing: 0.34em; }
.jmap.near .jm-waves.far, .jmap:not(.near) .jm-waves.near { display: none; }
.jmap .jm-region.small { font-size: calc(1.7px * var(--z)); }
.jmap .jm-region.green { fill: #3e5a28; fill-opacity: 0.8; font-size: calc(2.3px * var(--z)); }
.jmap .jm-region.lanka { font-size: calc(1.9px * var(--z)); letter-spacing: 0.3em; fill: #6b4a24; }
.jmap .jm-sea { font: 600 calc(1.9px * var(--z)) var(--font-body); fill: #2d5a60; fill-opacity: 0.62; text-anchor: middle; letter-spacing: 0.12em; }
.jmap .jm-sea.i { font-size: calc(1.7px * var(--z)); font-style: italic; font-weight: 500; letter-spacing: 0.05px; }
.jmap .jm-compass { font: 700 1.8px var(--font-display); fill: #6b4a2a; text-anchor: middle; }
.jmap .jm-title { font: 700 3.6px var(--font-display); fill: #5a2412; text-anchor: middle; }
.jmap .jm-subtitle { font: 600 1.45px var(--font-body); fill: #6b4a2a; text-anchor: middle; letter-spacing: 0.06px; }

/* the road: dotted where they walked, dashed where they flew (Ravana, Hanuman, the Pushpaka) */
.jmap .jm-road { fill: none; stroke: #a8261a; stroke-width: calc(0.62px * var(--z)); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0 calc(1.15px * var(--z)); }
.jmap .jm-road.fly { stroke: #b7381f; stroke-width: calc(0.42px * var(--z)); stroke-dasharray: calc(1.5px * var(--z)) calc(0.85px * var(--z)); stroke-opacity: 0.9; }
.jmap .jm-setu { display: none; }
.jmap .jm-setu.on { display: inline; }

/* a diya at every stop */
.jmap .jm-halo { opacity: 0; transform-box: fill-box; transform-origin: center; }
.jmap .jm-flame { opacity: 0; transform-box: fill-box; transform-origin: 50% 92%; }
.jmap .jm-bowl { fill: #6d4a35; stroke: #2e1b0e; stroke-width: 0.22; }
.jmap .jm-lip { fill: none; stroke: #2e1b0e; stroke-width: 0.18; stroke-linecap: round; }
.jmap .jm-wick { fill: none; stroke: #2e1b0e; stroke-width: 0.3; stroke-linecap: round; }
.jmap .jm-stop.lit .jm-bowl { fill: #c7692f; stroke: #5a2a10; }
.jmap .jm-stop.lit .jm-lip { stroke: #ffd79a; }
.jmap .jm-stop.lit .jm-flame { opacity: 1; animation: jm-flick 0.8s ease-in-out infinite alternate; }
.jmap .jm-stop.lit .jm-halo { opacity: 1; animation: jm-glow 1.7s ease-in-out infinite alternate; }
.jmap .jm-ring { fill: none; stroke: #a8261a; stroke-width: 0.38; stroke-dasharray: 0.9 0.65; display: none; transform-box: fill-box; transform-origin: center; }
.jmap .jm-stop.next .jm-ring { display: inline; animation: jm-spin 9s linear infinite, jm-breathe 1.6s ease-in-out infinite alternate; }
.jmap .jm-badge circle { fill: #3b2414; stroke: #f3dfae; stroke-width: 0.22; }
.jmap .jm-badge text { font: 700 1.75px var(--font-body); fill: #f6e7c0; text-anchor: middle; }
.jmap .jm-stop.lit .jm-badge circle { fill: #a8261a; }
.jmap .jm-lab text { paint-order: stroke; stroke: #f6ebcd; stroke-linejoin: round; }
.jmap .jm-name { font: 700 2.6px var(--font-display); fill: #33200f; stroke-width: 0.8px; }
.jmap .jm-sub { font-size: 1.85px; font-style: italic; fill: #5e4124; stroke-width: 0.6px; }
.jmap .jm-desc { font-size: 1.95px; font-weight: 700; fill: #9b2618; stroke-width: 0.65px; }
.jmap .jm-stop.next .jm-desc { fill: #1d5560; }
.jmap .jm-stop.quiet .jm-lab { display: none; }
.jmap .jm-stop.later .jm-sub { display: none; }
.jmap .jm-stop.quiet .jm-badge { display: none; }
.jmap .jm-stop.quiet .jm-diya, .jmap .jm-stop.quiet .jm-halo { scale: 0.62; }
.jmap .jm-wp circle { fill: #f6ebcd; stroke: #5a3e1e; stroke-width: 0.3; }
.jmap .jm-wp.seen circle { fill: #a8261a; }
.jmap .jm-wp text { font-size: 1.72px; font-style: italic; font-weight: 600; fill: #4a3218; paint-order: stroke; stroke: #f6ebcd; stroke-width: 0.6px; stroke-linejoin: round; }
.jmap .jm-head circle:first-child { animation: jm-glow 0.5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
/* a diya catches light */
.jmap .jm-stop.pop .jm-flame { animation: jm-catch 0.9s cubic-bezier(0.2, 1.6, 0.4, 1) both, jm-flick 0.8s ease-in-out 0.9s infinite alternate; }
.jmap .jm-stop.pop .jm-halo { animation: jm-bloom 1.1s ease-out both, jm-glow 1.7s ease-in-out 1.1s infinite alternate; }
.jmap .jm-shock { fill: none; stroke: #ffd27a; stroke-width: 0.5; transform-box: fill-box; transform-origin: center; animation: jm-shock 1s ease-out forwards; }
.jmap .jm-burst.big .jm-shock { stroke-width: 0.8; animation-duration: 1.4s; }
.jmap .jm-spark { fill: #ffe7a0; animation: jm-spark 1.2s ease-out forwards; }
.jmap .jm-closer { fill: none; stroke: #a8261a; stroke-width: 0.35; stroke-dasharray: 1.1 0.7; }
.jmap .jm-closer-t { font: italic 600 2.1px var(--font-body); fill: #a8261a; }
@keyframes jm-flick { from { transform: scale(0.86, 0.82) skewX(-5deg); } to { transform: scale(1.06, 1.12) skewX(5deg); } }
@keyframes jm-glow { from { transform: scale(0.86); opacity: 0.8; } to { transform: scale(1.1); opacity: 1; } }
@keyframes jm-catch { 0% { transform: scale(0); } 55% { transform: scale(1.7, 1.9); } 100% { transform: scale(1); } }
@keyframes jm-bloom { 0% { transform: scale(0.2); opacity: 0; } 30% { transform: scale(2.4); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes jm-shock { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(4.2); opacity: 0; } }
@keyframes jm-spark { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
@keyframes jm-spin { to { transform: rotate(360deg); } }
@keyframes jm-breathe { from { stroke-opacity: 0.55; } to { stroke-opacity: 1; } }
/* old paper: a fine grain and darker edges, laid over the map on screen (not in the map, so it never blurs when the camera comes close) */
.jm-paper { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; background-size: 100% 100%, 160px 160px; }

/* ---------- the travel scene between rooms ---------- */
.journey { position: fixed; inset: 0; z-index: 140; display: grid; grid-template-rows: 1fr auto; background: #0b0912; opacity: 0; transition: opacity 0.45s ease; overflow: hidden; }
.journey.in { opacity: 1; }
.journey.out { opacity: 0; }
.jr-map { position: relative; min-height: 0; overflow: hidden; border-bottom: 2px solid #5a3e1e; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.9); }
.jr-card { position: relative; display: grid; gap: 6px; justify-items: center; text-align: center; padding: 14px 18px calc(16px + var(--safe-b)); background: linear-gradient(180deg, #1a1220, #0b0912); }
.jr-card .kicker { margin: 0; color: var(--gold); }
.jr-lit { margin: 0; font: 700 14px/1.3 var(--font-body); color: #ffb35c; animation: jr-in 0.6s ease both; }
.jr-lit[hidden] { display: none; }
@keyframes jr-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.jr-card h2 { margin: 0; font: 700 clamp(21px, 5.4vw, 34px)/1.15 var(--font-display); color: var(--gold-2); text-wrap: balance; }
.jr-say { margin: 0; max-width: 46ch; font-size: clamp(14.5px, 2.4vw, 18px); line-height: 1.45; color: var(--text); }
.jr-go { margin-top: 4px; min-width: 210px; }
.journey.arrived .jr-go { animation: jr-nudge 1.6s ease-in-out infinite; }
@keyframes jr-nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(246, 207, 131, 0); } 50% { box-shadow: 0 0 0 6px rgba(246, 207, 131, 0.25); } }
/* landscape tablets, laptops and big screens: the card sits beside the map */
@media (min-width: 860px) and (min-aspect-ratio: 5/4) {
  .journey { grid-template-rows: 1fr; grid-template-columns: 1fr min(440px, 34vw); }
  .jr-map { border-bottom: 0; border-right: 2px solid #5a3e1e; }
  .jr-card { align-content: center; justify-items: start; text-align: left; padding: 32px; }
}
@media (min-width: 1600px) { .jr-card h2 { font-size: 42px; } .jr-say { font-size: 20px; } }

/* ---------- the whole trail (the ending), and the trail so far (the rooms sheet) ---------- */
/* the ending's trail breaks out of the narrow column, up to 1180px wide */
.jm-overview { width: min(1180px, calc(100vw - 32px)); margin: 8px calc(50% - min(590px, 50vw - 16px)) 18px; display: grid; gap: 14px; }
.jmap.jm-brief .jm-sub, .jmap.jm-brief .jm-desc { display: none; }
.jm-panels { display: grid; gap: 12px; }
.jm-panel { position: relative; border-radius: 14px; overflow: hidden; border: 2px solid #5a3e1e; background: #93bab5; box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.9); }
.jm-panel.big { aspect-ratio: 120.7 / 115.26; }
.jm-panel.near { aspect-ratio: 31.96 / 38.08; justify-self: center; width: 100%; }
.jm-panel .jmap { position: absolute; inset: 0; }
.jm-cap { position: absolute; left: 10px; bottom: 8px; margin: 0; padding: 3px 10px; border-radius: 999px; font: 700 12.5px var(--font-body); color: #f6ebcd; background: rgba(58, 36, 20, 0.82); pointer-events: none; }
@media (min-width: 760px) {
  .jm-panels { grid-template-columns: 1.25fr 1fr; align-items: start; }
}
.jm-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; text-align: left; }
.jm-legend li { display: grid; grid-template-columns: 22px 24px 1fr auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); opacity: 0.5; }
.jm-legend li.lit { opacity: 1; }
.jm-legend .jl-diya svg { width: 22px; height: 24px; display: block; overflow: visible; }
.jm-legend .jl-n { font: 700 18px/1 var(--font-display); color: var(--gold-2); text-align: center; }
.jm-legend .jl-t { font-size: 13.5px; line-height: 1.3; color: var(--text-dim); }
.jm-legend .jl-t b { color: var(--text); }
.jm-legend .jl-t i { color: var(--text-faint); }
.jm-legend .token.small { width: 34px; height: 34px; }
.jmap-card { margin: 0 0 14px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2); background: #0b0912; }
.jmap-card .jm-panel { aspect-ratio: 1; max-height: min(58vh, 480px); margin: 0 auto; border: 0; border-radius: 0; }
.jmap-card figcaption { padding: 10px 14px; font-size: 14px; color: var(--text-dim); border-top: 1px solid var(--line); }
.jmap-card figcaption b { color: var(--gold-2); }

/* ---------- an interlude: Sita in Ashoka Vatika ---------- */
.interlude { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: calc(28px + var(--safe-t)) 16px calc(28px + var(--safe-b)); background: #070510; opacity: 0; transition: opacity 0.7s ease; overflow-y: auto; }
.interlude.in { opacity: 1; }
.interlude.out { opacity: 0; }
.il-bg { position: fixed; inset: -20px; background: #120d1c center / cover no-repeat; filter: blur(4px) brightness(0.3) saturate(0.85); }
.il-in { position: relative; width: min(640px, 100%); display: grid; gap: 16px; justify-items: center; text-align: center; }
.il-in .kicker { margin: 0; color: #9fe9df; }
.il-tally { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 3px; max-width: min(360px, 90%); }
.il-tally i { width: 2px; height: 14px; border-radius: 1px; background: rgba(246, 207, 131, 0.55); }
.il-tally i:nth-child(5n) { margin-right: 7px; transform: skewX(-30deg); }
.il-lines { display: grid; gap: 14px; min-height: 9em; align-content: start; }
.il-line { margin: 0; font: 500 clamp(19px, 4.4vw, 27px)/1.5 var(--font-display); color: var(--text); text-wrap: balance; opacity: 0; transform: translateY(10px); transition: opacity 1.3s ease, transform 1.3s ease; }
.il-line.on { opacity: 1; transform: none; }
.il-who { margin: 0; font: 600 15px/1.4 var(--font-body); letter-spacing: 0.08em; color: var(--gold-2); }
.il-go { margin-top: 6px; }
@media (min-width: 1600px) { .il-in { width: min(780px, 100%); } .il-line { font-size: 32px; } }

/* ---------- tokens and the potli ---------- */
.token { display: inline-grid; place-items: center; flex: none; border-radius: 50%; color: #ffe7a8; background: radial-gradient(circle at 35% 28%, #7a5622, #2a1a08 72%); box-shadow: inset 0 0 0 1.5px rgba(246, 207, 131, 0.7), 0 6px 18px -6px rgba(0, 0, 0, 0.75); }
.token svg { width: 60%; height: 60%; overflow: visible; }
.token.big { width: clamp(88px, 24vw, 120px); height: clamp(88px, 24vw, 120px); box-shadow: inset 0 0 0 2px rgba(246, 207, 131, 0.85), 0 0 36px 4px rgba(255, 190, 90, 0.35); }
.token.small { width: 42px; height: 42px; }
.token.empty { background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line-2); }
.token-reveal { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 10px 0 6px; flex-wrap: wrap; }
.token-reveal.fresh .token { animation: token-in 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
@keyframes token-in { 0% { transform: scale(0.3) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.token-meta { display: grid; gap: 2px; text-align: left; min-width: 0; }
.token-name { margin: 0; max-width: 18ch; font: 600 17px/1.3 var(--font-display); color: var(--gold-2); }
.big-num.token-num { font-size: 52px; margin: 0; text-align: left; }
.big-num.token-num small { font-size: 20px; vertical-align: 8px; }
.ledger.potli { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ledger.potli .ledger-item { grid-template-columns: 42px 44px 1fr; }
.ledger.potli .ledger-num { font-size: 22px; }
.ledger.potli.nonum .ledger-item { grid-template-columns: 42px 1fr; }

/* ---------- the leap: steer the flight ---------- */
.flight { position: fixed; inset: 0; z-index: 150; display: grid; grid-template-rows: auto 1fr auto; padding: calc(14px + var(--safe-t)) 16px calc(18px + var(--safe-b)); background: linear-gradient(180deg, #2a1a3a 0%, #13284a 38%, #0b1a33 100%); color: var(--text); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.flight::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, transparent 0 34px, rgba(120, 170, 230, 0.12) 34px 36px); background-size: 100% 72px; pointer-events: none; }
.flight.flying::before { animation: fl-sea 0.9s linear infinite; }
@keyframes fl-sea { to { background-position: 0 72px; } }
.fl-top { position: relative; z-index: 2; width: min(620px, 100%); margin: 0 auto; display: grid; gap: 6px; }
.fl-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.fl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb347, #fff1c4); border-radius: 4px; }
.fl-count { margin: 0; text-align: center; font-size: 14px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.fl-dist { color: var(--gold-2); font-weight: 700; }
.fl-field { position: relative; z-index: 1; width: min(720px, 100%); margin: 0 auto; }
.fl-band { position: absolute; top: 0; bottom: 0; border-radius: 40px; background: linear-gradient(90deg, rgba(255, 200, 100, 0), rgba(255, 210, 120, 0.28) 25%, rgba(255, 230, 160, 0.4) 50%, rgba(255, 210, 120, 0.28) 75%, rgba(255, 200, 100, 0)); box-shadow: 0 0 40px rgba(255, 200, 100, 0.25); }
.fl-shadow { position: absolute; top: 18%; bottom: 0; width: 32%; opacity: 0; pointer-events: none; transition: opacity 0.2s; background: radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.85), rgba(10, 0, 20, 0.5) 45%, transparent 72%); }
.fl-shadow.l { left: -6%; } .fl-shadow.r { right: -6%; }
/* No CSS filters on the flier: it moves every frame, and a blurred glow would be redrawn each time (slow on phones).
   The figure carries its own glowing sun and gold outline; straying shows a static red halo. */
.fl-hero { position: absolute; left: 50%; top: 46%; width: clamp(150px, 36vw, 230px); aspect-ratio: 128 / 150; transform: translate(-50%, -50%); }
.fl-hero::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(229, 87, 61, 0.7), rgba(229, 87, 61, 0) 68%); opacity: 0; transition: opacity 0.2s; }
.fl-hero.off::before { opacity: 1; }
.fl-hero svg { position: relative; width: 100%; height: 100%; display: block; }
.flight.flying .fl-hero svg { animation: fl-bob 0.9s ease-in-out infinite alternate; }
@keyframes fl-bob { from { transform: translateY(-4%) rotate(-3deg); } to { transform: translateY(4%) rotate(3deg); } }
.flight.caught .fl-field { animation: shake 0.45s; }
.flight.arrive .fl-hero { transition: top 1s ease-in, transform 1s; top: -10%; transform: translate(-50%, -50%) scale(0.6); }
.fl-msg { position: relative; z-index: 2; min-height: 1.5em; margin: 8px auto 0; text-align: center; font-weight: 600; font-size: 16px; color: #ffd7c9; }
.flight.arrive .fl-msg { color: var(--gold-2); font: 700 26px var(--font-display); }
.fl-intro { position: absolute; z-index: 3; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; background: rgba(8, 10, 24, 0.72); backdrop-filter: blur(3px); }
.fl-intro h2 { margin: 0; font: 700 clamp(26px, 6vw, 40px)/1.1 var(--font-display); color: var(--gold-2); }
.fl-intro p { margin: 0; max-width: 34ch; font-size: clamp(16px, 2.6vw, 19px); line-height: 1.5; }
.fl-intro .btn { min-width: 200px; }
.fl-skip { position: absolute; z-index: 3; right: 16px; bottom: calc(16px + var(--safe-b)); }

/* ---------- the Setu: drop the stones into the sea ---------- */
.setu-label { margin: 6px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.setu-shore .tile.picked { opacity: 0.28; transform: scale(0.92); }
.setu-shore .tile.picked .order { display: none; }
.setu-shore .tile { touch-action: none; }
.setu-sea { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 18px 10px 14px; border-radius: 16px; overflow: hidden; min-height: 86px; background: linear-gradient(180deg, #1b4a6e, #0e2a46 70%); box-shadow: inset 0 2px 0 rgba(160, 210, 255, 0.25); transition: box-shadow 0.2s; }
.setu-sea.over { box-shadow: inset 0 0 0 2px var(--gold-2), 0 0 18px rgba(246, 207, 131, 0.4); }
.setu-waves { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(180deg, transparent 0 10px, rgba(180, 220, 255, 0.12) 10px 11px); background-size: 100% 22px; animation: fl-sea 2.4s linear infinite; }
.setu-gap { position: relative; height: 46px; border-radius: 12px; border: 1.5px dashed rgba(180, 220, 255, 0.35); }
.setu-stone { position: relative; height: 46px; border-radius: 12px 14px 11px 15px; border: 0; padding: 0; font: 700 20px/1 var(--font-display); color: #3a2a12; background: radial-gradient(circle at 35% 30%, #cdbb98, #8f7d5c 75%); box-shadow: 0 6px 0 -2px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15) inset; animation: setu-bob 2.6s ease-in-out infinite; animation-delay: calc(var(--k) * -0.4s); cursor: pointer; }
.setu-stone.drop { animation: setu-drop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1), setu-bob 2.6s ease-in-out 0.6s infinite; }
@keyframes setu-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes setu-drop { 0% { transform: translateY(-90px) scale(1.1); opacity: 0; } 60% { transform: translateY(6px); opacity: 1; } 100% { transform: none; } }
.setu-sea.sink .setu-stone { animation: setu-sink 0.85s ease-in forwards; }
@keyframes setu-sink { to { transform: translateY(60px) scale(0.8); opacity: 0; } }
.setu-sea.hold { box-shadow: inset 0 0 0 2px var(--gold-2), 0 0 26px rgba(246, 207, 131, 0.45); }
.setu-sea.hold .setu-stone { animation: none; background: radial-gradient(circle at 35% 30%, #f3e2b0, #b9954e 75%); }
.setu-ghost { position: fixed; z-index: 160; transform: translate(-50%, -60%); padding: 10px 14px; border-radius: 12px; font: 700 20px/1 var(--font-display); color: #3a2a12; background: radial-gradient(circle at 35% 30%, #cdbb98, #8f7d5c 75%); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5); pointer-events: none; }
@media (max-width: 380px) { .setu-sea { gap: 4px; padding: 14px 6px 12px; } .setu-stone, .setu-gap { height: 40px; font-size: 17px; } }

/* ---------- the bow: nock, draw, loose ---------- */
.bow-stage { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: #120d1c; touch-action: none; user-select: none; -webkit-user-select: none; }
.bow-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.62) saturate(0.95); pointer-events: none; }
.bow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bow-limb { fill: none; stroke: #f6cf83; stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.8)); }
.bow-string { fill: none; stroke: #fff3cf; stroke-width: 0.35; }
.bow-nocked line { stroke: #ffe7a8; stroke-width: 0.3; stroke-linecap: round; opacity: 0.85; }
.bow-grip { fill: rgba(246, 207, 131, 0.16); stroke: rgba(246, 207, 131, 0.6); stroke-width: 0.3; stroke-dasharray: 1 1; cursor: grab; animation: bow-pulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.bow-stage.drawn .bow-grip { fill: rgba(255, 200, 100, 0.35); stroke: #fff3cf; stroke-dasharray: none; animation: none; }
@keyframes bow-pulse { 0%, 100% { transform: scale(0.85); opacity: 0.7; } 50% { transform: scale(1.05); opacity: 1; } }
.bow-arrow { stroke: #fff1c4; stroke-width: 0.45; stroke-linecap: round; filter: drop-shadow(0 0 0.8px rgba(255, 190, 90, 1)); }
.bow-target circle { fill: none; stroke: rgba(255, 120, 90, 0.55); stroke-width: 0.35; }
.bow-target circle.core { fill: rgba(255, 120, 90, 0.5); stroke: none; }
.bow-target.hit circle { animation: bow-hit 0.9s ease-out; transform-box: fill-box; transform-origin: center; }
@keyframes bow-hit { 0% { transform: scale(1); stroke: #fff3cf; } 40% { transform: scale(2.2); stroke: #ffd27a; } 100% { transform: scale(1); } }
.bow-tip { position: absolute; left: 10px; bottom: 8px; margin: 0; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--gold-2); background: rgba(11, 9, 18, 0.7); pointer-events: none; }
.bow-count { display: grid; grid-template-columns: auto auto 1fr auto auto; gap: 6px; align-items: center; margin: 12px 0 4px; }
.bow-step { min-width: 46px; padding-inline: 8px; font-variant-numeric: tabular-nums; }
.bow-n { display: grid; justify-items: center; line-height: 1; }
.bow-n b { font: 700 40px/1 var(--font-display); color: var(--gold-2); font-variant-numeric: tabular-nums; }
.bow-n span { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-top: 3px; }
@media (max-width: 360px) { .bow-step { min-width: 40px; padding-inline: 4px; font-size: 14px; } .bow-n b { font-size: 34px; } }

@media (prefers-reduced-motion: reduce) {
  .beads.route .bead.now::after, .jmap *, .setu-stone, .setu-waves, .bow-grip, .flight.flying::before { animation: none !important; }
  .journey, .interlude, .il-line { transition: none; }
}
