/* 11_efekty.css – Efekty a animace.
   Sloučeno z: 41_juice.css, 42_wow.css (pořadí zachováno). */

/* ===== 41_juice.css ===== */
/* „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 var(--fs-xl)/1 var(--font-ui); 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: var(--fs-xl); color: #ffd76a; text-shadow: 0 0 12px #ff8a1a, 0 2px 0 #5a2200; }
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 var(--fs-l)/1 var(--font-ui); 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 var(--fs-l)/1.2 var(--font-ui); 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 var(--font-ui); 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 var(--fs-xs)/1.2 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--jz-r); }
.jz-card span { display: block; color: #f3ead6; font-size: var(--fs-m); 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); }
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 { align-items: center; justify-content: space-between; gap: 10px; padding: 6px 4px; font-size: var(--fs-m); }
.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: var(--fs-l);
  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 var(--fs-xs)/1.2 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: #e9c77b; }
.ns-copy b { font-size: var(--fs-m); color: #f6ecd6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ns-copy span { font-size: var(--fs-s); 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: var(--fs-m); }
body[data-mobile="true"] .ns-ico { width: 30px; height: 30px; font-size: var(--fs-m); }
/* 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; 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; 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: var(--fs-xs); 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: var(--fs-s); line-height: 1.25; }
body[data-mobile="true"] .ns .btn { padding: 8px 10px; font-size: var(--fs-s); 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: var(--fs-xl) !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: var(--fs-xl) !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; } }

/* ---------------------------------------------------------------- příběh v2: vypravěč, hlavička aktu, Kronika (38_story_v2.js) */
.narr-box .rd07-dialog-copy { border-left: 3px solid #e9c77b66; padding-left: 12px; }
.narr-box #dialog-text p, .narr-box .rd07-dialog-copy p { font-style: italic; color: #e8dcc0; }
.rd07-speaker.narr { align-items: center; }
.narr-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; font-size: var(--fs-xl); color: #ffe7a0;
  background: radial-gradient(circle, #3a2c12 0%, #1a140a 70%); box-shadow: 0 0 18px #e9c77b44, inset 0 0 0 1px #e9c77b66; }
body:not([data-anim="off"]) .narr-mark { animation: jzNarr 3.2s ease-in-out infinite; }
@keyframes jzNarr { 50% { box-shadow: 0 0 28px #e9c77b88, inset 0 0 0 1px #e9c77baa; } }
.story-dialog .rd07-dialog-copy p { line-height: 1.6; }
.act-banner { position: relative; display: grid; gap: 2px; flex: 0 0 auto; padding: 10px 14px 14px; margin-bottom: 10px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(120deg, #2a1f0e, #14100a 60%); border: 1px solid #e9c77b44; }
.act-banner b { font-family: var(--font-display, serif); letter-spacing: .08em; text-transform: uppercase; color: #e9c77b; font-size: var(--fs-s); }
.act-banner span { font-size: var(--fs-l); color: #fff4d8; font-family: var(--font-display, serif); }
.act-banner small { color: #c9b994; }
.act-progress { position: absolute; left: 0; bottom: 0; height: 4px; width: var(--p); background: linear-gradient(90deg, #b9832e, #ffd36b); box-shadow: 0 0 8px #ffd36b88; transition: width 1s ease; }
.codex-card { margin-top: 12px; }
.codex-list { display: grid; gap: 10px; max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.codex-cat h4 { margin: 4px 0 6px; color: #e9c77b; font-size: var(--fs-s); letter-spacing: .1em; text-transform: uppercase; }
.codex-entry { border: 1px solid #ffffff14; border-radius: 10px; background: #0000002a; margin-bottom: 6px; }
.codex-entry summary { cursor: pointer; padding: 8px 12px; display: flex; align-items: center; gap: 8px; list-style: none; font-weight: 600; }
.codex-entry summary::-webkit-details-marker { display: none; }
.codex-entry summary::before { content: "▸"; color: #e9c77b; transition: transform .2s ease; }
.codex-entry[open] summary::before { transform: rotate(90deg); }
.codex-entry .codex-text { padding: 0 14px 10px; color: #d8cdb4; line-height: 1.6; }
.codex-new { margin-left: auto; font-size: var(--fs-xs); padding: 2px 6px; border-radius: 6px; background: #ffd36b; color: #2a1c00; }
body:not([data-anim="off"]) .codex-new { animation: jzPulse 1.6s ease-in-out infinite; }
@keyframes jzPulse { 50% { opacity: .55; } }

/* ===== 42_wow.css ===== */
/* "Wow" vrstva (listopad 2026): živá úvodní scéna a silnější efekty. Viz js/game/features/39_wow.js. */

/* ---------- živá úvodní scéna ---------- */
.public-home-hero.wow-on { background-image: none !important; overflow: hidden; isolation: isolate; }
.wow-stage { position: absolute; inset: -14px; z-index: 0; pointer-events: none; scale: 1.04; transform-origin: 62% 55%;
  animation: wowKenBurns 46s ease-in-out infinite alternate; will-change: scale, translate; }
.wow-bg { position: absolute; inset: 0; background-size: cover; background-position: 50% 50%; background-repeat: no-repeat; }
.wow-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.wow-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.public-home-hero.wow-on > .public-home-copy { z-index: 2; }
@keyframes wowKenBurns { from { scale: 1.04; } to { scale: 1.12; } }

/* nadpis jemně dýchá světlem, hlavní tlačítko má odlesk */
.public-home-hero.wow-on h1 { animation: wowTitleGlow 5s ease-in-out infinite; }
@keyframes wowTitleGlow {
  0%, 100% { text-shadow: 0 2px 10px rgba(0,0,0,.6), 0 0 18px rgba(255,200,120,.15); }
  50% { text-shadow: 0 2px 10px rgba(0,0,0,.6), 0 0 34px rgba(255,210,140,.45), 0 0 70px rgba(120,220,255,.18); }
}
.public-home-hero.wow-on .btn.primary.big { position: relative; overflow: hidden; animation: wowCtaPulse 3.2s ease-in-out infinite; }
.public-home-hero.wow-on .btn.primary.big::after { content: ""; position: absolute; top: -20%; bottom: -20%; width: 38%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg);
  animation: wowShine 4.2s ease-in-out infinite 1.2s; pointer-events: none; }
@keyframes wowShine { 0%, 62% { left: -60%; } 100% { left: 130%; } }
@keyframes wowCtaPulse { 0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,.35), 0 0 0 rgba(255,190,90,0); } 50% { box-shadow: 0 4px 14px rgba(0,0,0,.35), 0 0 26px rgba(255,190,90,.55); } }

/* vstup: text úvodní stránky postupně vyjede */
.public-home-hero.wow-enter .public-home-copy > * { animation: wowEnter .9s cubic-bezier(.2,.8,.2,1) both; }
.public-home-hero.wow-enter .public-home-copy > *:nth-child(2) { animation-delay: .12s; }
.public-home-hero.wow-enter .public-home-copy > *:nth-child(3) { animation-delay: .24s; }
.public-home-hero.wow-enter .public-home-copy > *:nth-child(4) { animation-delay: .36s; }
.public-home-hero.wow-enter .public-home-copy > *:nth-child(n+5) { animation-delay: .48s; }
.public-home-hero.wow-enter .wow-stage { animation: wowReveal 2.2s cubic-bezier(.2,.7,.2,1) both, wowKenBurns 46s ease-in-out 2.2s infinite alternate; }
@keyframes wowEnter { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wowReveal { from { scale: 1.2; filter: brightness(.35) saturate(.6); } to { scale: 1.04; filter: none; } }

/* ---------- silnější vylepšení +8 až +10: sloup světla ---------- */
.jz-pillar { position: fixed; width: 160px; height: 120vh; transform: translate(-50%, -100%); pointer-events: none; z-index: 9998;
  background: linear-gradient(to top, color-mix(in srgb, var(--c, #ff8a3a) 85%, white), color-mix(in srgb, var(--c, #ff8a3a) 40%, transparent) 40%, transparent);
  filter: blur(6px); mix-blend-mode: screen; animation: wowPillar 1.8s ease-out forwards; }
@keyframes wowPillar { 0% { opacity: 0; scale: .2 1; } 15% { opacity: 1; scale: 1 1; } 100% { opacity: 0; scale: 1.6 1; } }
.jz-shock { position: fixed; width: 40px; height: 40px; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 9998;
  border: 3px solid var(--c, #ffd36b); box-shadow: 0 0 30px var(--c, #ffd36b), inset 0 0 20px var(--c, #ffd36b); animation: wowShock .9s ease-out forwards; }
@keyframes wowShock { from { opacity: 1; scale: .3; } to { opacity: 0; scale: 14; } }
.jz-screenflash { position: fixed; inset: 0; pointer-events: none; z-index: 9997; background: radial-gradient(circle at var(--x,50%) var(--y,50%), color-mix(in srgb, var(--c, #fff) 55%, transparent), transparent 60%);
  mix-blend-mode: screen; animation: wowFlash .7s ease-out forwards; }
@keyframes wowFlash { from { opacity: 1; } to { opacity: 0; } }

/* vzácná kořist: paprsek světla nad kartou */
.jz-card.jz-high { position: relative; }
.jz-card.jz-high::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 70%; height: 80px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--jz-r, #ffb347) 70%, transparent), transparent); filter: blur(5px); animation: wowBeam 1.6s ease-in-out infinite alternate; }
@keyframes wowBeam { from { opacity: .45; } to { opacity: 1; } }

/* nastavení zvuku a instalace v nabídce */
.shell-menu .wow-install { width: 100%; margin-top: 6px; }

body[data-anim="off"] .wow-stage, body[data-anim="off"] .public-home-hero.wow-on h1, body[data-anim="off"] .public-home-hero.wow-on .btn.primary.big,
body[data-anim="off"] .public-home-hero.wow-on .btn.primary.big::after, body[data-anim="off"] .public-home-hero .public-home-copy > * { animation: none !important; }
body[data-anim="low"] .wow-stage { animation: none; }
@media (prefers-reduced-motion: reduce) {
  body:not([data-anim="full"]) .wow-stage, body:not([data-anim="full"]) .public-home-hero .public-home-copy > * { animation: none !important; }
}

/* ---------- živá bojová scéna (js/game/features/40_battle_scene.js) ---------- */
#bs-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 59; }
.bs-ghost { position: fixed !important; margin: 0 !important; z-index: 58; pointer-events: none; will-change: transform;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
@keyframes bsRecoil { 0% { translate: 0 0; } 30% { translate: var(--bx) var(--by); } 100% { translate: 0 0; } }
@keyframes bsKnock { 0% { translate: 0 0; filter: brightness(2.2) saturate(.4); } 25% { translate: var(--kx) var(--ky); filter: brightness(1.6); } 100% { translate: 0 0; filter: none; } }
@keyframes bsDodge { 0% { translate: 0 0; opacity: 1; } 35% { translate: var(--dx) -6px; opacity: .55; } 100% { translate: 0 0; opacity: 1; } }
.bs-vignette { position: fixed; inset: 0; pointer-events: none; z-index: 57;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(200,20,10,.55) 100%); animation: bsVig .7s ease-out forwards; }
@keyframes bsVig { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }

/* portréty v boji dýchají; nepřítel, který nabíjí úder, pulzuje rudě; boss má auru */
body:not([data-anim="off"]) #tab-loc .rdb2 .battle-portrait { animation: bsBreath 3.4s ease-in-out infinite; transform-origin: 50% 90%; }
body:not([data-anim="off"]) #tab-loc .rdb2 .rdb-foe .battle-portrait { animation-duration: 2.7s; animation-delay: -1.1s; }
@keyframes bsBreath { 0%, 100% { scale: 1; } 50% { scale: 1.025; } }
body:not([data-anim="off"]) #tab-loc .rdb2 .rdb-foe:has(.rdb-cast) .battle-portrait { box-shadow: 0 0 0 2px rgba(255,90,60,.7), 0 0 22px rgba(255,70,40,.65); animation: bsBreath 1.1s ease-in-out infinite; border-radius: 50%; }
body:not([data-anim="off"]) #tab-loc .rdb2 .rdb-foe.boss .battle-portrait { filter: drop-shadow(0 0 10px rgba(255,90,40,.55)); }
#tab-loc .rdb2 .rdb-foe.dead .battle-portrait, #tab-loc .rdb2 .battle-fighter.dead .battle-portrait { animation: none; }
body[data-anim="off"] #bs-canvas { display: none; }

/* ---------- živá mapa města shora (js/game/features/41_town_map.js) ---------- */
#tab-loc .town2:has(.tm-on) { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); grid-template-areas: "map map" "actions side" "routes side"; }
#tab-loc .town2-map.tm-on { background-image: none !important; min-height: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
#tab-loc .town2-map.tm-on::before, #tab-loc .town2-map.tm-on::after { display: none !important; }
#tab-loc .town2-map.tm-on > .town2-top { inset: auto; padding: 12px 14px 10px; background: linear-gradient(#141c28, #10161f); border-bottom: 1px solid rgba(201,163,90,.35); }
#tab-loc .town2-map.tm-on > .town2-desc { position: static; margin: 0; padding: 9px 14px 11px; font-size: var(--fs-s); opacity: .85; background: #10161f; border-top: 1px solid rgba(201,163,90,.25); }
.tm-hidden-pins { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tm-host { position: relative; height: clamp(340px, 64vh, 720px); background: #0b1119; }
body[data-mobile="true"] .tm-host { height: clamp(320px, 62vh, 560px); }
.tm-root { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tm-root:active { cursor: grabbing; }
.tm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tm-layer { position: absolute; inset: 0; pointer-events: none; }

/* budovy: štítek s ikonou, špička míří na budovu */
.tm-bld { position: absolute; left: 0; top: 0; pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px;
  border-radius: 999px; background: rgba(14,18,26,.82); border: 1px solid rgba(255,210,120,.5); color: #f5e6c6; font: 600 var(--fs-s)/1.15 var(--font-ui);
  white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.5); cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s, filter .2s; z-index: 2000; }
.tm-bld::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; translate: -50% 0; rotate: 45deg;
  background: inherit; border-right: 1px solid rgba(255,210,120,.5); border-bottom: 1px solid rgba(255,210,120,.5); }
.tm-bld-ico { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: var(--fs-s); background: radial-gradient(#4a3518, #1b130a); border: 1px solid #c9a35a; }
.tm-bld.compact { padding: 3px; }
.tm-bld.compact .tm-bld-name { display: none; }
.tm-bld.hot, .tm-bld:hover, .tm-bld:focus-visible { background: rgba(70,46,12,.95); border-color: #ffd36b; box-shadow: 0 0 0 2px rgba(255,211,107,.35), 0 0 22px rgba(255,190,80,.55); outline: none; z-index: 2100; }
.tm-bld.hot.compact .tm-bld-name, .tm-bld.compact:focus-visible .tm-bld-name { display: inline; }

/* figurky: portrét na podstavci, jméno, bublina */
.tm-tok { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; transform-origin: 0 0; }
.tm-tok::before { content: ""; position: absolute; left: -11px; top: -5px; width: 22px; height: 8px; border-radius: 50%; background: rgba(0,0,0,.45); }
.tm-tok-face { position: absolute; left: -16px; top: -40px; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 2px solid #d9c49a; background: #1a2230; box-shadow: 0 3px 8px rgba(0,0,0,.6); }
.tm-tok-face > .character-art { width: 100%; height: 100%; }
.tm-tok-face > .character-art > span { top: 30%; transform: translate(-50%, -30%); }
.tm-tok > b { position: absolute; top: 4px; left: 0; translate: -50% 0; font: 700 var(--fs-xs)/1.2 var(--font-ui); color: #fff; white-space: nowrap;
  background: rgba(8,10,16,.62); padding: 1px 6px; border-radius: 7px; text-shadow: 0 1px 2px #000; }
.tm-me .tm-tok-face { border-color: #ffd36b; box-shadow: 0 0 0 2px rgba(255,211,107,.45), 0 0 16px rgba(255,211,107,.8); }
.tm-me > b { background: rgba(110,74,10,.85); }
.tm-player .tm-tok-face { border-color: #7fd6ff; box-shadow: 0 0 10px rgba(127,214,255,.6); }
.tm-folk .tm-tok-face { width: 28px; height: 28px; left: -14px; top: -36px; border-color: #b8a07a; }
.tm-folk > b { font-weight: 600; color: #f1e3c6; }
.tm-say { position: absolute; bottom: 46px; left: 0; translate: -50% 0; scale: .6; opacity: 0; width: max-content; max-width: 190px; white-space: normal;
  background: #f7eedb; color: #2a1d10; font: 600 var(--fs-xs)/1.3 var(--font-ui); padding: 5px 9px; border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.45);
  transition: opacity .25s, scale .25s; quotes: none; }
.tm-say::before, .tm-say::after { content: none; }
.tm-say.on { opacity: 1; scale: 1; }
.tm-say.on::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; translate: -50% 0; rotate: 45deg; background: #f7eedb; }

/* ovládání přiblížení */
.tm-ctrl { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 3000; }
.tm-zoom { width: 36px; height: 36px; border-radius: 10px; background: rgba(14,18,26,.85); border: 1px solid rgba(255,210,120,.5); color: #f5e6c6; font-size: var(--fs-l); line-height: 1; cursor: pointer; }
.tm-zoom:hover { border-color: #ffd36b; }
@media (max-width: 760px) { #tab-loc .town2:has(.tm-on) { grid-template-columns: 1fr; grid-template-areas: "map" "actions" "side" "routes"; } }

/* ---------- město na jednu obrazovku (bez posouvání): mapa vyplní výšku, akce a cesty leží na mapě ---------- */
#tab-loc .town-screen:has(.tm-on) { overflow: hidden !important; padding-bottom: 0 !important; }
#tab-loc .town2:has(.tm-on) { flex: 1 1 auto; height: 100%; min-height: 0; margin: 0;
  grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: minmax(0, 1fr); grid-template-areas: "map side"; gap: 10px; align-items: stretch; }
#tab-loc .town2:has(.tm-on) > .town2-map { grid-area: map; height: 100%; min-height: 0; position: relative; border-radius: 14px; }
#tab-loc .town2-map.tm-on > .tm-host { flex: 1 1 auto; height: auto; min-height: 0; }
#tab-loc .town2-map.tm-on > .town2-top { position: absolute; z-index: 6; max-width: min(62%, 560px); padding: 7px 12px;
  background: rgba(12,16,24,.8); border: 1px solid rgba(201,163,90,.45); border-radius: 12px; backdrop-filter: blur(4px); gap: 10px; }
#tab-loc .town2-map.tm-on > .town2-top h2 { font-size: var(--fs-l); margin: 0 0 3px; line-height: 1.15; }
#tab-loc .town2-map.tm-on > .town2-desc { display: none; }

/* lišta akcí dole na mapě */
#tab-loc .town2:has(.tm-on) > .town2-actions { grid-area: map; align-self: end; justify-self: center; z-index: 6; margin: 0 56px 12px 12px; padding: 6px !important;
  max-width: calc(100% - 80px); background: rgba(12,16,24,.84); border: 1px solid rgba(201,163,90,.5); border-radius: 14px; backdrop-filter: blur(4px); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
#tab-loc .town2:has(.tm-on) > .town2-actions > h3 { display: none; }
#tab-loc .town2:has(.tm-on) .town2-quick { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
#tab-loc .town2:has(.tm-on) .town2-quick > * { flex: 0 0 auto; width: auto; min-height: 40px; padding: 6px 12px !important; margin: 0; white-space: nowrap; }

/* cesty z města = průzkum, vpravo nahoře na mapě */
#tab-loc .town2:has(.tm-on) > .town2-routes { grid-area: map; align-self: start; justify-self: end; z-index: 6; margin: 10px 10px 0 0; width: 260px; max-height: calc(100% - 140px);
  overflow: auto; padding: 8px !important; border: 1px solid rgba(201,163,90,.5) !important; border-radius: 12px; backdrop-filter: blur(4px); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
#tab-loc .town2:has(.tm-on) > .town2-routes > h3 { font-size: var(--fs-s); margin: 0 0 6px; color: #ffd36b; letter-spacing: .02em; }
#tab-loc .town2:has(.tm-on) .exo2-routes { display: flex; flex-direction: column; gap: 6px; }
#tab-loc .town2:has(.tm-on) .exo2-route { min-height: 0; gap: 8px; }
#tab-loc .town2:has(.tm-on) .exo2-route-art { flex: 0 0 44px; border-radius: 7px; }
#tab-loc .town2:has(.tm-on) .exo2-route:hover { border-color: #ffd36b; box-shadow: 0 0 14px rgba(255,190,80,.4); }

/* náměstí, vývěska a chat: vpravo vedle mapy, posouvá se jen uvnitř */
#tab-loc .town2:has(.tm-on) > .town2-side { grid-area: side; min-height: 0; height: 100%; overflow: auto; }
.tm-side-btn { display: none !important; }

/* užší obrazovka: náměstí a chat jako vysouvací panel přes mapu (tlačítko 👥) */
@media (max-width: 1180px) {
  #tab-loc .town2:has(.tm-on) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "map"; }
  #tab-loc .town2:has(.tm-on) > .town2-side { display: none; }
  body[data-tm-side="open"] #tab-loc .town2:has(.tm-on) > .town2-side { display: block; grid-area: map; justify-self: end; z-index: 8; width: min(340px, 92%); height: 100%;
    background: #0e141d; border-left: 1px solid rgba(201,163,90,.5); box-shadow: -10px 0 30px rgba(0,0,0,.6); padding: 8px; animation: tmSideIn .25s ease-out; }
  .tm-side-btn { display: block !important; }
  body[data-tm-side="open"] #tab-loc .town2:has(.tm-on) > .town2-routes { display: none; }
}
@keyframes tmSideIn { from { translate: 30px 0; opacity: 0; } to { translate: 0 0; opacity: 1; } }
/* mobil: hlavička jen se jménem, cesty jako vodorovný pás nahoře, akce dole */
@media (max-width: 700px) {
  #tab-loc .town2-map.tm-on > .town2-top { max-width: calc(100% - 20px); padding: 5px 10px; }
  #tab-loc .town2-map.tm-on > .town2-top .exo2-badges, #tab-loc .town2-map.tm-on > .town2-top .btn { display: none; }
  #tab-loc .town2-map.tm-on > .town2-top h2 { font-size: var(--fs-m); margin: 0; }
  #tab-loc .town2:has(.tm-on) > .town2-routes { justify-self: stretch; width: auto; margin: 52px 8px 0; max-height: none; padding: 6px !important; }
  #tab-loc .town2:has(.tm-on) > .town2-routes > h3 { display: none; }
  #tab-loc .town2:has(.tm-on) .exo2-routes { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  #tab-loc .town2:has(.tm-on) .exo2-route { flex: 0 0 auto; }
  #tab-loc .town2:has(.tm-on) > .town2-actions { margin: 0 8px 8px; max-width: calc(100% - 16px); justify-self: stretch; }
}

/* doladění: panely leží nad štítky mapy, kompaktní hlavička a karty cest */
#tab-loc .town2:has(.tm-on) > .town2-map { z-index: 1; }
.tm-root { z-index: 0; isolation: isolate; }
#tab-loc .town2:has(.tm-on) > .town2-actions, #tab-loc .town2:has(.tm-on) > .town2-routes { z-index: 6; position: relative; }
#tab-loc .town2-map.tm-on > .town2-top { display: flex; align-items: center; min-height: 0; }
#tab-loc .town2-map.tm-on > .town2-top h2 { font-size: var(--fs-l) !important; line-height: 1.15; margin: 0 0 4px; letter-spacing: .02em; }
#tab-loc .town2-map.tm-on > .town2-top .exo2-badges { gap: 4px; flex-wrap: wrap; }
#tab-loc .town2-map.tm-on > .town2-top .exo2-badges > * { font-size: var(--fs-xs); padding: 2px 7px; min-height: 0; }
#tab-loc .town2-map.tm-on > .town2-top .btn { padding: 4px 9px; min-height: 0; font-size: var(--fs-s); }
#tab-loc .town2:has(.tm-on) .exo2-route { display: flex; flex-direction: row !important; align-items: center; text-align: left; width: 100%; }
#tab-loc .town2:has(.tm-on) .exo2-route-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#tab-loc .town2:has(.tm-on) .exo2-route-copy b { font-size: var(--fs-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-loc .town2:has(.tm-on) .exo2-route-copy small { font-size: var(--fs-xs); }
#tab-loc .town2:has(.tm-on) .exo2-route-art { aspect-ratio: auto; min-height: 0; }
.tm-side-close { display: none; }
@media (max-width: 1180px) {
  body[data-tm-side="open"] #tab-loc .town2:has(.tm-on) > .town2-side { padding-top: 44px; position: relative; }
  .tm-side-close { display: block; position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 9px; z-index: 2;
    background: rgba(14,18,26,.9); border: 1px solid rgba(255,210,120,.5); color: #f5e6c6; font-size: var(--fs-m); cursor: pointer; }
}
/* mobil: tenké pruhy, ať je vidět co nejvíc mapy */
@media (max-width: 700px) {
  #tab-loc .town2-map.tm-on > .town2-top { padding: 3px 9px; border-radius: 9px; }
  #tab-loc .town2-map.tm-on > .town2-top h2 { font-size: var(--fs-s) !important; }
  #tab-loc .town2:has(.tm-on) > .town2-routes { margin: 36px 6px 0; padding: 4px !important; border-radius: 10px; }
  #tab-loc .town2:has(.tm-on) .exo2-routes { gap: 4px; }
  #tab-loc .town2:has(.tm-on) .exo2-route { padding: 3px 8px 3px 3px; gap: 6px; border-radius: 8px; }
  #tab-loc .town2:has(.tm-on) .exo2-route-art { width: 30px; height: 24px; flex: 0 0 30px; border-radius: 5px; }
  #tab-loc .town2:has(.tm-on) .exo2-route-copy b { font-size: var(--fs-xs); }
  #tab-loc .town2:has(.tm-on) .exo2-route-copy small { font-size: var(--fs-xs); }
  #tab-loc .town2:has(.tm-on) > .town2-actions { margin: 0 6px 6px; padding: 4px !important; border-radius: 10px; }
  #tab-loc .town2:has(.tm-on) .town2-quick { gap: 4px; }
  #tab-loc .town2:has(.tm-on) .town2-quick > * { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; min-height: 32px;
    padding: 4px 9px !important; font-size: var(--fs-s); }
  #tab-loc .town2:has(.tm-on) .town2-quick .city-icon { width: 16px; height: 16px; margin: 0; }
  .tm-ctrl { top: 78px; bottom: auto; right: 6px; gap: 4px; }
  .tm-ctrl .tm-zoom[data-z="1"], .tm-ctrl .tm-zoom[data-z="-1"] { display: none; }
  .tm-zoom { width: 32px; height: 32px; font-size: var(--fs-m); }
}
#tab-loc .town2:has(.tm-on) .exo2-route-copy { padding: 0 !important; }
@media (max-width: 700px) {
  #tab-loc .town2:has(.tm-on) .exo2-route { width: auto; }
  #tab-loc .town2:has(.tm-on) .exo2-route-copy small { display: none; }
}

/* ---------- hlavní lišta s více záložkami (js/game/core/32_shell.js RAIL) ---------- */
body:not([data-mobile="true"]) .shell-rail { gap: 3px !important; scrollbar-width: thin; scrollbar-color: #5a4a2c transparent; }
body:not([data-mobile="true"]) .shell-rail-btn { min-height: 50px; padding: 4px 2px !important; gap: 2px; line-height: 1.1; flex: 0 0 auto; }
body:not([data-mobile="true"]) .shell-rail-btn .foundation-icon { width: 22px !important; height: 22px !important; }
@media (min-height: 860px) {
  body:not([data-mobile="true"]) .shell-rail-btn { min-height: 58px; font-size: var(--fs-xs); }
  body:not([data-mobile="true"]) .shell-rail-btn .foundation-icon { width: 26px !important; height: 26px !important; }
}
/* telefon: spodní lišta posuvná do strany, položka „Více“ vždy po ruce na konci */
body[data-mobile="true"] .shell-phone-nav { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(90deg, #000 88%, transparent); }
body[data-mobile="true"] .shell-phone-nav::-webkit-scrollbar { display: none; }
body[data-mobile="true"] .mob-bar .shell-phone-btn { min-width: 68px; min-height: 52px; scroll-snap-align: start; position: relative; }
body[data-mobile="true"] .mob-bar .shell-phone-btn .foundation-icon { width: 22px; height: 22px; }
body:not([data-mobile="true"]) #shell-rail { padding: 6px 6px !important; gap: 2px !important; }
body:not([data-mobile="true"]) #shell-rail .shell-rail-btn { min-height: 46px !important; padding: 3px 2px !important; gap: 2px !important; border-radius: 11px !important; }
body:not([data-mobile="true"]) #shell-rail .shell-rail-btn .foundation-icon { width: 21px !important; height: 21px !important; }
body:not([data-mobile="true"]) #shell-rail .shell-rail-btn > span:not(.foundation-icon) { font-size: var(--fs-xs) !important; }
body:not([data-mobile="true"]) #shell-rail .shell-rail-btn.active::before { left: -7px; }
@media (min-height: 900px) {
  body:not([data-mobile="true"]) #shell-rail .shell-rail-btn { min-height: 58px !important; }
  body:not([data-mobile="true"]) #shell-rail .shell-rail-btn .foundation-icon { width: 25px !important; height: 25px !important; }
  body:not([data-mobile="true"]) #shell-rail .shell-rail-btn > span:not(.foundation-icon) { font-size: var(--fs-xs); }
}

/* ---------- telefon: tenčí pruhy nad obsahem, ať zbyde místo hře ---------- */
body[data-mobile="true"] #next-step .ns { min-height: 0; padding: 5px 8px; gap: 8px; }
body[data-mobile="true"] #next-step .ns-ico { width: 26px; height: 26px; font-size: var(--fs-m); flex: 0 0 26px; }
body[data-mobile="true"] #next-step .ns-copy small { display: none; }
body[data-mobile="true"] #next-step .ns-copy b { font-size: var(--fs-s); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
body[data-mobile="true"] #next-step .ns .btn { min-height: 32px; padding: 4px 10px; font-size: var(--fs-s); }
body[data-mobile="true"] #guide-box .guide-min { padding: 0 !important; margin: 0 !important; }
body[data-mobile="true"] #guide-box .guide-min #guide-toggle { min-height: 32px !important; padding: 3px 10px !important; font-size: var(--fs-s) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
body[data-mobile="true"] #guide-box .guide-min #guide-toggle * { white-space: nowrap !important; }
body[data-mobile="true"] .shell-subnav { padding-top: 2px !important; padding-bottom: 2px !important; }
body[data-mobile="true"] .shell-subnav .tab { min-height: 36px; padding: 4px 12px; font-size: var(--fs-s); }
/* telefon: podzáložky inventáře jako posuvný pás (dřív se slova lámala po písmenkách); výběr „Zobrazení“ je pak navíc */
body[data-mobile="true"] #tab-inv .inventory-tabs { display: flex !important; flex-wrap: nowrap; overflow-x: auto; gap: 6px; scrollbar-width: none; padding-bottom: 2px; }
body[data-mobile="true"] #tab-inv .inventory-tabs::-webkit-scrollbar { display: none; }
body[data-mobile="true"] #tab-inv .inventory-tabs > .btn { flex: 0 0 auto; width: auto; min-width: 0; white-space: nowrap; word-break: normal; overflow-wrap: normal; padding: 6px 12px; }
body[data-mobile="true"] #tab-inv .inventory-view-select { display: none; }
/* telefon: i další pásy záložek (úkoly, společenství) posuvné bez lámání slov */
body[data-mobile="true"] .rd07-tabs, body[data-mobile="true"] .social-tabs { display: flex; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; gap: 6px; }
body[data-mobile="true"] .rd07-tabs::-webkit-scrollbar, body[data-mobile="true"] .social-tabs::-webkit-scrollbar { display: none; }
body[data-mobile="true"] .rd07-tabs > .btn, body[data-mobile="true"] .social-tabs > .btn { flex: 0 0 auto !important; width: auto; min-width: 0; white-space: nowrap; word-break: normal; overflow-wrap: normal; padding: 6px 12px; }

/* ---------- testovací hřiště (js/game/features/43_hriste.js) ---------- */
body[data-hriste="true"]::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(90deg, #ff9d2e 0 18px, #1b1206 18px 30px); }
#hriste-panel { position: fixed; right: 12px; top: 84px; width: 260px; max-height: calc(100vh - 100px); overflow: auto; z-index: 9000;
  background: rgba(14,18,26,.95); border: 1px solid #ff9d2e; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.6); color: #f1e6cf;
  font: var(--fs-s)/1.3 var(--font-ui); backdrop-filter: blur(4px); }
#hriste-panel header { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #2a1c08; border-bottom: 1px solid #ff9d2e66; }
#hriste-panel header b { flex: 1 1 auto; color: #ffc46b; }
#hriste-panel header small { opacity: .7; font-size: var(--fs-xs); }
#hriste-panel header button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid #ff9d2e88; background: #1a1208; color: #ffc46b; cursor: pointer; }
#hriste-panel.min { width: auto; }
#hriste-panel.min .hp-body, #hriste-panel.min header small { display: none; }
#hriste-panel .hp-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
#hriste-panel label { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-s); color: #cdbf9f; }
#hriste-panel label.chk { flex-direction: row; align-items: center; gap: 6px; }
#hriste-panel select, #hriste-panel input[type=number] { width: 100%; padding: 5px 6px; border-radius: 7px; border: 1px solid #5a4a2c; background: #0b1017; color: #f1e6cf; font-size: var(--fs-s); }
#hriste-panel input[type=range] { width: 100%; }
#hriste-panel .row { display: flex; gap: 6px; }
#hriste-panel .row > label { flex: 1 1 0; }
#hriste-panel .hp-body > button, #hriste-panel .fxrow button { padding: 6px 8px; border-radius: 8px; border: 1px solid #c9a35a88; background: linear-gradient(#3a2a12, #1d150a); color: #ffe7b8; cursor: pointer; font-weight: 600; }
#hriste-panel .hp-body > button:hover, #hriste-panel .fxrow button:hover { border-color: #ffd36b; }
#hriste-panel .fxrow { display: flex; flex-wrap: wrap; gap: 4px; }
#hriste-panel .fxrow button { flex: 1 0 28px; padding: 5px 0; font-size: var(--fs-m); }
#hriste-panel hr { border: 0; border-top: 1px solid #ff9d2e33; margin: 4px 0; }
#hriste-panel .leave { border-color: #b65a4a !important; background: linear-gradient(#4a1a12, #24100b) !important; }
body[data-mobile="true"] #hriste-panel { top: auto; bottom: 128px; right: 6px; width: min(270px, 84vw); max-height: 58vh; }

/* ===================================================================== akční zóna (hřiště) */
body.arpg-on { overflow: hidden; }
body.arpg-on #hriste-panel { display: none; }
#arpg { position: fixed; inset: 0; z-index: 400; background: #05070c; color: #eee; font-family: var(--font-ui); user-select: none; -webkit-user-select: none; }
#arpg .ar-cv { position: absolute; inset: 0; touch-action: none; display: block; }
#arpg .ar-load { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; }
#arpg .ar-load b { font: 700 var(--fs-xl)/1.1 var(--font-ui); color: #e9d29a; letter-spacing: .04em; }
#arpg .ar-load span { color: #9a9; animation: arPulse 1.2s ease-in-out infinite alternate; }
#arpg:not(.ar-loading) .ar-load { display: none; }
@keyframes arPulse { from { opacity: .4; } to { opacity: 1; } }
#arpg .ar-hud { position: absolute; inset: 0; pointer-events: none; }
#arpg .ar-hud button { pointer-events: auto; font: inherit; cursor: pointer; }
#arpg .ar-top { position: absolute; left: 12px; top: 10px; display: flex; gap: 8px; align-items: center; }
#arpg .ar-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid #6b5536; background: rgba(12,10,8,.78); color: #e9d29a; font-size: var(--fs-l); }
#arpg .ar-btn:hover { border-color: #e2b860; }
#arpg .ar-zone { display: grid; padding: 4px 12px; border-radius: 10px; background: rgba(12,10,8,.65); border: 1px solid rgba(160,130,80,.4); }
#arpg .ar-zone b { font: 700 var(--fs-m)/1.2 var(--font-ui); color: #e9d29a; }
#arpg .ar-zone small { color: #bba; font-size: var(--fs-s); }
#arpg .ar-target, #arpg .ar-boss { position: absolute; left: 50%; transform: translateX(-50%); top: 12px; min-width: 280px; max-width: 70vw; text-align: center; }
#arpg .ar-boss { top: 14px; min-width: min(520px, 80vw); }
#arpg .ar-boss:not([hidden]) ~ .ar-target, #arpg .ar-target:has(~ .ar-boss:not([hidden])) { top: 64px; }
#arpg .ar-target b, #arpg .ar-boss b { display: block; font-size: var(--fs-s); color: #f1e3c0; text-shadow: 0 1px 2px #000; margin-bottom: 3px; }
#arpg .ar-boss b { font: 700 var(--fs-l)/1.2 var(--font-ui); color: #ffb36a; }
#arpg .ar-target i, #arpg .ar-boss i { display: block; height: 10px; background: rgba(0,0,0,.7); border: 1px solid #6b2a22; border-radius: 3px; overflow: hidden; }
#arpg .ar-boss i { height: 14px; border-color: #b0782a; box-shadow: 0 0 18px rgba(255,120,40,.35); }
#arpg .ar-target i span, #arpg .ar-boss i span { display: block; height: 100%; background: linear-gradient(#e0473a, #8e1d16); transition: width .15s; }
#arpg .ar-target.champ i span { background: linear-gradient(#5aa0ff, #1d4e9e); }
#arpg .ar-mini { position: absolute; right: 12px; top: 10px; width: 240px; height: 135px; border: 1px solid #7a6038; border-radius: 6px; box-shadow: 0 4px 18px rgba(0,0,0,.6); background: #000; opacity: .92; }
#arpg .ar-msgs { position: absolute; left: 14px; bottom: 150px; max-width: min(460px, 60vw); display: grid; gap: 2px; }
#arpg .ar-msgs p { margin: 0; font-size: var(--fs-s); text-shadow: 0 1px 2px #000, 0 0 6px #000; animation: arMsg .3s ease-out; }
@keyframes arMsg { from { opacity: 0; transform: translateX(-8px); } }
#arpg .ar-bottom { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 14px; }
#arpg .ar-orb { position: relative; width: 112px; height: 112px; border-radius: 50%; overflow: hidden; pointer-events: auto;
  background: radial-gradient(circle at 50% 40%, #1a1410, #050403); border: 3px solid #8a6a3a; box-shadow: 0 0 0 2px #2a1d10, 0 6px 20px rgba(0,0,0,.7), inset 0 0 18px #000; }
#arpg .ar-orb i { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; transition: height .2s; }
#arpg .ar-orb.hp i { background: radial-gradient(circle at 40% 30%, #ff6b5a, #b01810 45%, #4a0604); }
#arpg .ar-orb.mp i { background: radial-gradient(circle at 40% 30%, #6ab0ff, #1a48c0 45%, #061a4a); }
#arpg .ar-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse 50% 30% at 38% 22%, rgba(255,255,255,.35), transparent 70%); pointer-events: none; }
#arpg .ar-orb span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: var(--fs-s); text-shadow: 0 1px 3px #000; z-index: 1; }
#arpg .ar-mid { display: grid; gap: 6px; padding-bottom: 6px; }
#arpg .ar-xp { height: 7px; background: rgba(0,0,0,.7); border: 1px solid #5a4628; border-radius: 4px; overflow: hidden; pointer-events: auto; }
#arpg .ar-xp i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b88a2a, #ffe08a); transition: width .3s; }
#arpg .ar-slots { display: flex; gap: 5px; padding: 6px; background: rgba(10,8,6,.82); border: 1px solid #6b5536; border-radius: 10px; }
#arpg .ar-slot { position: relative; width: 50px; height: 50px; border-radius: 8px; border: 1px solid #5d4a30; background: radial-gradient(circle at 50% 35%, #3a2c1c, #120d08); color: #fff; padding: 0; }
#arpg .ar-slot em { font-style: normal; font-size: var(--fs-xl); line-height: 50px; display: block; }
#arpg .ar-slot kbd { position: absolute; left: 3px; top: 1px; font: 700 var(--fs-xs) var(--font-ui); color: #e9d29a; text-shadow: 0 1px 2px #000; }
#arpg .ar-slot .cnt { position: absolute; right: 4px; bottom: 2px; font-weight: 800; font-size: var(--fs-s); text-shadow: 0 1px 2px #000; }
#arpg .ar-slot u { position: absolute; inset: 0; border-radius: 8px; background: conic-gradient(rgba(0,0,0,.72) calc(var(--cd, 0) * 360deg), transparent 0); pointer-events: none; }
#arpg .ar-slot.sel { border-color: #ffd27a; box-shadow: 0 0 10px rgba(255,200,100,.55); }
#arpg .ar-slot.nomana em { filter: grayscale(1) brightness(.6); }
#arpg .ar-slot.nomana { border-color: #2a4a8a; }
#arpg .ar-slot:hover { border-color: #e2b860; }
#arpg .ar-touch { display: none; }
#arpg .ar-help, #arpg .ar-dead, #arpg .ar-win { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); pointer-events: auto; }
#arpg .ar-help[hidden], #arpg .ar-dead[hidden] { display: none; }
#arpg .ar-help-box { max-width: min(560px, 92vw); padding: 20px 24px; border-radius: 14px; background: linear-gradient(#1c150e, #0c0906); border: 1px solid #8a6a3a; box-shadow: 0 10px 40px #000; }
#arpg .ar-help-box h3 { margin: 0 0 10px; font: 700 var(--fs-xl) var(--font-display); color: #e9d29a; }
#arpg .ar-help-box p { margin: 6px 0; font-size: var(--fs-m); color: #ddd; line-height: 1.45; }
#arpg .ar-help-box b { color: #ffd27a; }
#arpg .ar-goal { padding-top: 8px; border-top: 1px solid #3a2c1c; }
#arpg .ar-help-box button, #arpg .ar-dead button, #arpg .ar-win button { margin-top: 12px; padding: 10px 22px; border-radius: 10px; border: 1px solid #c0903a; background: linear-gradient(#7a4a18, #3a220a); color: #ffe7b0; font-weight: 700; font-size: var(--fs-m); }
#arpg .ar-dead, #arpg .ar-win { text-align: center; align-content: center; gap: 8px; background: radial-gradient(circle, rgba(60,0,0,.5), rgba(0,0,0,.82)); }
#arpg .ar-win { inset: auto; left: 50%; top: 16%; transform: translateX(-50%); padding: 16px 28px 18px; border-radius: 14px; border: 1px solid #b0882a;
  background: linear-gradient(rgba(40,28,8,.92), rgba(10,8,4,.92)); box-shadow: 0 0 40px rgba(255,190,80,.25); animation: arWin .6s cubic-bezier(.2,1.4,.4,1); max-width: 92vw; }
#arpg .ar-win b { font-size: var(--fs-xl); }
#arpg .ar-win button { margin-top: 6px; }
@keyframes arWin { from { opacity: 0; transform: translateX(-50%) scale(.6); } }
#arpg .ar-dead b, #arpg .ar-win b { font: 700 var(--fs-xl) var(--font-ui); color: #d33; text-shadow: 0 0 20px #000; display: block; }
#arpg .ar-win b { color: #ffd27a; font-size: var(--fs-xl); }
#arpg .ar-dead span, #arpg .ar-win span { color: #ddd; display: block; }
#arpg .ar-win div { display: flex; gap: 10px; justify-content: center; }
#hriste-panel button.arpg { background: linear-gradient(#8a2a18, #4a1008); border-color: #ff8a4a; color: #ffe2c0; font-weight: 800; }
/* telefon: páčka, tlačítko útoku, menší koule */
@media (pointer: coarse), (max-width: 760px) {
  #arpg .ar-touch { display: block; }
  #arpg .ar-joy { position: absolute; left: 18px; bottom: 120px; width: 120px; height: 120px; border-radius: 50%; pointer-events: auto; touch-action: none;
    background: radial-gradient(circle, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 2px solid rgba(233,210,154,.35); }
  #arpg .ar-joy i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #e9d29a, #7a5a2a); opacity: .8; }
  #arpg .ar-atk { position: absolute; right: 18px; bottom: 124px; width: 84px; height: 84px; border-radius: 50%; border: 2px solid #c0903a; background: radial-gradient(circle at 40% 35%, #b04a20, #4a1008); color: #fff; font-size: var(--fs-xl); touch-action: manipulation; }
  #arpg .ar-pick { position: absolute; right: 112px; bottom: 120px; width: 54px; height: 54px; border-radius: 50%; border: 2px solid #8a6a3a; background: rgba(20,14,8,.8); font-size: var(--fs-xl); color: #fff; }
  #arpg .ar-bottom { left: 6px; right: 6px; transform: none; bottom: 6px; justify-content: space-between; gap: 6px; }
  #arpg .ar-orb { width: 64px; height: 64px; flex: none; border-width: 2px; }
  #arpg .ar-orb span { font-size: var(--fs-xs); }
  #arpg .ar-mid { flex: 1; min-width: 0; }
  #arpg .ar-slots { overflow-x: auto; gap: 4px; padding: 4px; scrollbar-width: none; }
  #arpg .ar-slot { flex: none; width: 42px; height: 42px; }
  #arpg .ar-slot em { font-size: var(--fs-l); line-height: 42px; }
  #arpg .ar-mini { width: 120px; height: 68px; top: 56px; right: 8px; }
  #arpg .ar-zone small { display: none; }
  #arpg .ar-msgs { bottom: 260px; left: 8px; max-width: 78vw; }
  #arpg .ar-msgs p { font-size: var(--fs-s); }
  #arpg .ar-target, #arpg .ar-boss { top: 56px; min-width: 0; width: 56vw; left: 38%; }
}
