/* „Ožívání hry“ (36_juice.js). body[data-anim] = full | low | off. */
#jz-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
#jz-particles { position: fixed; pointer-events: none; z-index: 2; left: 0; top: 0; width: 0; height: 0; mix-blend-mode: screen; }
#jz-stack { position: fixed; right: 18px; bottom: 18px; z-index: 70; pointer-events: none; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; max-width: min(360px, 86vw); }
body[data-mobile="true"] #jz-stack { right: 10px; left: 10px; bottom: 86px; align-items: stretch; max-width: none; }
body[data-anim="off"] #jz-layer, body[data-anim="off"] #jz-stack, body[data-anim="off"] #jz-particles { display: none; }

/* ---------------------------------------------------------------- souboj */
.jz-flash { position: fixed; border-radius: 12px; pointer-events: none; animation: jzFlash .42s ease-out forwards; mix-blend-mode: screen; }
.jz-flash-hit { background: radial-gradient(circle, #ff5a4acc 0%, #ff2a1a55 45%, transparent 75%); }
.jz-flash-crit { background: radial-gradient(circle, #fff3c4 0%, #ffcf4acc 35%, #ff7a1a55 60%, transparent 80%); animation-duration: .5s; }
.jz-flash-heal { background: radial-gradient(circle, #9dffbbcc 0%, #3dd56a55 50%, transparent 78%); }
.jz-flash-interrupt { background: radial-gradient(circle, #8ad8ffcc 0%, #3a8dff55 50%, transparent 78%); }
@keyframes jzFlash { 0% { opacity: 0; transform: scale(.85); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.12); } }
.jz-spark { position: fixed; width: 6px; height: 6px; border-radius: 50%; margin: -3px 0 0 -3px; box-shadow: 0 0 8px currentColor; animation: jzSpark .85s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes jzSpark { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
.jz-pop { position: fixed; transform: translate(-50%, 0); font: 900 26px/1 "Cinzel", Georgia, serif; letter-spacing: .04em; white-space: nowrap; pointer-events: none; }
.jz-crit-text { color: #ffe08a; text-shadow: 0 0 10px #ff9a1a, 0 2px 0 #6a2a00, 0 0 22px #ff5a00; animation: jzCrit 1.1s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes jzCrit { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.4) rotate(-6deg); } 20% { opacity: 1; transform: translate(-50%, -10px) scale(1.25) rotate(2deg); } 70% { opacity: 1; transform: translate(-50%, -26px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -44px) scale(.9); } }
.jz-death { position: fixed; border-radius: 12px; pointer-events: none; background: radial-gradient(circle, #000c 0%, #2a1f3399 45%, transparent 75%); animation: jzDeath 1.05s ease-out forwards; }
@keyframes jzDeath { 0% { opacity: 0; transform: scale(.6); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.35); filter: blur(6px); } }
body[data-anim="full"] #center.jz-shake { animation: jzShake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes jzShake { 10%, 90% { transform: translate(-1px, 0); } 20%, 80% { transform: translate(3px, 1px); } 30%, 50%, 70% { transform: translate(-5px, -1px); } 40%, 60% { transform: translate(5px, 1px); } }
/* stínový pruh životů */
.bar.hp { position: relative; }
.bar.hp > .jz-ghost { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#fff0c0, #ffcf7a); opacity: .85; z-index: 0; border-radius: inherit; }
.bar.hp > i { position: relative; z-index: 1; }
.bar.hp > span { z-index: 2; }
body[data-anim="off"] .bar.hp > .jz-ghost { display: none; }
/* původní létající čísla: kritické větší a zlaté */
body:not([data-anim="off"]) #fx-layer .float.f-crit { font-size: 30px !important; color: #ffd76a !important; text-shadow: 0 0 12px #ff8a1a, 0 2px 0 #5a2200 !important; }
body:not([data-anim="off"]) #fx-layer .float.f-heal { color: #8dffb0 !important; text-shadow: 0 0 10px #2dcf5a !important; }
/* zuřící boss pulzuje */
body:not([data-anim="off"]) .rdb-foe.boss:not(.dead) em { animation: jzRage 1s ease-in-out infinite alternate; display: inline-block; }
@keyframes jzRage { from { text-shadow: 0 0 4px #ff2a2a; } to { text-shadow: 0 0 14px #ff2a2a, 0 0 24px #ff6a2a; } }
/* schopnost: krátký záblesk při kliknutí */
body:not([data-anim="off"]) .rdb-skill:active:not(.off) { transform: scale(.96); filter: brightness(1.35); }

/* ---------------------------------------------------------------- odměny */
.jz-fly { position: fixed; transform: translate(-50%, -50%); font: 800 20px/1 system-ui, sans-serif; white-space: nowrap; pointer-events: none; z-index: 80; }
.jz-fly-gold { color: #ffd25a; text-shadow: 0 0 10px #a86a00, 0 2px 0 #3a2400; }
.jz-fly-gold::before { content: ""; display: inline-block; width: 20px; height: 20px; margin-right: 4px; vertical-align: -4px; background: url("../assets/shop/gold.png") center/contain no-repeat; }
.jz-fly-xp { color: #b9e4ff; text-shadow: 0 0 10px #2a7aff, 0 2px 0 #0a1a3a; }
.jz-bump { animation: jzBump .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes jzBump { 0% { transform: scale(1); } 40% { transform: scale(1.12); filter: brightness(1.5); } 100% { transform: scale(1); } }
.jz-levelup { position: fixed; inset: 0; z-index: 90; pointer-events: none; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 45%, #ffcf5a33, transparent 60%); animation: jzLuIn .35s ease-out; }
.jz-levelup.out { animation: jzLuOut .6s ease-in forwards; }
.jz-lu-rays { position: absolute; width: 140vmax; height: 140vmax; background: repeating-conic-gradient(from 0deg, #ffd97a22 0deg 6deg, transparent 6deg 18deg); animation: jzRays 6s linear infinite; mask: radial-gradient(circle, #000 0%, transparent 55%); -webkit-mask: radial-gradient(circle, #000 0%, transparent 55%); }
.jz-lu-copy { position: relative; text-align: center; animation: jzLuPop .7s cubic-bezier(.2,1.5,.4,1); }
.jz-lu-copy small { display: block; font: 700 18px/1.2 system-ui, sans-serif; color: #fff3cf; letter-spacing: .2em; text-transform: uppercase; text-shadow: 0 2px 8px #000; }
.jz-lu-copy b { display: block; font: 900 clamp(44px, 8vw, 96px)/1 "Cinzel", Georgia, serif; color: #ffe08a; text-shadow: 0 0 18px #ff9a1a, 0 0 40px #ff6a00, 0 4px 0 #5a2a00; letter-spacing: .06em; }
.jz-lu-star { position: absolute; top: -20px; width: 8px; height: 8px; background: #ffe9a0; border-radius: 50%; box-shadow: 0 0 10px #ffc94a; animation: jzStar 1.6s linear forwards; }
@keyframes jzLuIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes jzLuOut { to { opacity: 0; transform: scale(1.05); } }
@keyframes jzLuPop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes jzRays { to { transform: rotate(360deg); } }
@keyframes jzStar { to { transform: translateY(110vh) rotate(360deg); opacity: .2; } }
body[data-anim="low"] .jz-lu-rays { display: none; }
.jz-card { --jz-r: #e9c77b; min-width: 220px; padding: 9px 14px 10px; border-radius: 12px; background: linear-gradient(135deg, #1b1f2bf2, #10131bf2); border: 1px solid var(--jz-r); box-shadow: 0 0 0 1px #0008, 0 8px 24px #000a, 0 0 18px color-mix(in srgb, var(--jz-r) 45%, transparent); animation: jzCardIn .45s cubic-bezier(.2,1.3,.4,1); }
.jz-card small { display: block; font: 700 11px/1.2 system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--jz-r); }
.jz-card span { display: block; color: #f3ead6; font-size: 14px; margin-top: 2px; }
.jz-card-win { --jz-r: #7fe39a; }
.jz-card.jz-high { position: relative; overflow: hidden; animation: jzCardIn .45s cubic-bezier(.2,1.3,.4,1), jzGlow 1.4s ease-in-out .4s infinite alternate; }
.jz-card.jz-high::after { content: ""; position: absolute; inset: -40% -10%; background: linear-gradient(100deg, transparent 40%, #ffffff55 50%, transparent 60%); animation: jzSheen 1.8s ease-in-out .3s infinite; }
.jz-card.out { animation: jzCardOut .45s ease-in forwards; }
@keyframes jzCardIn { from { opacity: 0; transform: translateX(40px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes jzCardOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes jzGlow { to { box-shadow: 0 0 0 1px #0008, 0 8px 24px #000a, 0 0 34px var(--jz-r); } }
@keyframes jzSheen { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
/* obrazovka výsledku: odměny vyjíždějí postupně */
body:not([data-anim="off"]) .rde .rde-chip { animation: jzChip .5s cubic-bezier(.2,1.4,.4,1) both; }
body:not([data-anim="off"]) .rde .rde-chip:nth-child(2) { animation-delay: .12s; } body:not([data-anim="off"]) .rde .rde-chip:nth-child(3) { animation-delay: .24s; }
body:not([data-anim="off"]) .rde .rde-chip:nth-child(4) { animation-delay: .36s; } body:not([data-anim="off"]) .rde .rde-chip:nth-child(n+5) { animation-delay: .48s; }
body:not([data-anim="off"]) .rde.win h2 { animation: jzWin .7s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes jzChip { from { opacity: 0; transform: translateY(10px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes jzWin { from { opacity: 0; transform: scale(.6); letter-spacing: .3em; } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- prostředí */
body[data-anim="full"] #tab-loc img.rd07-scene, body[data-anim="full"] #tab-loc .city-scene-art { animation: jzKen 28s ease-in-out infinite alternate; transform-origin: 50% 60%; }
body[data-anim="full"] #tab-loc .exo2-hero, body[data-anim="full"] #tab-loc .town2-map { animation: jzKenBg 26s ease-in-out infinite alternate; }
@keyframes jzKenBg { from { background-position: 45% 35%; } to { background-position: 55% 65%; } }
@keyframes jzKen { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.07) translate(-1.2%, -.8%); } }
body:not([data-anim="off"]) img.npc-portrait { animation: jzBreath 5s ease-in-out infinite; }
@keyframes jzBreath { 0%, 100% { transform: scale(1); filter: brightness(1); } 50% { transform: scale(1.025); filter: brightness(1.06); } }

/* ---------------------------------------------------------------- rozhraní */
body:not([data-anim="off"]) .btn { transition: transform .12s ease, box-shadow .2s ease, filter .2s ease; }
body:not([data-anim="off"]) .btn:hover:not(:disabled):not([aria-disabled="true"]) { filter: brightness(1.12); box-shadow: 0 0 0 1px #e9c77b55, 0 0 16px #e9c77b2e; }
body:not([data-anim="off"]) .btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px) scale(.98); }
body:not([data-anim="off"]) .shell-badge { animation: jzBadge 2.6s ease-in-out infinite; }
@keyframes jzBadge { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.22); } 90% { transform: scale(.95); } }
body:not([data-anim="off"]) .tabpane:not(.hidden) { animation: jzPane .22s ease-out; }
@keyframes jzPane { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* nastavení v nabídce */
.jz-setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 4px; font-size: 14px; }
.jz-setting select { font: inherit; color: inherit; background: rgba(255,255,255,.05); border: 1px solid var(--line, #3a3f52); border-radius: 8px; padding: 4px 8px; }
@media (prefers-reduced-motion: reduce) { body:not([data-anim="full"]) .jz-spark { display: none; } }

/* ---------------------------------------------------------------- „Tvůj další krok“ (37_next_step.js) */
#next-step:empty { display: none; }
#next-step { flex: 0 0 auto; margin: 0 0 8px; }
.ns { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px;
  background: linear-gradient(90deg, #2a2213f2, #17191ff2 60%); border: 1px solid #e9c77b88;
  box-shadow: 0 0 0 1px #0007, 0 6px 18px #0008, inset 0 0 24px #e9c77b14; }
.ns-ico { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-size: 20px;
  background: radial-gradient(circle, #e9c77b44, #e9c77b11); border: 1px solid #e9c77b66; }
.ns-copy { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ns-copy small { font: 700 11px/1.2 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #e9c77b; }
.ns-copy b { font-size: 15px; color: #f6ecd6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-copy span { font-size: 12px; opacity: .7; }
.ns .btn { flex: 0 0 auto; white-space: nowrap; }
body:not([data-anim="off"]) .ns-ico { animation: nsPulse 2.2s ease-in-out infinite; }
@keyframes nsPulse { 0%, 100% { box-shadow: 0 0 0 0 #e9c77b55; } 50% { box-shadow: 0 0 0 7px #e9c77b00; } }
body[data-mobile="true"] .ns { gap: 8px; padding: 7px 9px; }
body[data-mobile="true"] .ns-copy b { white-space: normal; font-size: 14px; }
body[data-mobile="true"] .ns-ico { width: 30px; height: 30px; font-size: 16px; }
/* zvýraznění cíle „Ukaž mi“ */
.ns-focus { outline: 3px solid #ffd36b !important; outline-offset: 3px; border-radius: 10px; animation: nsFocus 1s ease-in-out 4; position: relative; z-index: 5; }
@keyframes nsFocus { 0%, 100% { outline-color: #ffd36b; box-shadow: 0 0 0 0 #ffd36b88; } 50% { outline-color: #fff3c4; box-shadow: 0 0 0 10px #ffd36b00; } }
/* malovaný portrét v rozhovoru musí být vidět (dřív 32 px) */
#tab-loc .rd07-speaker img.npc-portrait { width: 112px !important; height: 112px !important; flex: 0 0 112px; object-fit: cover; border-radius: 14px; border: 1px solid #e9c77b88; box-shadow: 0 6px 18px #000a, 0 0 0 3px #0006; }
body[data-mobile="true"] #tab-loc .rd07-speaker img.npc-portrait { width: 72px !important; height: 72px !important; flex-basis: 72px; }
#tab-loc .rd07-speaker { align-items: center; gap: 14px; }
/* mobil: ukazatel dalšího kroku na dva řádky textu, menší tlačítko */
body[data-mobile="true"] .ns-copy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; letter-spacing: .08em; }
body[data-mobile="true"] .ns-copy b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 1.25; }
body[data-mobile="true"] .ns .btn { padding: 8px 10px; font-size: 13px; max-width: 42%; white-space: normal; line-height: 1.15; }
body[data-mobile="true"] #next-step { margin-bottom: 6px; }

/* ---------------------------------------------------------------- denní doba nad scénou (36_juice.js) */
#jz-tint { position: fixed; display: none; pointer-events: none; z-index: 1; border-radius: inherit; transition: background 2s ease; }
#jz-tint[data-time="day"] { background: transparent; }
#jz-tint[data-time="dawn"] { background: linear-gradient(180deg, #ffb39433 0%, #ffd9a022 45%, transparent 80%); mix-blend-mode: soft-light; }
#jz-tint[data-time="dusk"] { background: linear-gradient(180deg, #ff8a4a44 0%, #c2507033 50%, #2a1a4022 100%); mix-blend-mode: soft-light; }
#jz-tint[data-time="night"] { background: radial-gradient(ellipse at 50% 70%, #1a2a5a22 0%, #0a1030aa 70%, #050818cc 100%); mix-blend-mode: multiply; }
body:not([data-anim="full"]) #jz-tint { display: none !important; }
/* v noci svítí okna/špendlíky víc */
body[data-anim="full"]:has(#jz-tint[data-time="night"]) #tab-loc .town2-pin-ico { box-shadow: 0 0 14px #ffc85a99, 0 0 0 2px #e9c77b55; }

/* ---------------------------------------------------------------- živé špendlíky budov ve městě */
body:not([data-anim="off"]) #tab-loc .town2-pin { transition: transform .18s cubic-bezier(.2,1.6,.4,1), filter .2s ease; }
body:not([data-anim="off"]) #tab-loc .town2-pin:hover { transform: translate(-50%, -50%) translateY(-4px) scale(1.08); filter: drop-shadow(0 6px 10px #000a) drop-shadow(0 0 10px #ffd36b88); z-index: 3; }
body:not([data-anim="off"]) #tab-loc .town2-pin:hover .town2-pin-ico { animation: jzPinBob .7s ease-in-out infinite alternate; }
body:not([data-anim="off"]) #tab-loc .town2-pin:active { transform: translate(-50%, -50%) scale(.95); }
@keyframes jzPinBob { from { transform: translateY(0); } to { transform: translateY(-3px); } }

/* ---------------------------------------------------------------- vylepšování výbavy */
.jz-charge { position: fixed; transform: translate(-50%, -50%); pointer-events: none; border-radius: 50%; }
.jz-charge i { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed #ffd36baa; animation: jzSpin 1.2s linear infinite; box-shadow: 0 0 18px #ffb34a55 inset; }
.jz-charge i + i { inset: 14%; border-style: dotted; border-color: #9fd8ffaa; animation-direction: reverse; animation-duration: .9s; }
.jz-charge b { position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle, #fff6d0 0%, #ffd36b88 35%, transparent 70%); animation: jzCore .8s ease-in forwards; }
.jz-charge { animation: jzChargeIn .85s ease-in forwards; }
@keyframes jzSpin { to { transform: rotate(360deg); } }
@keyframes jzCore { from { transform: scale(.4); opacity: .4; } to { transform: scale(1.3); opacity: 1; } }
@keyframes jzChargeIn { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); } 30% { opacity: 1; } 100% { opacity: .9; transform: translate(-50%, -50%) scale(.75); } }
.jz-suck { position: fixed; width: 5px; height: 5px; margin: -2px 0 0 -2px; border-radius: 50%; background: #ffe7a0; box-shadow: 0 0 8px #ffc24a; animation: jzSuck .7s ease-in forwards; }
@keyframes jzSuck { from { transform: translate(var(--sx), var(--sy)) scale(1.4); opacity: 0; } 30% { opacity: 1; } to { transform: translate(0, 0) scale(.3); opacity: 0; } }
.jz-ring { --c: #ffd36b; position: fixed; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid var(--c); box-shadow: 0 0 20px var(--c), inset 0 0 14px var(--c); animation: jzRing .85s cubic-bezier(.1,.7,.3,1) forwards; }
@keyframes jzRing { from { transform: scale(.3); opacity: 1; } to { transform: scale(7); opacity: 0; } }
.jz-forge-glow { --c: #ffd36b; position: fixed; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%; background: radial-gradient(circle, #fff8 0%, var(--c) 25%, transparent 65%); mix-blend-mode: screen; animation: jzForgeGlow 1.05s ease-out forwards; }
@keyframes jzForgeGlow { 0% { transform: scale(.2); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.jz-up-text { --c: #ffd36b; color: #fff4cf; font-size: 46px !important; text-shadow: 0 0 12px var(--c), 0 0 28px var(--c), 0 3px 0 #3a2200; animation: jzUpText 1.25s cubic-bezier(.2,1.5,.4,1) forwards; }
@keyframes jzUpText { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.3); } 25% { opacity: 1; transform: translate(-50%, -6px) scale(1.25); } 75% { opacity: 1; transform: translate(-50%, -18px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -40px) scale(.9); } }
.jz-fail { position: fixed; width: 200px; height: 200px; margin: -100px 0 0 -100px; border-radius: 50%; background: radial-gradient(circle, #3a2a2acc 0%, #2a1a1a88 40%, transparent 70%); animation: jzFail 1s ease-out forwards; }
@keyframes jzFail { 0% { transform: scale(.3); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.4); opacity: 0; filter: blur(8px); } }
.jz-fail-text { color: #e0b0a8; font-size: 22px !important; text-shadow: 0 0 10px #a0302a, 0 2px 0 #200; animation: jzCrit 1.1s ease-out forwards; }
.jz-upgraded { --c: #ffd36b; animation: jzUpgraded 1.7s ease-out; border-radius: 12px; }
@keyframes jzUpgraded { 0% { box-shadow: 0 0 0 0 var(--c), 0 0 0 0 var(--c); filter: brightness(1.8) saturate(1.3); } 30% { box-shadow: 0 0 0 4px var(--c), 0 0 40px 8px var(--c); filter: brightness(1.35); } 100% { box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent; filter: none; } }
