* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  background: #0b2a5b;
  background-image:
    repeating-conic-gradient(from 15deg at 30% 40%, rgba(255,255,255,.05) 0 12deg, transparent 12deg 31deg),
    repeating-conic-gradient(from 70deg at 75% 70%, rgba(255,210,63,.05) 0 9deg, transparent 9deg 27deg),
    linear-gradient(170deg, #0b2a5b 0%, #134f8c 55%, #1c6aa5 100%);
  background-attachment: fixed;
  user-select: none; -webkit-user-select: none;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }

/* ---------- mapa ---------- */
#mapa {
  height: 100%; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 12px 40px;
  background: linear-gradient(180deg, rgba(8,25,60,.55), rgba(8,25,60,.2) 30%, rgba(8,25,60,.35)), url(assets/mapa.webp?v=17) center top / cover fixed;
}
#trasa-wrap { position: relative; max-width: 420px; margin: 16px auto 0; }
#sciezka { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
#sciezka path { fill: none; stroke-linecap: round; }
#sciezka .cala { stroke: rgba(255,255,255,.55); stroke-width: 5; stroke-dasharray: 0.1 13; }
#sciezka .przebyta { stroke: #ffd23f; stroke-width: 7; stroke-dasharray: 0.1 13; filter: drop-shadow(0 0 4px #ff8c1a); }
.tytul { position: relative; text-align: center; padding: 22px 40px 8px; max-width: 560px; margin: 0 auto; }
.tytul h1 {
  margin: 0; font-size: 34px; letter-spacing: .5px;
  background: linear-gradient(180deg, #fff 0%, #ffd23f 60%, #ff8c1a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #7a1f3d);
}
.tytul p { margin: 6px 0 0; opacity: .8; font-size: 14px; line-height: 1.35; }
.tytul .dzwiek { position: absolute; right: 0; top: 22px; }
.tytul .muzyka { position: absolute; left: 0; top: 22px; }
.muzyka { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 18px; flex: none; }
.dzwiek { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 18px; }

#trasa { position: relative; list-style: none; margin: 0; padding: 0; }
#trasa li { display: flex; margin: 0 0 10px; }
#trasa li.z1 { padding-left: 22%; }
#trasa li.z2 { padding-left: 44%; }
#trasa li.z3 { padding-left: 22%; }
#trasa button {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 5px 14px 5px 5px; border-radius: 44px;
  background: rgba(8,20,50,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
#trasa .opis { display: flex; flex-direction: column; gap: 2px; }
#trasa .nr {
  position: relative; flex: none; width: 60px; height: 60px; border-radius: 50%;
  background: #333 center / cover; border: 3px solid #ff5b8a;
  box-shadow: 0 3px 0 #7a0f3a, 0 0 0 2px rgba(255,255,255,.5);
}
#trasa .nr b {
  position: absolute; right: -6px; bottom: -6px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 12px;
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
  background: linear-gradient(180deg, #ff5b8a, #c2185b); box-shadow: 0 2px 0 #7a0f3a;
}
#trasa .zrobione .nr { border-color: #ffd23f; box-shadow: 0 3px 0 #a87400, 0 0 0 2px rgba(255,255,255,.5); }
#trasa .zrobione .nr b { background: linear-gradient(180deg, #ffe680, #f0a800); color: #5a3b00; box-shadow: 0 2px 0 #7a5400; }
#trasa .obecny .nr { animation: puls 1.2s ease-in-out infinite; box-shadow: 0 3px 0 #7a0f3a, 0 0 18px 4px rgba(255,210,63,.8); }
#trasa .zamkniety { opacity: .6; }
#trasa .zamkniety .nr { filter: grayscale(1) brightness(.6); border-color: #8090a8; }
#trasa .miejsce { font-weight: 600; font-size: 15px; line-height: 1.15; }
#trasa .gw { font-size: 14px; color: #ffd23f; letter-spacing: 1px; }
#trasa .gw .off { color: rgba(255,255,255,.25); }
@keyframes puls { 50% { transform: scale(1.1); } }
#od-nowa { display: block; margin: 24px auto 0; opacity: .5; font-size: 13px; text-decoration: underline; }

/* ---------- gra ---------- */
#gra {
  height: 100%; display: flex; flex-direction: column; align-items: center; padding: env(safe-area-inset-top) 8px 0;
  background-color: #0b2a5b; background-size: cover; background-position: center;
}
#pasek { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 8px; padding: 8px 0 4px; }
#wroc { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 20px; flex: none; }
#ruchy {
  flex: none; width: 58px; height: 58px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #ff5b8a, #c2185b); box-shadow: 0 3px 0 #7a0f3a;
}
#ruchy b { font-size: 26px; line-height: 1; }
#ruchy small { font-size: 10px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }
#ruchy.malo { animation: puls .8s ease-in-out infinite; }
#cele { flex: 1; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.cel {
  display: flex; align-items: center; gap: 4px; padding: 3px 10px 3px 3px; border-radius: 22px;
  background: rgba(8,20,50,.65); box-shadow: 0 2px 8px rgba(0,0,0,.3); font-weight: 700; font-size: 17px; min-height: 40px;
}
.cel img { width: 36px; height: 36px; }
.cel .ikona { width: 32px; height: 32px; }
.cel .ikona { display: grid; place-items: center; font-size: 20px; }
.cel.gotowe { background: rgba(60,196,90,.45); }
.cel.blysk { animation: blysk .35s ease-out; }
@keyframes blysk { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
#nazwa { font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.8); margin-bottom: 2px; }
.ikona.lukier { width: 26px; height: 26px; margin: 3px; border-radius: 8px; background: linear-gradient(180deg, #ffb0d8, #ff5aa8); box-shadow: inset 0 2px 0 rgba(255,255,255,.5); }

#plansza-wrap { position: relative; flex: 1; width: calc(100% + 16px); margin: 0 -8px; min-height: 0; }
#plansza { position: absolute; inset: 0; display: block; touch-action: none; }
#porada {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  width: min(92%, 420px); padding: 10px 14px; border-radius: 14px;
  background: rgba(255,255,255,.95); color: #1d2b4f; font-size: 15px; line-height: 1.35; text-align: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.35); cursor: pointer; /* stuknięcie zamyka */
}

#wynik { position: relative; z-index: 1; width: 100%; max-width: 420px; padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; }
#punkty { font-weight: 800; font-size: 20px; min-width: 76px; text-align: right; text-shadow: 0 2px 4px rgba(0,0,0,.7); }
#pasek-gwiazd { position: relative; flex: 1; height: 14px; border-radius: 7px; background: rgba(0,0,0,.35); }
#pasek-gwiazd i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; background: linear-gradient(90deg, #ffd23f, #ff8c1a); transition: width .3s; }
#pasek-gwiazd span { position: absolute; top: 50%; transform: translate(-50%, -50%); font-size: 22px; color: rgba(255,255,255,.3); text-shadow: 0 1px 2px rgba(0,0,0,.5); transition: color .2s, transform .2s; }
#pasek-gwiazd span[data-g="1"] { left: 0; }
#pasek-gwiazd span.on { color: #ffd23f; transform: translate(-50%, -50%) scale(1.15); }

/* ---------- okno ---------- */
#okno { position: fixed; inset: 0; background: rgba(5,15,40,.6); display: grid; place-items: center; z-index: 10; padding: 16px; }
#okno .box {
  width: min(100%, 360px); padding: 22px 20px 18px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, #fff, #fde8f0); color: #1d2b4f; box-shadow: 0 12px 40px rgba(0,0,0,.45);
  animation: wejscie .3s cubic-bezier(.2,1.4,.4,1);
}
@keyframes wejscie { from { transform: scale(.7); opacity: 0; } }
#okno h2 { margin: 0 0 6px; font-size: 24px; color: #c2185b; }
#okno p { margin: 6px 0; font-size: 15px; line-height: 1.4; }
#okno .gwiazdy { font-size: 46px; letter-spacing: 4px; color: #ffd23f; text-shadow: 0 2px 0 #c98a00; margin: 4px 0; }
#okno .gwiazdy .off { color: #d8d8e0; text-shadow: none; }
#okno .przyciski { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
#okno .przyciski button { padding: 12px 20px; border-radius: 26px; font-weight: 700; font-size: 16px; }
#okno .glowny { background: linear-gradient(180deg, #3cc45a, #23913d); color: #fff; box-shadow: 0 3px 0 #145a24; }
#okno .drugi { background: #e6e9f2; color: #1d2b4f; }

#okno .okladka { width: 96px; height: 96px; margin: 4px auto 6px; border-radius: 50%; background: center / cover; border: 4px solid #ffd23f; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
#okno .gwiazdy .wpada { display: inline-block; animation: wpada .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes wpada { from { transform: scale(3) rotate(-90deg); opacity: 0; } }
#okno .mala { font-size: 13px; opacity: .75; }
#okno .braki { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
#okno .brak { display: flex; align-items: center; gap: 4px; padding: 4px 12px 4px 4px; border-radius: 20px; background: #eef0f7; font-weight: 800; font-size: 18px; }
#okno .brak img { width: 40px; height: 40px; }
#pasek, #nazwa { position: relative; z-index: 1; }

#notes { margin-top: 10px; padding: 9px 16px; border-radius: 22px; font-weight: 700; font-size: 14px;
  background: linear-gradient(180deg, #ffe680, #f0a800); color: #4a2f00; box-shadow: 0 3px 0 #8a5a00; }
#okno .sekret { margin: 10px 0 4px; padding: 10px 12px; border-radius: 14px; text-align: left;
  background: linear-gradient(180deg, #fff7d6, #ffe9a8); border: 2px dashed #d99a00; animation: wejscie .5s .9s both cubic-bezier(.2,1.4,.4,1); }
#okno .sekret b { color: #8a5a00; }
#okno .sekret p { margin: 4px 0 0; font-size: 14px; }
#okno .box:has(.notes) { max-height: 86vh; display: flex; flex-direction: column; }
#okno .notes { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; text-align: left; }
#okno .notes li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0d6e0; }
#okno .notes .mini { flex: none; width: 46px; height: 46px; border-radius: 50%; background: #ccd center / cover; display: grid; place-items: center; }
#okno .notes p { margin: 2px 0 0; font-size: 13px; line-height: 1.35; }
#okno .notes .zamkniety { opacity: .5; }

#info { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 20px; font-weight: 700; flex: none; }
#okno .ikony { list-style: none; margin: 6px 0 0; padding: 0; text-align: left; max-height: 60vh; overflow-y: auto; }
#okno .ikony li { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid #f0d6e0; font-size: 14px; line-height: 1.3; }
#okno .ikony img { width: 48px; height: 48px; flex: none; }

#wydarzenie { position: absolute; left: 50%; top: 8px; transform: translate(-50%, -140%); z-index: 3; width: min(94%, 440px);
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 18px;
  background: linear-gradient(180deg, #fff6d6, #ffd98a); color: #3a2200; box-shadow: 0 8px 26px rgba(0,0,0,.45);
  transition: transform .35s cubic-bezier(.2,1.4,.4,1); pointer-events: none; }
#wydarzenie.widac { transform: translate(-50%, 0); }
#wydarzenie.zle { background: linear-gradient(180deg, #e8ecf6, #b9c3dc); color: #1d2b4f; }
#wydarzenie img { width: 64px; height: 64px; flex: none; filter: drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
#wydarzenie b { display: block; font-size: 19px; }
#wydarzenie span { font-size: 14px; line-height: 1.3; }

#okno .sekret-obraz { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin: 0 0 8px; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
#okno .notes li.z-obrazem { flex-direction: column; }
#okno .box:has(.sekret) { max-height: 94vh; overflow-y: auto; }

#przewodnik { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; padding: 0;
  background: radial-gradient(circle at 40% 30%, #fff6d6, #ffd23f); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.45), 0 0 14px rgba(255,210,63,.7);
  animation: puls 1.6s ease-in-out infinite; margin-top: -16px; }
#przewodnik img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
#przewodnik span { position: absolute; right: -6px; top: -6px; background: #c2185b; color: #fff; font-size: 11px; font-weight: 800; border-radius: 10px; padding: 2px 6px; }
#przewodnik.aktywny { box-shadow: 0 0 0 4px #fff, 0 0 26px 8px #ffd23f; animation: puls .6s ease-in-out infinite; }
#przewodnik.uzyta { filter: grayscale(.85) brightness(.8); animation: none; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
#przewodnik.uzyta span { background: #555; }
#dymek { position: absolute; left: 50%; bottom: 8px; transform: translate(-50%, 130%); z-index: 4; width: min(94%, 460px);
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px 10px 10px; border-radius: 18px;
  background: #fff; color: #1d2b4f; box-shadow: 0 10px 28px rgba(0,0,0,.45); transition: transform .35s cubic-bezier(.2,1.4,.4,1); cursor: pointer; }
#dymek.widac { transform: translate(-50%, 0); }
#dymek img { width: 74px; height: 74px; flex: none; object-fit: contain; }
#dymek b { display: block; font-size: 16px; color: #c2185b; }
#dymek i { display: block; font-style: normal; font-weight: 700; font-size: 13px; color: #8a5a00; margin: 1px 0 2px; }
#dymek span { display: block; font-size: 14.5px; line-height: 1.35; }
#dymek em { display: block; font-size: 11px; opacity: .5; margin-top: 4px; font-style: normal; }
#okno .sekret .od { display: block; font-size: 12px; opacity: .7; margin-top: 1px; }

#dymek.z-obrazem { align-items: flex-start; }
#dymek.z-obrazem > img { width: 56px; height: 56px; }
#dymek .ilustracja { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 6px; max-height: 34vh; }

#seria { display: inline-block; margin-top: 10px; padding: 8px 12px; border-radius: 20px; background: rgba(255,120,40,.85); font-weight: 800; font-size: 14px; }
#okno .seria { margin: 8px 0 0; padding: 6px 10px; border-radius: 10px; background: #fff1e0; color: #8a3a00; font-weight: 700; font-size: 14px; }
#okno .reklama { display: block; margin-top: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; text-decoration: none;
  background: linear-gradient(180deg, #ffefd6, #ffd9a3); color: #4a2800; border: 1px solid #f0b060; }
#okno .reklama.niebieska { background: linear-gradient(180deg, #e3efff, #c4dcff); color: #0b2a5b; border-color: #8ab4f0; }
#okno .reklama b { display: block; font-size: 15px; }
#okno .reklama span { display: block; font-size: 13px; line-height: 1.35; margin-top: 2px; }
#okno .box:has(.pieczatki) { max-height: 94vh; overflow-y: auto; }
#okno .naklejki { display: flex; gap: 6px; justify-content: center; margin: 8px 0; flex-wrap: wrap; }
#okno .naklejka { width: 62px; padding: 6px 2px; border-radius: 12px; background: #eceff6; opacity: .45; filter: grayscale(1); }
#okno .naklejka.jest { opacity: 1; filter: none; background: linear-gradient(180deg, #fff6c8, #ffd23f); transform: rotate(-4deg); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
#okno .naklejka span { display: block; font-size: 24px; }
#okno .naklejka small { display: block; font-size: 10px; line-height: 1.1; }
#okno .pieczatki { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0; }
#okno .pieczatka { position: relative; aspect-ratio: 1; border-radius: 50%; background: #ccd center / cover; filter: grayscale(1) brightness(.75); opacity: .5; border: 3px dashed #99a; }
#okno .pieczatka.jest { filter: none; opacity: 1; border: 3px solid #c2185b; transform: rotate(-8deg); box-shadow: 0 0 0 3px rgba(194,24,91,.25); }
#okno .pieczatka b { position: absolute; right: -4px; bottom: -4px; background: #c2185b; color: #fff; font-size: 11px; border-radius: 9px; padding: 1px 5px; }
#okno .pieczatka.blysk { animation: blysk .35s; }

.historie, .sekrety { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 18px; flex: none; }
#pasek { gap: 5px; }
#pasek .historie, #pasek .sekrety, #pasek .muzyka, #pasek .dzwiek, #pasek #info, #pasek #wroc { width: 36px; height: 36px; font-size: 16px; }
.tytul .ustawienia { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.tytul .dzwiek, .tytul .muzyka { position: static; }
#trudnosc { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 3px 14px 3px 3px; border-radius: 24px; background: rgba(255,255,255,.92); color: #1d2b4f; font-weight: 800; font-size: 14px; }
#trudnosc img { width: 36px; height: 36px; }
#toast { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 20; padding: 8px 16px; border-radius: 20px; background: rgba(0,0,0,.8); color: #fff; font-size: 14px; font-weight: 700; }
#okno .trudnosci { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#okno .trudnosc { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: #eef0f7; text-align: left; border: 3px solid transparent; }
#okno .trudnosc.wybrana { border-color: #3cc45a; background: #e6f8ea; }
#okno .trudnosc img { width: 62px; height: 62px; flex: none; }
#okno .trudnosc b { display: block; font-size: 16px; color: #c2185b; }
#okno .trudnosc small { display: block; font-size: 13px; line-height: 1.3; color: #1d2b4f; }

#pasek { position: relative; }
#ustaw { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 19px; flex: none; }
#ustawienia-gra { position: absolute; right: 0; top: 52px; z-index: 6; display: flex; flex-direction: column; gap: 6px; padding: 10px;
  border-radius: 16px; background: rgba(8,20,50,.95); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
#ustawienia-gra button { width: auto; height: auto; border-radius: 12px; padding: 10px 14px; font-size: 15px; text-align: left; background: rgba(255,255,255,.1); }
.tytul .ustawienia button { background: rgba(8,20,50,.65); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
#pasek #ustawienia-gra { min-width: 250px; }
#pasek #ustawienia-gra button { width: auto; height: auto; white-space: nowrap; font-size: 15px; border-radius: 12px; padding: 10px 14px; }
#pasek { z-index: 7; }

#narzedzia { position: relative; z-index: 2; display: flex; gap: 8px; justify-content: center; padding: 2px 0 0; }
#narzedzia button { position: relative; width: 46px; height: 40px; border-radius: 14px; font-size: 22px; background: rgba(8,20,50,.7); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
#narzedzia button b { position: absolute; right: -5px; top: -6px; min-width: 18px; padding: 0 4px; border-radius: 9px; background: #3cc45a; color: #fff; font-size: 11px; line-height: 18px; }
#narzedzia button.puste { opacity: .45; }
#narzedzia button.puste b { background: #777; }
#narzedzia button.aktywne { background: #ffd23f; box-shadow: 0 0 0 3px #fff, 0 0 18px #ffd23f; }

#narzedzia button { width: 52px; height: 48px; padding: 2px; }
#narzedzia button img { width: 100%; height: 100%; object-fit: contain; }
#porada small { display: block; opacity: .6; font-size: 12px; margin-top: 2px; }
#okno .seria.nagroda { display: flex; align-items: center; gap: 8px; text-align: left; }
#okno .seria.nagroda img { width: 46px; height: 46px; flex: none; }

.ui-ikona { width: 100%; height: 100%; object-fit: contain; display: block; }
#wroc, #info, #ustaw, .historie, .sekrety, .muzyka, .dzwiek { padding: 3px; }
.wyl { position: relative; }
.wyl::after { content: ''; position: absolute; left: 18%; right: 18%; top: 50%; height: 3px; background: #e8384f; transform: rotate(-35deg); border-radius: 2px; box-shadow: 0 0 0 1px #fff; }
#ustawienia-gra button { display: flex; align-items: center; gap: 10px; }
#ustawienia-gra button .ui-ikona { width: 30px; height: 30px; flex: none; }
#ustawienia-gra button.wyl::after { left: 14px; right: auto; width: 30px; }
#notes { display: inline-flex; align-items: center; gap: 6px; }
#notes .ui-ikona { width: 28px; height: 28px; }
#seria { display: inline-flex; align-items: center; gap: 4px; }
#seria .ui-ikona { width: 22px; height: 22px; }
.cel .ikona .ui-ikona { width: 30px; height: 30px; }

.tytul .ustawienia button { position: relative; }
#pasek #ustaw, #pasek #info, #pasek #wroc { position: relative; }
.tytul .ustawienia button { top: auto; left: auto; right: auto; }

#opowiesc { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 14px;
  background: radial-gradient(circle at 50% 30%, rgba(30,70,130,.95), rgba(5,15,40,.97)); }
#opowiesc .karta { width: min(100%, 420px); text-align: center; animation: wejscie .4s cubic-bezier(.2,1.4,.4,1); }
#opowiesc h2 { margin: 0 0 10px; font-size: 26px; color: #ffd23f; text-shadow: 0 2px 0 #7a1f3d; }
#opowiesc img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.5); border: 3px solid #ffd23f; }
#opowiesc p { font-size: 17px; line-height: 1.5; margin: 14px 4px; }
#opowiesc .kropki { display: flex; gap: 6px; justify-content: center; margin: 4px 0 12px; }
#opowiesc .kropki i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.3); }
#opowiesc .kropki i.on { background: #ffd23f; }
#opowiesc .przyciski { display: flex; gap: 10px; justify-content: center; }
#opowiesc .przyciski button { padding: 12px 22px; border-radius: 26px; font-weight: 700; font-size: 16px; }
#opowiesc .glowny { background: linear-gradient(180deg, #3cc45a, #23913d); color: #fff; box-shadow: 0 3px 0 #145a24; }
#opowiesc .drugi { background: rgba(255,255,255,.15); color: #fff; }
#wstep { display: block; margin: 8px auto 0; background: none; color: #fff; text-decoration: underline; opacity: .85; font-size: 14px; }
#okno .trudnosc em { display: block; font-style: normal; font-weight: 700; font-size: 12px; color: #8a5a00; }
#okno .trudnosc q { display: block; font-size: 13px; line-height: 1.35; font-style: italic; margin: 3px 0; quotes: '„' '”'; }
#okno .box:has(.trudnosci) { max-height: 94vh; overflow-y: auto; }

.ikona.krata-ik { width: 28px; height: 28px; margin: 2px; border-radius: 6px; background:
  repeating-linear-gradient(90deg, #2b3140 0 4px, transparent 4px 9px), #9aa4b8; box-shadow: inset 0 0 0 3px #2b3140; }

.nowe-tytul { text-align: center; margin: 26px 0 8px; color: #ffd23f; text-shadow: 0 2px 4px rgba(0,0,0,.6); }
#nowe-etapy { max-width: 420px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.etap-karta { padding: 10px; border-radius: 18px; background: rgba(8,20,50,.72); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.etap-karta > b { display: block; margin: 0 0 6px 4px; color: #ffd23f; }
.etap-karta button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 4px; border-radius: 40px; }
.etap-karta .nr { flex: none; width: 54px; height: 54px; border-radius: 50%; background: #333 center / cover; border: 3px solid #ffd23f; }
.etap-karta .miejsce { display: block; font-weight: 700; }
.etap-karta .gw { display: block; font-size: 13px; color: #ffd23f; }
#opowiesc .karta { position: relative; }
#opowiesc img.narrator { position: absolute; left: -6px; top: 34px; width: 92px; height: 92px; border: none; box-shadow: none; aspect-ratio: auto; object-fit: contain; z-index: 2; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }

/* --- wspólna ścieżka etapów i mgła --- */
#trasa li { position: relative; }
#trasa li.etap-naglowek { justify-content: center; margin: 26px 0 14px; }
#trasa .etap-naglowek div { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 40px;
  background: linear-gradient(180deg, rgba(20,30,70,.92), rgba(8,15,45,.92)); border: 2px solid #ffd23f; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
#trasa .etap-naglowek img { width: 46px; height: 46px; border-radius: 50%; background: #fff3; object-fit: contain; }
#trasa .etap-naglowek b { color: #ffd23f; font-size: 17px; }
#trasa li.mgla-blok { display: block; height: 260px; margin-top: 6px; text-align: center; }
#trasa .mgla-blok span { position: relative; z-index: 2; display: inline-block; margin-top: 110px; padding: 8px 14px; border-radius: 14px;
  background: rgba(255,255,255,.75); color: #1d2b4f; font-size: 14px; font-weight: 600; max-width: 80%; }
.kleby, .mgla-anim { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.kleby i, .mgla-anim i { position: absolute; width: 70%; height: 120px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(235,242,255,.75) 55%, rgba(235,242,255,0));
  filter: blur(6px); animation: dryf 14s ease-in-out infinite alternate; }
.kleby i:nth-child(1) { left: -10%; top: 0; } .kleby i:nth-child(2) { left: 35%; top: 30px; animation-duration: 18s; }
.kleby i:nth-child(3) { left: 5%; top: 90px; animation-duration: 16s; } .kleby i:nth-child(4) { left: 40%; top: 130px; animation-duration: 20s; }
.kleby i:nth-child(5) { left: 10%; top: 170px; animation-duration: 15s; }
@keyframes dryf { from { transform: translateX(-12%) scale(1); } to { transform: translateX(12%) scale(1.12); } }
/* odsłanianie: kłęby rozchodzą się na boki, poziom wyłania się spod mgły */
#trasa li.odslona > * { animation: wylania 2.2s ease-out both; }
#trasa li.odslona::before, #trasa li.odslona::after { content: ''; position: absolute; top: -30px; width: 75%; height: calc(100% + 60px); z-index: 3; pointer-events: none;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.98), rgba(235,242,255,.8) 55%, rgba(235,242,255,0)); filter: blur(5px); }
#trasa li.odslona::before { left: -5%; animation: rozejdzL 2.4s ease-in both; }
#trasa li.odslona::after { right: -5%; animation: rozejdzP 2.4s ease-in both; }
@keyframes wylania { 0%, 30% { opacity: 0; filter: blur(8px); transform: scale(.9); } 100% { opacity: 1; filter: none; transform: none; } }
@keyframes rozejdzL { 0%, 20% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(-70%) scale(1.5); } }
@keyframes rozejdzP { 0%, 20% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateX(70%) scale(1.5); } }
/* --- animacja między etapami --- */
#animacja-etapu { position: fixed; inset: 0; z-index: 50; overflow: hidden; background: #000; color: #fff; cursor: pointer; transition: opacity .7s; }
#animacja-etapu.znika { opacity: 0; }
#animacja-etapu .niebo { position: absolute; inset: 0; background: linear-gradient(180deg, #7ec8ff, #ffd9a0); transition: opacity 2.4s; }
#animacja-etapu.zmierzch .niebo { opacity: 0; }
#animacja-etapu .gwiazdy i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0; animation: mrug 2.4s ease-in-out infinite; }
#animacja-etapu.zmierzch .gwiazdy i { opacity: 1; }
#animacja-etapu .gwiazdy i:nth-child(1) { left: 0%; top: 0%; animation-delay: 0.00s; }
#animacja-etapu .gwiazdy i:nth-child(2) { left: 37%; top: 53%; animation-delay: 0.35s; }
#animacja-etapu .gwiazdy i:nth-child(3) { left: 74%; top: 51%; animation-delay: 0.70s; }
#animacja-etapu .gwiazdy i:nth-child(4) { left: 11%; top: 49%; animation-delay: 1.05s; }
#animacja-etapu .gwiazdy i:nth-child(5) { left: 48%; top: 47%; animation-delay: 1.40s; }
#animacja-etapu .gwiazdy i:nth-child(6) { left: 85%; top: 45%; animation-delay: 1.75s; }
#animacja-etapu .gwiazdy i:nth-child(7) { left: 22%; top: 43%; animation-delay: 2.10s; }
#animacja-etapu .gwiazdy i:nth-child(8) { left: 59%; top: 41%; animation-delay: 0.00s; }
#animacja-etapu .gwiazdy i:nth-child(9) { left: 96%; top: 39%; animation-delay: 0.35s; }
#animacja-etapu .gwiazdy i:nth-child(10) { left: 33%; top: 37%; animation-delay: 0.70s; }
#animacja-etapu .gwiazdy i:nth-child(11) { left: 70%; top: 35%; animation-delay: 1.05s; }
#animacja-etapu .gwiazdy i:nth-child(12) { left: 7%; top: 33%; animation-delay: 1.40s; }
#animacja-etapu .gwiazdy i:nth-child(13) { left: 44%; top: 31%; animation-delay: 1.75s; }
#animacja-etapu .gwiazdy i:nth-child(14) { left: 81%; top: 29%; animation-delay: 2.10s; }
#animacja-etapu .gwiazdy i:nth-child(15) { left: 18%; top: 27%; animation-delay: 0.00s; }
#animacja-etapu .gwiazdy i:nth-child(16) { left: 55%; top: 25%; animation-delay: 0.35s; }
#animacja-etapu .gwiazdy i:nth-child(17) { left: 92%; top: 23%; animation-delay: 0.70s; }
#animacja-etapu .gwiazdy i:nth-child(18) { left: 29%; top: 21%; animation-delay: 1.05s; }
#animacja-etapu .gwiazdy i:nth-child(19) { left: 66%; top: 19%; animation-delay: 1.40s; }
#animacja-etapu .gwiazdy i:nth-child(20) { left: 3%; top: 17%; animation-delay: 1.75s; }
#animacja-etapu .gwiazdy i:nth-child(21) { left: 40%; top: 15%; animation-delay: 2.10s; }
#animacja-etapu .gwiazdy i:nth-child(22) { left: 77%; top: 13%; animation-delay: 0.00s; }
#animacja-etapu .gwiazdy i:nth-child(23) { left: 14%; top: 11%; animation-delay: 0.35s; }
#animacja-etapu .gwiazdy i:nth-child(24) { left: 51%; top: 9%; animation-delay: 0.70s; }
#animacja-etapu .gwiazdy i:nth-child(25) { left: 88%; top: 7%; animation-delay: 1.05s; }
#animacja-etapu .gwiazdy i:nth-child(26) { left: 25%; top: 5%; animation-delay: 1.40s; }
#animacja-etapu .gwiazdy i:nth-child(27) { left: 62%; top: 3%; animation-delay: 1.75s; }
#animacja-etapu .gwiazdy i:nth-child(28) { left: 99%; top: 1%; animation-delay: 2.10s; }

@keyframes mrug { 0%, 100% { transform: scale(.6); opacity: .3; } 50% { transform: scale(1.3); opacity: 1; } }
#animacja-etapu .kadr { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transform: scale(1.12);
  transition: opacity 1.4s ease, transform 9s linear; }
#animacja-etapu .kadr.widac { opacity: .95; transform: scale(1) translateX(-2%); }
#animacja-etapu .mgla-anim i { top: 60%; height: 200px; width: 90%; opacity: .55; }
#animacja-etapu .mgla-anim i:nth-child(1) { left: -30%; } #animacja-etapu .mgla-anim i:nth-child(2) { left: 30%; top: 70%; animation-duration: 18s; }
#animacja-etapu .mgla-anim i:nth-child(3) { left: -10%; top: 80%; animation-duration: 22s; } #animacja-etapu .mgla-anim i:nth-child(4) { left: 40%; top: 55%; animation-duration: 16s; }
#animacja-etapu .tytul-etapu { position: absolute; left: 0; right: 0; top: 14%; text-align: center; opacity: 0; transform: translateY(14px);
  transition: opacity 1.2s .6s, transform 1.2s .6s; text-shadow: 0 3px 10px rgba(0,0,0,.7); }
#animacja-etapu.zmierzch .tytul-etapu { opacity: 1; transform: none; }
#animacja-etapu .tytul-etapu small { display: block; font-size: 16px; letter-spacing: 3px; text-transform: uppercase; color: #ffd23f; }
#animacja-etapu .tytul-etapu b { font-size: 34px; }
#animacja-etapu .napis { position: absolute; left: 50%; bottom: 6%; transform: translateX(-50%); width: min(92%, 560px); display: flex; gap: 12px; align-items: flex-end; }
#animacja-etapu .napis img { width: 92px; height: 92px; object-fit: contain; flex: none; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
#animacja-etapu .napis p { margin: 0; padding: 12px 16px; border-radius: 16px; background: rgba(8,15,45,.85); border: 2px solid #ffd23f;
  font-size: 16px; line-height: 1.4; opacity: 0; transform: translateY(10px); transition: opacity .6s, transform .6s; }
#animacja-etapu .napis p.widac { opacity: 1; transform: none; }
#animacja-etapu .napis p b { color: #ffd23f; }
#animacja-etapu .pomin { position: absolute; top: 14px; right: 14px; padding: 8px 14px; border-radius: 20px; background: rgba(255,255,255,.2); color: #fff; font-size: 14px; }

.strona-etapu { margin: 16px 0 6px; padding-top: 12px; border-top: 2px dashed rgba(122,15,58,.25); color: #7a0f3a; font-size: 17px; }

/* kolekcje etapów (kuferek sereno) */
#kolekcje { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#kolekcje button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 30px; margin-top: 8px;
  background: linear-gradient(180deg, #6b4a2b, #3e2a16); color: #ffe7b0; font-weight: 700; box-shadow: 0 3px 0 #2a1a0c; }
#kolekcje img { width: 34px; height: 34px; object-fit: contain; }
.kuferek-obraz { display: block; width: 120px; margin: 4px auto; }
.pamiatki { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 10px 0; }
.pamiatka { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; background: rgba(122,15,58,.07); color: #1d2b4f; }
.pamiatka img { width: 64px; height: 64px; object-fit: contain; }
.pamiatka span { width: 64px; height: 64px; line-height: 64px; font-size: 30px; opacity: .35; }
.pamiatka small { font-size: 11px; line-height: 1.2; text-align: center; }
.pamiatka:not(.jest) small { opacity: .5; }
.pamiatka-duza { object-fit: contain !important; max-height: 200px; }
.nowa-pamiatka { display: flex; align-items: center; gap: 10px; margin: 10px auto; padding: 8px 12px; border-radius: 14px; background: #fff3d6; color: #5a3b00; max-width: 340px; text-align: left; }
.nowa-pamiatka img { width: 56px; height: 56px; object-fit: contain; }
.nowa-pamiatka b { display: block; color: #7a0f3a; }

/* samouczek: wyróżniony element */
.samouczek-wyroznij { outline: 3px solid #ffd23f; outline-offset: 4px; border-radius: 18px; animation: samPuls 1s ease-in-out infinite; }
@keyframes samPuls { 50% { outline-color: #fff; box-shadow: 0 0 22px 6px rgba(255,210,63,.7); } }

/* stragan (sortowanie) */
#targ { height: 100%; display: flex; flex-direction: column; align-items: center; padding: env(safe-area-inset-top) 8px 0; background-color: #0b2a5b; background-size: cover; background-position: center; }
#targ-pasek { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 10px; padding: 8px 0 4px; }
#targ-wroc { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 20px; flex: none; }
#targ-ruchy, #targ-cel { background: rgba(8,20,50,.72); border-radius: 14px; padding: 4px 12px; display: flex; flex-direction: column; align-items: center; min-width: 64px; }
#targ-ruchy b, #targ-cel b { font-size: 24px; line-height: 1; }
#targ-ruchy small, #targ-cel small { font-size: 10px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }
#targ-cel { flex-direction: row; gap: 6px; align-items: center; }
#targ-cel span { font-size: 20px; }
#targ-ruchy.malo { animation: puls .8s ease-in-out infinite; }
#targ-nazwa { font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.8); margin: 2px 0 4px; }
#targ-porada { max-width: 520px; margin: 0 8px 6px; background: rgba(255,255,255,.94); color: #222; border-radius: 12px; padding: 8px 12px; font-size: 13px; line-height: 1.35; cursor: pointer; }
#polki { flex: 1; width: 100%; max-width: 560px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 12px; align-content: center; padding: 4px 6px 10px; touch-action: none; user-select: none; -webkit-user-select: none; }
#polki.trzy { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.polka { position: relative; background: linear-gradient(180deg, #8a5a32, #5e3a1d); border-radius: 12px; padding: 6px 6px 8px; box-shadow: inset 0 -5px 0 rgba(0,0,0,.25), 0 3px 8px rgba(0,0,0,.35); }
.polka .tyl { display: flex; justify-content: space-around; height: 18px; margin-bottom: 2px; opacity: .45; filter: saturate(.6); }
.polka .tyl img, .polka .tyl i { width: 18px; height: 18px; }
.polka .przod { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.polka .ile { position: absolute; top: 3px; right: 7px; font-size: 10px; font-weight: 700; color: #ffe9b0; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.slot { aspect-ratio: 1; border-radius: 10px; background: rgba(0,0,0,.28); border: 2px solid transparent; padding: 2px; display: grid; place-items: center; }
.slot img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.slot.wybrany { border-color: #ffd23f; background: rgba(255,210,63,.25); transform: translateY(-3px); }
.slot.cel { border-color: rgba(255,255,255,.5); border-style: dashed; }
.polka.zbita .slot img { animation: zbicie .45s ease-in forwards; }
.polka.zbita { box-shadow: 0 0 18px 6px rgba(255,210,63,.75); }
.polka.wysun .przod img { animation: wysun .35s ease-out; }
@keyframes zbicie { 0% { transform: scale(1); } 40% { transform: scale(1.3); filter: brightness(1.6); } 100% { transform: scale(0); opacity: 0; } }
@keyframes wysun { 0% { transform: translateY(-14px) scale(.6); opacity: .3; } 100% { transform: none; opacity: 1; } }
#targ-plywak { position: fixed; width: 64px; height: 64px; pointer-events: none; z-index: 20; transform: translate(-50%, -60%) scale(1.15); filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
#targ-stopka { width: 100%; max-width: 560px; padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
#targ-gwiazdy { text-align: center; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
#targ-gwiazdy b { color: #ffd23f; }
#trasa button.bonus .nr b { font-size: 16px; }
#trasa button.bonus .miejsce::after { content: ' · bonus'; font-size: 11px; opacity: .75; }

/* kiosk Pau (łączenie przedmiotów) */
#kiosk-btn { background: linear-gradient(180deg, #2f8f4e, #1d6a36); color: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; box-shadow: 0 2px 0 #124a24; }
#kiosk { height: 100%; display: flex; flex-direction: column; align-items: center; padding: env(safe-area-inset-top) 8px 0; background: radial-gradient(circle at 50% 0%, #2f6d4a, #0b2a5b 70%); }
#kiosk-pasek { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 10px; padding: 8px 0 4px; }
#kiosk-wroc { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 20px; flex: none; }
#kiosk-tytul { flex: 1; display: flex; flex-direction: column; }
#kiosk-tytul b { font-size: 18px; color: #ffd23f; }
#kiosk-tytul small { font-size: 12px; opacity: .85; }
#kiosk-paczki { background: rgba(8,20,50,.72); border-radius: 14px; padding: 4px 12px; display: flex; gap: 6px; align-items: center; }
#kiosk-paczki b { font-size: 22px; }
#kiosk-paczki small { font-size: 10px; text-transform: uppercase; opacity: .85; }
#kiosk-gora { width: 100%; max-width: 560px; display: flex; gap: 10px; align-items: stretch; margin: 4px 0 8px; }
#kiosk-obraz { width: 112px; height: 112px; border-radius: 14px; background: rgba(255,255,255,.1); flex: none; position: relative; display: grid; place-items: center; font-size: 56px; overflow: hidden; }
#kiosk-obraz img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#kiosk-zam { flex: 1; background: rgba(255,255,255,.95); color: #222; border-radius: 14px; padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
#kiosk-zam .rzeczy { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#kiosk-zam .rzecz { display: flex; align-items: center; gap: 4px; font-size: 12px; }
#kiosk-zam .rzecz .ik { width: 40px; height: 40px; border-radius: 10px; background: #f1e6c8; display: grid; place-items: center; font-size: 24px; }
#kiosk-zam .rzecz.jest .ik { background: #c9f0c9; }
#kiosk-zam button { align-self: flex-start; background: #2f8f4e; color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; }
#kiosk-zam button:disabled { background: #bbb; }
#kiosk-plansza { width: 100%; max-width: 420px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 8px; background: rgba(0,0,0,.25); border-radius: 16px; touch-action: none; user-select: none; -webkit-user-select: none; }
.kpole { aspect-ratio: 1; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; font-size: 30px; position: relative; }
.kpole img { width: 92%; height: 92%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.kpole .poz { position: absolute; right: 3px; bottom: 1px; font-size: 10px; font-weight: 700; color: #ffd23f; text-shadow: 0 1px 2px #000; }
.kpole.gen { background: radial-gradient(circle, #ffe08a, #e09b2d); box-shadow: 0 0 12px rgba(255,210,63,.6); animation: puls 1.6s ease-in-out infinite; }
.kpole.wybrane { outline: 3px solid #ffd23f; }
.kpole.nowe img, .kpole.nowe span.em { animation: wysun .4s ease-out; }
.kpole.polaczone { animation: zbicie-rev .45s ease-out; }
.kpole.do-oddania { box-shadow: inset 0 0 0 3px #7dffa0; }
@keyframes zbicie-rev { 0% { transform: scale(.6); } 60% { transform: scale(1.2); filter: brightness(1.5); } 100% { transform: scale(1); } }
#kiosk-info { max-width: 520px; font-size: 12px; opacity: .85; text-align: center; margin: 8px 10px calc(12px + env(safe-area-inset-bottom)); }
#kiosk-plywak { position: fixed; width: 58px; height: 58px; pointer-events: none; z-index: 20; transform: translate(-50%, -60%) scale(1.15); display: grid; place-items: center; font-size: 40px; }
#kiosk-plywak img { width: 100%; height: 100%; object-fit: contain; }

/* --- mapa Hiszpanii (wjazd do nowej wspólnoty, podgląd z nagłówka regionu) --- */
#opowiesc .karta.mapa-h { width: min(100%, 520px); }
#opowiesc .mapa-h svg.hiszpania { width: 100%; height: auto; display: block; border-radius: 18px; border: 3px solid #ffd23f; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.hiszpania .morze { fill: #2b5f8e; }
.hiszpania .ramka { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 3; stroke-dasharray: 10 8; }
.hiszpania .reg { fill: #e9dcbc; stroke: #6b5a3a; stroke-width: 2.5; stroke-linejoin: round; transition: fill .8s; }
.hiszpania .reg.byl { fill: #8fd18a; }
.hiszpania .reg.tu { fill: #ffd23f; }
.hiszpania .reg.wkrotce { fill: #b9b3a3; opacity: .55; }
.hiszpania .reg.wjazd { animation: wjazd 1.2s ease-out 2; }
@keyframes wjazd { 0% { fill: #fff6c9; } 100% { fill: #ffd23f; } }
.hiszpania .droga { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 6; stroke-dasharray: 4 14; stroke-linecap: round; }
.hiszpania .droga.przebyta, .hiszpania .droga.jazda { stroke: #ffb000; stroke-dasharray: none; stroke-width: 8; }
.hiszpania text { font: 700 34px system-ui, sans-serif; text-anchor: middle; fill: #1d2b4f; paint-order: stroke; stroke: #fff; stroke-width: 7px; stroke-linejoin: round; pointer-events: none; }
.hiszpania text.tu { font-size: 40px; fill: #7a1f3d; }
.hiszpania .pau circle { fill: #fff; stroke: #ffd23f; stroke-width: 6; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
#opowiesc .mapa-h .opis { min-height: 2.8em; }
#opowiesc .mapa-h .legenda { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; font-size: 13px; margin: -4px 0 12px; }
.mapa-h .legenda span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid #6b5a3a; }
.mapa-h .legenda .byl::before { background: #8fd18a; } .mapa-h .legenda .tu::before { background: #ffd23f; }
.mapa-h .legenda .przed::before { background: #e9dcbc; } .mapa-h .legenda .wkrotce::before { background: #b9b3a3; opacity: .55; }
#trasa li.region-naglowek { justify-content: center; margin: 14px 0 8px; }
#trasa .region-naglowek button { display: flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 30px; font-size: 15px; font-weight: 700;
  color: #1d2b4f; background: linear-gradient(180deg, #fff6d8, #f1dfae); border: 2px solid #c9a23f; box-shadow: 0 3px 10px rgba(0,0,0,.35); }

/* --- mapa w stylu sagi: pola z tłem etapu/regionu, przystanki na drodze z obrazka (mapy.js) --- */
#mapa { background: linear-gradient(180deg, #0b2a5b, #08163a); }
#trasa-wrap { max-width: 480px; }
#trasa li.pole { display: block; position: relative; margin: 0; aspect-ratio: 9 / 16; background: #6fae5a center / cover no-repeat; }
#trasa li.pole:first-child { border-radius: 22px 22px 0 0; overflow: hidden; }
#trasa li.pole.zapasowe:not([style*="background-image"]) { background: radial-gradient(circle at 30% 20%, #9ccf7a, #5f9b4c 60%, #4c8540); }
#trasa li.pole > svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#trasa li.pole .droga-tlo { fill: none; stroke: #b98c3c; stroke-width: 96; stroke-linecap: round; stroke-linejoin: round; }
#trasa li.pole .droga-wierzch { fill: none; stroke: #f3e2b5; stroke-width: 80; stroke-linecap: round; stroke-linejoin: round; }
#trasa li.pole .przebyta { fill: none; stroke: #ffb000; stroke-width: 14; stroke-dasharray: 2 26; stroke-linecap: round; filter: drop-shadow(0 0 6px #ff8c1a); }
#trasa .wezel { position: absolute; transform: translate(-50%, -32px); display: block; margin: 0; z-index: 2; }
#trasa .wezel button { flex-direction: column; gap: 2px; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 0; text-align: center; }
#trasa .wezel .nr { width: 64px; height: 64px; }
#trasa .wezel .opis { align-items: center; max-width: 118px; }
#trasa .wezel .miejsce { font-size: 13px; font-weight: 800; color: #fff; text-shadow: 0 1px 0 #000, 0 0 4px #000, 0 0 8px rgba(0,0,0,.8); }
#trasa .wezel .gw { font-size: 13px; text-shadow: 0 1px 2px #000; }
#trasa .wezel.lewo .opis, #trasa .wezel.prawo .opis { position: absolute; top: 14px; width: 118px; }
#trasa .wezel.lewo .opis { right: calc(100% + 6px); align-items: flex-end; text-align: right; }
#trasa .wezel.prawo .opis { left: calc(100% + 6px); align-items: flex-start; text-align: left; }
#trasa .wezel.lewo button, #trasa .wezel.prawo button { position: relative; }
#trasa .zamkniety { opacity: .85; }
#trasa .wstega { position: absolute; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; }
#trasa .wstega.etap { top: 1.2%; display: flex; align-items: center; gap: 8px; padding: 5px 16px 5px 5px; border-radius: 40px;
  background: linear-gradient(180deg, rgba(20,30,70,.94), rgba(8,15,45,.94)); border: 2px solid #ffd23f; box-shadow: 0 4px 14px rgba(0,0,0,.45); }
#trasa .wstega.etap img { width: 40px; height: 40px; border-radius: 50%; background: #fff3; object-fit: contain; }
#trasa .wstega.etap b { color: #ffd23f; font-size: 16px; }
#trasa .wstega.etap + .wstega.region { top: 7.2%; }
#trasa .wstega.region { top: 1.6%; display: flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 30px; font-size: 15px; font-weight: 800;
  color: #1d2b4f; background: linear-gradient(180deg, #fff6d8, #f1dfae); border: 2px solid #c9a23f; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
#trasa .mgla-pola { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; text-align: center;
  background: linear-gradient(180deg, rgba(235,242,255,0), rgba(235,242,255,.9) 18%, rgba(235,242,255,.97)); }
#trasa li.pole.zamglone { aspect-ratio: 9 / 7; overflow: hidden; text-align: center; background: none; }
#trasa li.pole.zamglone::before { content: ''; position: absolute; inset: -20px; background: var(--tlo) center top / cover; filter: blur(10px) brightness(1.15); opacity: .7; }
#trasa li.pole.zamglone::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(235,242,255,.2), rgba(235,242,255,.95) 45%); }
#trasa .mgla-napis { position: relative; z-index: 5; display: inline-block; margin-top: 90px; padding: 8px 14px; border-radius: 14px;
  background: rgba(255,255,255,.8); color: #1d2b4f; font-size: 14px; font-weight: 600; max-width: 80%; }
#trasa li.pole.zamglone .kleby, #trasa .mgla-pola .kleby { z-index: 4; }
#trasa .wezel.odslona > * { animation: wylania 2.2s ease-out both; }
/* płynne przejście między polami: tło w warstwie ::before z rozmytym górnym brzegiem, kolejne pole nachodzi na poprzednie */
#trasa li.pole { background: none; overflow: visible; }
#trasa li.pole:first-child { overflow: visible; }
#trasa li.pole::before { content: ''; position: absolute; inset: 0; z-index: 0; background: #6fae5a var(--tlo) center / cover no-repeat; }
#trasa li.pole:first-child::before { border-radius: 22px 22px 0 0; }
#trasa li.pole.zapasowe:not([style*="--tlo"])::before { background: radial-gradient(circle at 30% 20%, #9ccf7a, #5f9b4c 60%, #4c8540); }
#trasa li.pole + li.pole { margin-top: -10%; }
#trasa li.pole + li.pole::before { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 6%); mask-image: linear-gradient(180deg, transparent 0, #000 6%); }
#trasa li.pole > svg { z-index: 1; }
#trasa li.pole .wezel { z-index: 2; }
#trasa li.pole .wstega, #trasa li.pole .mgla-pola { z-index: 3; }
/* karta „Co zobaczysz na planszy” (przewodnik opisuje żetony) */
#okno .karta-ikon { text-align: center; }
#okno .karta-ikon .portret { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid #ffd23f; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
#okno .karta-ikon h2 { margin: 6px 0 2px; }
#okno .ikony.opisane li { align-items: flex-start; font-size: 13px; }
#okno .ikony.opisane li b { font-size: 14px; }
#trasa .wstega.etap { cursor: pointer; color: inherit; font: inherit; }
#trasa .wstega .znow { font-size: 12px; color: #ffd23f; opacity: .85; margin-left: 2px; }
#opowiesc .mapa-h .mala { font-size: 13px; opacity: .85; margin: 0 0 6px; }
#opowiesc .mapa-h .przejazd, #opowiesc .mapa-h .flaga { padding: 9px 16px; border-radius: 22px; font-weight: 700; font-size: 14px; }
#okno .powitanie { font-size: 15px; line-height: 1.45; margin: 8px 0 4px; text-align: left; }
#okno .moc { font-size: 14px; margin: 8px 0 0; text-align: left; }
#okno .ikony.kafle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
#okno .ikony.kafle li { flex-direction: column; text-align: center; border: 0; font-size: 12px; gap: 2px; }
#okno .historia-obraz { width: 100%; border-radius: 12px; margin: 6px 0; aspect-ratio: 4 / 3; object-fit: cover; }
#okno .opowiesc-tekst { text-align: left; font-size: 15px; line-height: 1.5; max-height: 40vh; overflow-y: auto; }
#okno .opowiesc-tekst p { margin: 6px 0; }
/* okna zawsze mieszczą się na ekranie: przewijana treść, przyciski przyklejone na dole (Piotr 26.10) */
#okno { padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
#okno .box { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#okno .box .przyciski { position: sticky; bottom: -18px; margin: 10px -20px -18px; padding: 12px 20px 16px; background: linear-gradient(180deg, rgba(253,232,240,0), #fde8f0 35%); }
#okno .ikony, #okno .opowiesc-tekst { max-height: none; overflow: visible; }
#opowiesc .karta { max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); overflow-y: auto; overscroll-behavior: contain; }
#opowiesc .karta .przyciski { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(180deg, rgba(10,30,70,0), rgba(10,30,70,.95) 40%); }
/* zapasowe tło pola: jednakowy kolor przy górnej i dolnej krawędzi, żeby pola bez obrazka łączyły się bez szwu */
#trasa li.pole.zapasowe:not([style*="--tlo"])::before { background: radial-gradient(ellipse 70% 40% at 50% 50%, #8ec96e, #5f9b4c); }
/* animowane postacie na polach mapy */
#trasa li.pole .postacie { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
#trasa li.pole .postac { position: absolute; width: auto; transform-origin: 50% 100%; filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); will-change: transform; }
/* flagi wspólnot: we wstędze regionu i na maszcie przy pierwszym przystanku wspólnoty */
#trasa .wstega.region svg.flaga { width: 30px; height: 20px; border-radius: 2px; flex: none; }
#trasa .maszt { position: absolute; z-index: 2; width: 3px; height: 54px; background: linear-gradient(90deg, #8a6a3a, #c9a66b); border-radius: 2px;
  transform: translate(46px, -86px); box-shadow: 1px 1px 2px rgba(0,0,0,.4); pointer-events: none; }
#trasa .maszt.lewo { transform: translate(-50px, -86px); }
#trasa .maszt svg.flaga { position: absolute; left: 3px; top: 0; width: 34px; height: 23px; transform-origin: 0 50%; animation: powiew 2.4s ease-in-out infinite; filter: drop-shadow(1px 2px 1px rgba(0,0,0,.35)); }
@keyframes powiew { 0%, 100% { transform: skewY(0deg) scaleX(1); } 50% { transform: skewY(-6deg) scaleX(.94); } }
/* animacja na start: lot, lądowanie, walizka, Aerobús */
#animacja-startu { position: fixed; inset: 0; z-index: 40; background: linear-gradient(180deg, #4aa8ff, #bfe6ff); overflow: hidden; transition: opacity .6s; }
#animacja-startu.znika { opacity: 0; }
#animacja-startu .kadr-startu { position: absolute; inset: 0; opacity: 0; transition: opacity .9s; background: center / cover no-repeat; }
#animacja-startu .kadr-startu.widac { opacity: 1; }
#animacja-startu .kadr-startu.niebo { background: linear-gradient(180deg, #2f86e6, #9fd4ff 70%, #e8f6ff); }
#animacja-startu img { position: absolute; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
#animacja-startu .widac .sam.lot { width: 46%; left: -50%; top: 30%; animation: lot 5s ease-in-out forwards; }
@keyframes lot { 0% { left: -50%; top: 42%; transform: rotate(-8deg); } 100% { left: 110%; top: 12%; transform: rotate(-14deg); } }
#animacja-startu .widac .sam.laduje { width: 40%; left: -40%; top: 5%; animation: laduje 5s ease-out forwards; }
@keyframes laduje { 0% { left: -40%; top: 5%; transform: rotate(14deg) scale(.7); } 100% { left: 45%; top: 48%; transform: rotate(0) scale(1); } }
#animacja-startu .wieza { width: 22%; right: 6%; top: 34%; }
#animacja-startu .widac .walizka { width: 22%; left: -25%; bottom: 26%; animation: walizka 4.5s ease-out forwards; }
@keyframes walizka { 0% { left: -25%; transform: rotate(-4deg); } 30% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 100% { left: 40%; transform: rotate(0); } }
#animacja-startu .widac .bus { width: 52%; right: -60%; bottom: 24%; animation: bus 3.5s ease-out forwards; }
@keyframes bus { 0% { right: -60%; } 100% { right: 6%; } }
#animacja-startu .nuria { width: 34%; left: 4%; bottom: 38%; border-radius: 50%; border: 4px solid #ffd23f; background: #fff; opacity: 0; animation: nuria .6s 2.8s ease-out forwards; }
@keyframes nuria { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
#animacja-startu .chmury { position: absolute; inset: 0; pointer-events: none; transition: opacity .8s; }
#animacja-startu .chmury i { position: absolute; width: 60%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, #fff, rgba(255,255,255,0)); animation: chmura 7s linear infinite; }
#animacja-startu .chmury i:nth-child(1) { top: 15%; left: 70%; } #animacja-startu .chmury i:nth-child(2) { top: 55%; left: 20%; animation-duration: 9s; } #animacja-startu .chmury i:nth-child(3) { top: 72%; left: 90%; animation-duration: 6s; }
@keyframes chmura { from { transform: translateX(40%); } to { transform: translateX(-160%); } }
#animacja-startu .napis { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 18px 70px; background: linear-gradient(180deg, rgba(5,15,40,0), rgba(5,15,40,.85) 35%); }
#animacja-startu .napis p { margin: 0 auto; max-width: 440px; color: #fff; font-size: 17px; line-height: 1.45; text-align: center; opacity: 0; transition: opacity .6s; }
#animacja-startu .napis p.widac { opacity: 1; }
#animacja-startu .pomin { position: absolute; right: 14px; bottom: 18px; padding: 9px 16px; border-radius: 20px; background: rgba(255,255,255,.2); color: #fff; font-weight: 700; }
/* animacja końcowa (koniec gry): te same ramy co animacja startu */
#animacja-startu.koniec-gry { background: #0b1638; }
#animacja-startu.koniec-gry .kadr-startu.dol { background-position: 72% 97%; background-size: auto 175%; }
#animacja-startu.koniec-gry .kadr-startu.gora { background-position: center top; }
#animacja-startu.koniec-gry .kadr-startu.widac { animation: najazd 9s ease-out forwards; }
@keyframes najazd { from { transform: scale(1.08); } to { transform: scale(1); } }
#animacja-startu.koniec-gry .zmierzch::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,120,40,.35), rgba(60,20,90,.45)); }
#animacja-startu.koniec-gry .swit::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,170,90,.35), rgba(255,255,255,0) 60%); }
#animacja-startu.koniec-gry .noc { background: radial-gradient(circle at 78% 18%, #fdf6c9 0 4%, rgba(253,246,201,.25) 5%, rgba(0,0,0,0) 12%), linear-gradient(180deg, #08112e, #1b2c66 70%, #22407e); }
#animacja-startu .paszport { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: min(86%, 420px); padding: 18px 14px; border-radius: 14px; background: #f6edd6; border: 3px solid #7a2531; box-shadow: 0 10px 30px rgba(0,0,0,.5); display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
#animacja-startu .pieczatka { display: flex; justify-content: center; opacity: 0; transform: scale(2.4) rotate(-14deg); }
#animacja-startu .widac .pieczatka { animation: pieczatka .35s ease-in forwards; }
#animacja-startu .pieczatka svg { width: 100%; max-width: 64px; height: auto; border-radius: 3px; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
@keyframes pieczatka { to { opacity: 1; transform: scale(1) rotate(-4deg); } }
#animacja-startu .ognie i { position: absolute; width: 10px; height: 10px; border-radius: 50%; opacity: 0; box-shadow: 0 -38px #ffd23f, 27px -27px #ff5a7a, 38px 0 #6fe3ff, 27px 27px #ffd23f, 0 38px #ff5a7a, -27px 27px #6fe3ff, -38px 0 #ffd23f, -27px -27px #ff5a7a; }
#animacja-startu .widac .ognie i { animation: ognie 2.4s ease-out infinite; }
#animacja-startu .ognie i:nth-child(1) { left: 18%; top: 14%; } #animacja-startu .ognie i:nth-child(2) { left: 72%; top: 9%; animation-delay: .5s; } #animacja-startu .ognie i:nth-child(3) { left: 45%; top: 22%; animation-delay: 1.1s; }
#animacja-startu .ognie i:nth-child(4) { left: 84%; top: 30%; animation-delay: 1.6s; } #animacja-startu .ognie i:nth-child(5) { left: 10%; top: 34%; animation-delay: .8s; } #animacja-startu .ognie i:nth-child(6) { left: 58%; top: 6%; animation-delay: 1.9s; } #animacja-startu .ognie i:nth-child(7) { left: 32%; top: 8%; animation-delay: 1.4s; }
@keyframes ognie { 0% { opacity: 1; transform: scale(.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.6); } }
#animacja-startu .koniec-napis { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 34px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 #b8326a, 0 6px 18px rgba(0,0,0,.6); opacity: 0; }
#animacja-startu .widac .koniec-napis { animation: nuria .8s 1.2s ease-out forwards; }
#trasa .meta-koniec { list-style: none; display: flex; justify-content: center; padding: 18px 0 30px; }
#trasa .meta-koniec .wstega { position: static; }
#animacja-startu .slonce { position: absolute; left: 50%; top: 18%; width: 90px; height: 90px; margin-left: -45px; border-radius: 50%; background: radial-gradient(circle, #fff3b0 0 45%, #ffb347 60%, rgba(255,140,60,0) 72%); }
#animacja-startu .widac .slonce { animation: zachod 9s ease-in forwards; }
@keyframes zachod { from { top: 14%; } to { top: 44%; opacity: .7; } }
/* Piotr 27.10: teksty czekają na stuknięcie — podpowiedź */
.dotknij { display: block; margin-top: 8px; text-align: center; color: #ffd23f; font-size: 13px; font-weight: 700; opacity: .85; animation: dotknij 1.6s ease-in-out infinite; }
@keyframes dotknij { 50% { opacity: .35; } }
.dalej-hint { color: #ffd23f; font-weight: 700; }
/* Piotr 27.10: przyciski pod tytułem — jedna szerokość, jedna wysokość, wyśrodkowane jeden pod drugim */
#trudnosc, #notes, #kiosk-btn, #seria, #kolekcje button { display: flex; width: min(100%, 360px); min-height: 52px; margin: 10px auto 0; box-sizing: border-box; justify-content: center; align-items: center; gap: 10px; padding: 6px 18px; border-radius: 26px; font-size: 17px; line-height: 1.15; text-align: center; }
#kolekcje { display: block; }
#trudnosc[hidden], #notes[hidden], #kiosk-btn[hidden], #seria[hidden] { display: none; }
#trudnosc img, #notes .ui-ikona, #kolekcje img { width: 36px; height: 36px; flex: none; }
/* Piotr 27.10: nowa góra mapy — mały tytuł z menu ⚙️, jeden rząd skrótów, mapa maksymalnie wysoko */
.tytul { padding: 8px 12px 6px; }
.tytul .gora { display: flex; align-items: center; justify-content: center; position: relative; min-height: 44px; }
.tytul h1 { margin: 0; font-size: 26px; line-height: 1.1; }
#menu-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(8,20,50,.65); box-shadow: 0 2px 6px rgba(0,0,0,.3); font-size: 22px; line-height: 42px; padding: 0; }
.tytul .skroty { display: flex; justify-content: center; align-items: stretch; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.tytul .skroty > button, .tytul .skroty > span#seria, .tytul #kolekcje button { display: inline-flex !important; width: auto !important; min-height: 0 !important; margin: 0 !important; flex-direction: row; align-items: center; gap: 6px; padding: 5px 12px 5px 6px !important; border-radius: 18px !important; font-size: 15px !important; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.tytul .skroty > [hidden], .tytul .skroty > span#seria[hidden] { display: none !important; }
.tytul .skroty span > b { display: block; font-size: 16px; line-height: 1; }
.tytul .skroty span > small { display: block; font-size: 10.5px; font-weight: 700; opacity: .75; text-transform: uppercase; letter-spacing: .5px; line-height: 1.2; }
.tytul .skroty span { text-align: left; }
.tytul .skroty .ui-ikona, .tytul #kolekcje img { width: 28px !important; height: 28px !important; }
.tytul .skroty .em { font-style: normal; font-size: 22px; line-height: 1; }
.tytul #kolekcje { display: contents; }
#notes { background: linear-gradient(180deg, #ffd96a, #f2b51f); color: #3a2a00; }
#menu { margin: 8px auto 0; padding: 10px; max-width: 380px; border-radius: 18px; background: rgba(8,20,50,.85); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
#menu #trudnosc { display: flex !important; width: 100% !important; margin: 0 0 10px !important; }
#menu .ustawienia { margin-top: 0; }
.tytul .gora { padding: 0 48px; }
.tytul h1 { font-size: clamp(19px, 5.6vw, 26px); white-space: nowrap; }
/* mgła do dołu ekranu (pod ostatnim widocznym polem) + „Zacznij od nowa” w menu */
#trasa li.mgla-dalej { position: relative; list-style: none; height: 0; margin-top: -1px; overflow: hidden; background: linear-gradient(180deg, rgba(235,242,255,.97), #e9f0fb 40%, #dfe8f6); border-radius: 0 0 22px 22px; }
#trasa li.mgla-dalej .kleby { position: absolute; inset: 0; opacity: .8; }
#menu #od-nowa { display: block; margin: 12px auto 2px; padding: 6px 14px; opacity: .8; font-size: 14px; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.35); border-radius: 16px; }

/* Piotr 28.10: mgła kończy mapę — przewijanie staje, gdy mgła wypełnia dół ekranu; kłęby nie rozpychają mapy w bok */
#mapa:has(li.mgla-dalej) { padding-bottom: 0; }
#trasa .mgla-pola { overflow-x: clip; overflow-y: visible; }
#trasa li.mgla-dalej { border-radius: 0; }
/* kłęby mgły wystawały pod koniec mapy i wydłużały przewijanie — przycinamy tylko od dołu */
#trasa .mgla-pola .kleby { overflow: clip; }
#trasa li.mgla-dalej { margin-bottom: 0; }

/* ---------- Kwartały Cerdy (bloki.js): plan Eixample, kwartały ze ściętymi narożnikami ---------- */
#bloki { height: 100%; display: flex; flex-direction: column; align-items: center; padding: env(safe-area-inset-top) 8px 0; background-color: #0b2a5b; background-size: cover; background-position: center; }
#bloki-pasek { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 10px; padding: 8px 0 4px; }
#bloki-wroc { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 20px; flex: none; }
#bloki-ruchy, #bloki-cel { background: rgba(8,20,50,.72); border-radius: 14px; padding: 4px 12px; display: flex; flex-direction: column; align-items: center; min-width: 64px; }
#bloki-ruchy b, #bloki-cel b { font-size: 24px; line-height: 1; }
#bloki-ruchy small, #bloki-cel small { font-size: 10px; opacity: .85; text-transform: uppercase; letter-spacing: .5px; }
#bloki-cel { flex-direction: row; gap: 6px; align-items: center; }
#bloki-cel span { font-size: 20px; }
#bloki-ruchy.malo { animation: puls .8s ease-in-out infinite; }
#bloki-nazwa { font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.8); margin: 2px 0 4px; }
#bloki-porada { max-width: 520px; margin: 0 8px 6px; background: rgba(255,255,255,.94); color: #222; border-radius: 12px; padding: 8px 12px; font-size: 13px; line-height: 1.35; cursor: pointer; }
#bloki-plan { --n: 8; width: min(94vw, 56vh, 440px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; padding: 5px; border-radius: 14px;
  background: #b9bfc4; box-shadow: 0 6px 18px rgba(0,0,0,.45), inset 0 0 0 2px rgba(255,255,255,.35); touch-action: none; user-select: none; -webkit-user-select: none; margin-top: 4px; }
#bloki-plan .kp { position: relative; border-radius: 3px; background: #d6dadd; }
#bloki-plan .kp.stale { background: #8a939b; }
#bloki-plan .kp.stale.aleja { background: repeating-linear-gradient(45deg, #7b848c 0 6px, #8e979f 6px 12px); }
#bloki-plan .kp.stale.hala { background: #c9a23f; display: grid; place-items: center; font-size: clamp(14px, 4vw, 22px); }
.kwartal, #bloki-plan .kp.kw { --k: #d9825b; }
#bloki-plan .kp.kw::before, .kwartal i::before { content: ''; position: absolute; inset: 0; background: var(--k);
  clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
#bloki-plan .kp.kw::after, .kwartal i::after { content: ''; position: absolute; inset: 32%; border-radius: 2px; background: #86b96a; box-shadow: 0 0 0 2px rgba(0,0,0,.08); }
.c0 { --k: #d9825b !important; } .c1 { --k: #e0b04f !important; } .c2 { --k: #c97b9c !important; } .c3 { --k: #7aa6c9 !important; }
#bloki-plan .kp.cien.ok { background: rgba(127,211,106,.75); }
#bloki-plan .kp.cien.zle { background: rgba(230,90,90,.6); }
#bloki-plan .kp.ulica { animation: ulica .45s ease-in forwards; }
@keyframes ulica { 0% { filter: brightness(1); transform: scale(1); } 40% { filter: brightness(1.8); transform: scale(1.08); } 100% { filter: brightness(2); transform: scale(.2); opacity: 0; } }
#bloki-plan .kp.nowy { animation: wklad .25s ease-out; }
@keyframes wklad { from { transform: scale(1.25); } to { transform: scale(1); } }
#bloki-tacka { width: min(94vw, 440px); flex: 1; min-height: 120px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; justify-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
#bloki-tacka .slot-t { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 14px; }
#bloki-tacka .slot-t.wybrany { background: rgba(255,210,63,.25); box-shadow: inset 0 0 0 2px #ffd23f; }
#bloki-tacka .slot-t.martwy .kwartal { opacity: .35; }
.kwartal { display: grid; gap: 2px; pointer-events: none; }
.kwartal i { position: relative; width: var(--r, 20px); height: var(--r, 20px); }
.kwartal i.pusta::before, .kwartal i.pusta::after { display: none; }
#bloki-plywak { position: fixed; z-index: 30; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
#bloki-stopka { width: 100%; max-width: 560px; padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); }
#bloki-gwiazdy { text-align: center; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
#bloki-gwiazdy b { color: #ffd23f; }
/* kiosk Pau (28.10): klient przy okienku i podpowiedź, z czego zrobić zamówienie */
#kiosk-pomoc { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 18px; font-weight: 800; flex: none; }
#kiosk-zam .mowi { font-style: italic; color: #444; line-height: 1.3; }
#kiosk-zam .przepisy { display: flex; flex-direction: column; gap: 3px; background: #f6f1e3; border-radius: 10px; padding: 5px 7px; }
#kiosk-zam .przepisy > small { font-weight: 700; color: #6b5a2a; }
#kiosk-zam .przepis { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
#kiosk-zam .przepis small { font-size: 10.5px; color: #6b5a2a; white-space: nowrap; }
#kiosk-zam .przepis .ik-m, #kiosk-zam .przepis > img, #kiosk-zam .przepis > .em { width: 24px; height: 24px; display: grid; place-items: center; font-size: 16px; }
#kiosk-zam .przepis img { width: 24px; height: 24px; object-fit: contain; }
#bloki-tacka { margin: 10px 0 0; max-height: 200px; background: rgba(8,20,50,.55); border-radius: 18px; padding: 6px; }
#bloki-plan .kp:not(.kw):not(.stale) { background: #e4dcc8; }
#kiosk-zam .rzecz .ik img { width: 34px; height: 34px; object-fit: contain; }
#kiosk-zam .rzecz .ik { flex: none; }
/* zakończenie (28.10): kiosk w stanie z gry, Pau, Laia i goście z kolekcji, na końcu wybrany podróżnik */
#animacja-startu .scena-kiosku { position: absolute; left: 0; right: 0; top: 30%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
#animacja-startu .scena-kiosku img { position: static; }
#animacja-startu .scena-kiosku .kiosk { width: min(44%, 220px); filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
#animacja-startu .scena-kiosku.kA .kiosk { filter: drop-shadow(0 0 22px rgba(255,214,110,.95)) drop-shadow(0 8px 14px rgba(0,0,0,.5)); }
#animacja-startu .scena-kiosku.kC .kiosk { filter: grayscale(.6) brightness(.85) drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
#animacja-startu .scena-kiosku .osoby { display: flex; gap: 8px; justify-content: center; }
#animacja-startu .scena-kiosku .osoby img { width: 64px; height: 64px; border-radius: 50%; background: #fff6d8; border: 3px solid #ffd23f; object-fit: cover; opacity: 0; }
#animacja-startu .widac .scena-kiosku .osoby img { animation: nuria .6s ease-out forwards; }
#animacja-startu .widac .scena-kiosku .osoby img:nth-child(2) { animation-delay: .3s; } #animacja-startu .widac .scena-kiosku .osoby img:nth-child(3) { animation-delay: .6s; } #animacja-startu .widac .scena-kiosku .osoby img:nth-child(4) { animation-delay: .9s; }
#animacja-startu .podroznik { position: absolute; left: 50%; top: 52%; width: 110px; height: 110px; margin-left: -55px; border-radius: 50%; background: #fff6d8; border: 4px solid #ffd23f; opacity: 0; filter: none; }
#animacja-startu .widac .podroznik { animation: nuria .8s 2s ease-out forwards; }
#animacja-startu .kiosk-scena::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,20,50,.15), rgba(8,20,50,.45)); }
#animacja-startu .kiosk-scena.kiosk-C::before { background: linear-gradient(180deg, rgba(40,40,60,.45), rgba(8,20,50,.6)); }
#animacja-startu .scena-kiosku { top: 20%; z-index: 1; }
#animacja-startu .scena-kiosku .kiosk { width: min(60%, 280px); border-radius: 18px; }
#animacja-startu .scena-kiosku .osoby img { width: 72px; height: 72px; }
#animacja-startu .scena-kiosku { top: 9%; }
#animacja-startu .scena-kiosku .ilustracja { width: min(94%, 520px); border-radius: 18px; border: 3px solid #ffd23f; box-shadow: 0 10px 28px rgba(0,0,0,.55); }
#animacja-startu .widac .scena-kiosku .ilustracja { animation: najazdIl 9s ease-out forwards; }
@keyframes najazdIl { from { transform: scale(.96); } to { transform: scale(1.02); } }
#animacja-startu .kiosk-scena { filter: none; }
#animacja-startu .kiosk-scena::before { background: linear-gradient(180deg, rgba(8,20,50,.55), rgba(8,20,50,.8)); backdrop-filter: blur(3px); }
#animacja-startu .scena-kiosku .osoby img { width: min(72px, 16vw); height: min(72px, 16vw); }
/* ostatnia scena (28.10): ilustracja podróżnika w ramce pod napisem „Koniec podróży” */
#animacja-startu .koniec-podroznika { position: absolute; left: 0; right: 0; top: 7%; display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 1; }
#animacja-startu .koniec-podroznika .koniec-napis { position: static; }
#animacja-startu .koniec-podroznika img { position: static; }
#animacja-startu .koniec-podroznika .ilustracja { width: min(94%, 520px); border-radius: 18px; border: 3px solid #ffd23f; box-shadow: 0 10px 28px rgba(0,0,0,.55); opacity: 0; }
#animacja-startu .widac .koniec-podroznika .ilustracja { animation: nuria .9s .6s ease-out forwards; }
#animacja-startu .koniec-podroznika .podroznik-zapas { width: 130px; height: 130px; border-radius: 50%; background: #fff6d8; border: 4px solid #ffd23f; opacity: 0; }
#animacja-startu .widac .koniec-podroznika .podroznik-zapas { animation: nuria .8s .6s ease-out forwards; }
#animacja-startu .kadr-startu:has(.koniec-podroznika)::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,14,40,.7), rgba(8,14,40,.85)); }
/* animacja przylotu z ilustracjami podróżnika (28.10): pionowe kadry na cały ekran */
#animacja-startu .kadr-startu.ilustr { background-size: cover; background-position: center; }
#animacja-startu .kadr-startu.ilustr.widac { animation: najazd 9s ease-out forwards; }
#okno .jezyki { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
#okno .jezyki button { padding: 12px; border-radius: 14px; background: #fff6d8; color: #1d2b4f; font-weight: 800; font-size: 18px; border: 2px solid transparent; }
#okno .jezyki button.wybrana { border-color: #c9a23f; }
#okno .jezyki button svg { width: 30px; height: 20px; vertical-align: -3px; margin-right: 4px; }
/* Twoja reklama w wersji polskiej (28.10): jedna dyskretna linijka */
.reklama-wlasna { display: block; margin: 8px auto 0; padding: 7px 12px; border-radius: 12px; background: rgba(47,143,78,.12); color: #1d6a3a; font-size: 13px; font-weight: 700; text-decoration: none; text-align: center; }
.tytul .gora h1 { padding: 0; font-size: clamp(15px, 4.3vw, 26px); letter-spacing: 0; white-space: nowrap; text-align: center; }   /* 28.10: dłuższe nazwy (Explorador de Barcelona) nie wchodzą pod ⚙️ */
/* prezent od Pau i ostatnia pieczątka (28.10) */
#animacja-startu .prezent { position: absolute; left: 0; right: 0; top: 14%; display: flex; flex-direction: column; align-items: center; gap: 12px; z-index: 1; }
#animacja-startu .prezent img { position: static; width: min(56%, 260px); filter: drop-shadow(0 0 26px rgba(255,214,110,.9)) drop-shadow(0 8px 14px rgba(0,0,0,.5)); opacity: 0; }
#animacja-startu .widac .prezent img { animation: nuria .9s .3s ease-out forwards; }
#animacja-startu .prezent b { color: #ffd23f; font-size: 22px; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
#animacja-startu .pieczatka-koniec { position: absolute; left: 0; right: 0; top: 16%; display: flex; justify-content: center; z-index: 1; }
#animacja-startu .pieczatka-koniec img { position: static; width: min(50%, 230px); border-radius: 50%; background: #fff6d8; padding: 12px; opacity: 0; transform: scale(2.2) rotate(-14deg); }
#animacja-startu .widac .pieczatka-koniec img { animation: stempel .55s .5s cubic-bezier(.2,.9,.3,1.3) forwards; }
@keyframes stempel { to { opacity: 1; transform: scale(1) rotate(-8deg); } }
/* zakończenie z ilustracjami (28.10): kadry na cały ekran zamiast teł poziomów */
#animacja-startu.koniec-gry .kadr-startu.ilustr { background-size: cover; background-position: center; }
#animacja-startu.koniec-gry .kadr-startu.noc-ilustr::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,17,46,.15), rgba(8,17,46,.55)); }
#animacja-startu.koniec-gry .kadr-startu.noc-ilustr .paszport { z-index: 1; top: 58%; transform: translate(-50%, -50%) scale(.82); background: rgba(8,17,46,.72); }
