* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
:root {
  --naslov: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --besedilo: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --koral: #ff4f8b;
  --koral-temna: #c2185b;
  --rumena: #ffd23f;
  --turkizna: #19b5c9;
  --krema: #fff8ec;
}
body {
  font-family: var(--besedilo);
  color: #fff;
  background: linear-gradient(160deg, #2b1055 0%, #5b2a86 50%, #d8579b 100%);
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }

/* Mastni 3D napis */
.debel {
  font-family: var(--naslov);
  letter-spacing: .5px;
  text-shadow: 0 2px 0 #c2185b, 0 4px 0 #8e1048, 0 8px 14px rgba(0,0,0,.35);
}

/* ---------- Zasloni ---------- */

.zaslon { display: none; position: fixed; inset: 0; flex-direction: column; align-items: center; }
.zaslon.aktiven { display: flex; }
#zaslon-vstop { padding: 100px 16px 30px; overflow-y: auto; }
body[data-zaslon="vstop"] { background: linear-gradient(180deg, #62c6f5 0%, #9fdcff 38%, #bdeaa0 62%, #57b86a 100%); }
#zaslon-igra { padding: max(10px, env(safe-area-inset-top)) 12px 16px; overflow: hidden; }

/* ---------- Bonboni, ki padajo v ozadju ---------- */

.sky { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#zaslon-vstop .card { margin: auto 0; flex: none; }
.drop img { width: 100%; height: 100%; display: block; }
body:not([data-zaslon="vstop"]) .sky { display: none; }
.drop {
  position: absolute; top: -60px;
  width: var(--s); height: var(--s);
  animation: fall var(--d) linear var(--delay) infinite;
  opacity: .9;
}
@keyframes fall { to { transform: translateY(calc(100dvh + 120px)) rotate(360deg); } }

.candy { position: relative; width: 100%; height: 100%; }
.candy::after {
  content: ""; position: absolute; left: 22%; top: 16%;
  width: 30%; height: 18%; border-radius: 50%;
  background: rgba(255,255,255,.55); transform: rotate(-20deg);
}
.c0 { background: radial-gradient(circle at 35% 30%, #ffb3c1, #ff4d6d 45%, #c9184a); border-radius: 50%; }
.c1 { background: radial-gradient(circle at 35% 30%, #ffe0b0, #ff9f1c 45%, #e85d04); border-radius: 24%; }
.c2 { background: radial-gradient(circle at 40% 35%, #fff3b0, #ffd60a 45%, #f4a100);
      clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.c3 { background: radial-gradient(circle at 40% 30%, #c8ffe6, #38d39f 45%, #0f9d6e);
      clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.c4 { background: radial-gradient(circle at 35% 30%, #d4f6ff, #4cc9f0 45%, #1d7fc4);
      clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%); }
.c5 { background: radial-gradient(circle at 35% 30%, #eadcff, #b388ff 45%, #7b3fe4);
      border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }

/* ---------- Vstopni zaslon ---------- */

.card {
  position: relative;
  width: min(100%, 440px);
  text-align: center;
  padding: 24px 20px 24px;
  border-radius: 30px;
  color: #7a1f45;
  background: linear-gradient(180deg, #fffdf6, var(--krema));
  border: 5px solid #fff;
  box-shadow: 0 0 0 5px var(--turkizna), 0 8px 0 5px #0b6c7c, 0 24px 50px rgba(0,0,0,.3);
}
#zaslon-vstop h1 {
  /* v svoji plasti nad kartico, sicer naslov in logotip pobledita */
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: .2em;
  padding: 8px 0; line-height: 1;
  /* obris iz senc deluje v vseh brskalnikih (tudi Safari na telefonu) */
  color: #ff2e7e;
  text-shadow: 3px 0px 0 #5c1233, -3px 0px 0 #5c1233, 0px 3px 0 #5c1233, 0px -3px 0 #5c1233, 2px 2px 0 #5c1233, -2px 2px 0 #5c1233, 2px -2px 0 #5c1233, -2px -2px 0 #5c1233, 3px 2px 0 #5c1233, -3px 2px 0 #5c1233, 3px -2px 0 #5c1233, -3px -2px 0 #5c1233, 0 6px 0 #5c1233, 0 7px 0 #5c1233, 0 12px 16px rgba(0,0,0,.3);
}
.kras-logo { display: inline-block; width: auto; height: 1.7em; flex: none; vertical-align: middle; object-fit: contain; }
.plavajoce.s-kras-logotipom {
  display: flex; align-items: center; justify-content: center; gap: .16em;
  font-size: clamp(30px, 10vw, 52px);
}
.okno-kartica .kras-logo { height: 2.5em; margin: 0 .15em; }
.vpis { margin: 0 0 14px; }
.vpis label { display: block; font-family: var(--naslov); font-size: 20px; color: var(--koral); margin-bottom: 4px; }
.vpis input {
  width: 100%; font: 800 18px var(--besedilo); color: #7a1f45; text-align: center;
  padding: 10px 16px; border-radius: 999px; border: 3px solid var(--turkizna); background: #fff;
  outline: none; user-select: text; -webkit-user-select: text;
}
.vpis-namig { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; line-height: 1.3; opacity: .8; }
.vpis input:focus { box-shadow: 0 0 0 4px rgba(25,181,201,.3); }
.vpis.napaka input { border-color: var(--koral); animation: tresi-vpis .35s; }
@keyframes tresi-vpis { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pozdrav { margin: 0 0 16px; font-size: 18px; font-weight: 800; }
.pozdrav b { font-family: var(--naslov); font-size: 22px; color: var(--koral); }
button.povezava {
  all: unset; cursor: pointer; font-size: 14px; font-weight: 800; color: #0b6c7c; text-decoration: underline; margin-left: 4px;
}
.dora-vstop {
  position: relative; z-index: 1;
  display: block; height: 150px; margin: -118px auto 0;
  /* temna senca okoli Dore, da izstopi iz kremne kartice */
  filter: drop-shadow(0 0 1.5px #5c1233) drop-shadow(0 7px 8px rgba(40,10,30,.5));
  animation: dora-vstop 2.4s ease-in-out infinite;
}
@keyframes dora-vstop { 50% { transform: translateY(-8px) rotate(-2deg); } }
.explora span { display: inline-block; font-family: var(--naslov); font-size: 26px; -webkit-text-stroke: 1px rgba(0,0,0,.25); animation: crka 1.8s ease-in-out infinite; }
.explora span:nth-child(5n+1) { color: #ff8a1f; }
.explora span:nth-child(5n+2) { color: #ff4fa3; }
.explora span:nth-child(5n+3) { color: #ffd23f; }
.explora span:nth-child(5n+4) { color: #57cc99; }
.explora span:nth-child(5n+5) { color: #b388ff; }
.explora span:nth-child(odd) { rotate: -6deg; }
.explora span:nth-child(even) { rotate: 5deg; }
.explora span:nth-child(2n) { animation-delay: .15s; }
.explora span:nth-child(3n) { animation-delay: .3s; }
@keyframes crka { 50% { transform: translateY(-4px); } }
@keyframes bob { 50% { transform: translateY(-8px); } }

h1 {
  margin: 0;
  font-family: var(--naslov);
  font-weight: 800;
  font-size: clamp(40px, 11.5vw, 60px);
  letter-spacing: .5px;
  text-shadow: 0 3px 0 #c2185b, 0 6px 0 #8e1048, 0 10px 18px rgba(0,0,0,.3);
}
.sub { margin: 0 0 14px; font-size: 18px; font-weight: 800; opacity: .95; }

.label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; opacity: .85; margin-bottom: 10px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 24px; }
.unit { background: linear-gradient(180deg, #7fe0ec, var(--turkizna)); color: #fff; border-radius: 16px; padding: 8px 4px 6px; box-shadow: 0 4px 0 #0b6c7c; text-shadow: 0 2px 0 rgba(0,0,0,.15); }
.num { display: block; font-family: var(--naslov); font-size: clamp(24px, 7vw, 34px); font-variant-numeric: tabular-nums; }
.unit small { font-size: 12px; font-weight: 800; opacity: .85; }

.bar { height: 12px; border-radius: 99px; background: #f0e2c8; overflow: hidden; margin: -10px 0 18px; }
.bar > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #ffd60a, #ff4d6d); transition: width 1s linear; }
body.done .bar { display: none; }

.party { display: none; font-family: var(--naslov); font-size: clamp(28px, 8vw, 36px); margin: 4px 0 26px; }
body.done .countdown, body.done .label { display: none; }
body.done .party { display: block; animation: bob 1.2s ease-in-out infinite; }

/* ---------- Gumbi (sijoči 3D) ---------- */

button {
  position: relative;
  font-family: var(--naslov); font-size: 24px; font-weight: 800; letter-spacing: .5px;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
  background: linear-gradient(180deg, #ff86b0 0%, var(--koral) 45%, #e8336f 100%);
  border: 3px solid rgba(255,255,255,.7);
  border-radius: 999px;
  padding: 14px 48px;
  box-shadow: 0 6px 0 var(--koral-temna), 0 12px 22px rgba(0,0,0,.28), inset 0 2px 0 rgba(255,255,255,.5);
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
button::after {
  content: ""; position: absolute; left: 12%; right: 12%; top: 5px; height: 32%;
  border-radius: 999px; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  pointer-events: none;
}
button:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--koral-temna), 0 4px 10px rgba(0,0,0,.25); }
button.drugotni {
  background: linear-gradient(180deg, #7fe0ec 0%, var(--turkizna) 50%, #0e8fa3 100%);
  box-shadow: 0 6px 0 #0b6c7c, 0 12px 22px rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.5);
}
button.drugotni:active { box-shadow: 0 2px 0 #0b6c7c; }
button.majhen {
  width: 46px; height: 46px; padding: 0 0 4px; flex: none;
  font-size: 32px; line-height: 1;
  /* bel z vidnim temnim robom: dovolj kontrasta na nebu, vodi in travi */
  color: #0b6c7c; text-shadow: none;
  background: linear-gradient(180deg, #ffffff, #e3f6f9);
  border: 3px solid #0b6c7c;
  box-shadow: 0 4px 0 #0b6c7c, 0 6px 12px rgba(0,0,0,.3);
}
button.majhen::after { top: 3px; }

/* ---------- Vrstica na vrhu ---------- */

.vrstica { display: flex; align-items: center; gap: 10px; width: min(100%, 520px); }
#zaslon-zemljevid .vrstica {
  position: absolute; z-index: 3; top: 0; left: 50%; transform: translateX(-50%);
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
}
.naslov-zemljevida {
  flex: 1; min-width: 0; white-space: nowrap; font-family: var(--naslov); font-size: clamp(20px, 6.4vw, 26px);
  text-shadow: 0 2px 0 #0b6c7c, 0 4px 8px rgba(0,0,0,.3);
}
.zivljenja {
  display: flex; align-items: center; gap: 2px;
  padding: 5px 10px 5px 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: #fffdf6;
  box-shadow: 0 4px 0 rgba(0,0,0,.15), 0 6px 14px rgba(0,0,0,.2);
}
.zivljenja::after { display: none; }
.zivljenja svg { width: 26px; height: 26px; display: block; }
.zivljenja b { font-family: var(--naslov); font-size: 22px; line-height: 1; color: #c9184a; margin: 0 4px 0 4px; text-shadow: none; }
.zivljenja .poln { fill: #e8173a; stroke: #8a0a20; }
.zivljenja .prazen { fill: #e6ddd0; stroke: #b9ad9c; }
.zivljenja .poln + .odsev { display: block; }
.zivljenja svg.prihaja { animation: srce-utrip 1.2s ease-in-out infinite; }
@keyframes srce-utrip { 50% { transform: scale(1.18); } }
button.zvok {
  position: absolute; z-index: 3; left: 14px; bottom: max(14px, env(safe-area-inset-bottom));
  width: 54px; height: 54px; padding: 0; font-size: 26px; border-radius: 50%; border-width: 4px;
  box-shadow: 0 5px 0 #0b6c7c, 0 0 0 4px rgba(255,255,255,.55), 0 8px 16px rgba(0,0,0,.35);
}

/* ---------- 3D zemljevid ---------- */

.svet3d {
  position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(180deg, #62c6f5 0%, #9fdcff 30%, #d8f3ff 52%, #fff6d8 100%);
  touch-action: none;
}
.svet3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.oblaki span {
  position: absolute; width: 140px; height: 44px; border-radius: 99px; background: rgba(255,255,255,.9);
  animation: oblak 60s linear infinite;
}
.oblaki span::before, .oblaki span::after {
  content: ""; position: absolute; background: inherit; border-radius: 50%;
}
.oblaki span::before { width: 70px; height: 60px; left: 20px; top: -28px; }
.oblaki span::after { width: 54px; height: 46px; left: 70px; top: -18px; }
.oblaki span:nth-child(1) { top: 12%; left: -20%; animation-duration: 70s; }
.oblaki span:nth-child(2) { top: 20%; left: 40%; transform: scale(.7); animation-duration: 90s; animation-delay: -30s; }
.oblaki span:nth-child(3) { top: 8%; left: 70%; transform: scale(.55); animation-duration: 80s; animation-delay: -50s; }
.oblaki span:nth-child(4) { top: 26%; left: 10%; transform: scale(.45); animation-duration: 100s; animation-delay: -10s; }
@keyframes oblak { from { translate: -30vw 0; } to { translate: 130vw 0; } }
.odklenjena {
  position: absolute; z-index: 4; left: 50%; top: 30%; translate: -50% -50%;
  font-family: var(--naslov); font-size: clamp(22px, 7vw, 40px); white-space: nowrap; color: #fff;
  text-shadow: 0 3px 0 #c9184a, 0 6px 0 #7a1f45, 0 10px 18px rgba(0,0,0,.35);
  pointer-events: none; animation: odklenjena 2s cubic-bezier(.3,1.6,.5,1) forwards;
}
@keyframes odklenjena {
  0% { scale: .2; opacity: 0; rotate: -10deg; }
  18% { scale: 1.15; opacity: 1; rotate: 3deg; }
  28% { scale: 1; rotate: 0deg; }
  80% { opacity: 1; translate: -50% -50%; }
  100% { opacity: 0; translate: -50% -90%; }
}

/* ---------- 2D zemljevid (rezerva brez WebGL) ---------- */

.zemljevid-ovoj {
  flex: 1; width: 100%; overflow-y: auto; padding-top: 60px;
  background: linear-gradient(180deg, #a7e3a1 0%, #7cc576 100%);
  -webkit-overflow-scrolling: touch;
}
.zemljevid { position: relative; width: min(100%, 520px); margin: 0 auto; }
.reka { position: absolute; inset: 0; width: 100%; height: 100%; }
.reka path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.reka-breg { stroke: #c2a46d; stroke-width: 46px; }
.reka-voda { stroke: #3a9bdc; stroke-width: 34px; }
.reka-tok { stroke: rgba(255,255,255,.55); stroke-width: 3px; stroke-dasharray: 10 18; animation: tok 1.4s linear infinite; }
@keyframes tok { to { stroke-dashoffset: 28; } }
.napis-reka {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: #1d5d8c; background: rgba(255,255,255,.75); padding: 3px 10px; border-radius: 99px;
}
.dom, .hisica, .tupko, .zastavica, .kanu { position: absolute; transform: translate(-50%, -50%); }
.dom { display: flex; align-items: center; gap: 6px; }
.dom .hisa { font-size: 44px; }
.lik { display: flex; flex-direction: column; align-items: center; font-size: 30px; }
.lik small { font-size: 11px; font-weight: 800; color: #24543a; }
.lik img, .tupko img, .dora-kanu img { width: 1.2em; height: 1.2em; object-fit: contain; }
.hisica {
  width: 74px; height: 74px; padding: 0; border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ffe066 60%, #ffb703);
  box-shadow: 0 5px 0 #c77d00, 0 8px 14px rgba(0,0,0,.25);
  display: grid; place-items: center;
  font-size: 16px; color: #5b1a3a; text-shadow: none;
}
.hisica::after { display: none; }
.hisica .hisa { position: absolute; top: -26px; font-size: 30px; }
.hisica .st { font-size: 24px; margin-top: 4px; }
.hisica .zv { position: absolute; bottom: -20px; font-size: 14px; color: #ffd60a; text-shadow: 0 1px 2px rgba(0,0,0,.5); letter-spacing: 1px; }
.hisica.zaklenjena { filter: grayscale(1); opacity: .7; cursor: default; }
.hisica.zaklenjena .zv { display: none; }
.hisica.trenutna { animation: utrip 1.4s ease-in-out infinite; }
@keyframes utrip { 50% { box-shadow: 0 5px 0 #c77d00, 0 0 0 10px rgba(255,224,102,.45); } }
.tupko { font-size: 34px; }
.zastavica { font-size: 44px; }
.kanu { font-size: 40px; z-index: 1; transition: left 1.4s ease-in-out, top 1.4s ease-in-out; animation: ziba 2s ease-in-out infinite; }
.dora-kanu { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); font-size: 26px; }
@keyframes ziba { 50% { rotate: -6deg; } }

/* ---------- Igra ---------- */

#zaslon-igra { background: linear-gradient(180deg, #1fb5c8 0%, #0d7fa8 45%, #0a4f7d 100%); }
.voda-ozadje {
  position: absolute; inset: -20%; pointer-events: none; opacity: .35;
  background:
    radial-gradient(ellipse 18% 8% at 20% 30%, rgba(255,255,255,.6), transparent 70%),
    radial-gradient(ellipse 14% 6% at 70% 20%, rgba(255,255,255,.5), transparent 70%),
    radial-gradient(ellipse 22% 9% at 55% 70%, rgba(255,255,255,.45), transparent 70%),
    radial-gradient(ellipse 16% 7% at 15% 85%, rgba(255,255,255,.5), transparent 70%),
    radial-gradient(ellipse 12% 5% at 85% 60%, rgba(255,255,255,.5), transparent 70%);
  animation: kavstika 12s ease-in-out infinite alternate;
}
@keyframes kavstika { to { transform: translate(4%, 3%) rotate(3deg) scale(1.08); } }

.igra-vrstica { position: relative; z-index: 1; }
.hud {
  flex: 1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #fffdf6, var(--krema));
  color: #7a1f45; border-radius: 22px; padding: 8px 14px;
  box-shadow: 0 5px 0 rgba(0,0,0,.15), 0 10px 20px rgba(0,0,0,.2);
}
.hud-poteze, .hud-tocke { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.hud-poteze b {
  font-family: var(--naslov); font-weight: 800; font-size: 38px; color: var(--koral);
  text-shadow: 0 2px 0 var(--koral-temna);
}
.hud-tocke b { font-family: var(--naslov); font-weight: 800; font-size: 22px; color: #0b6c7c; }
.hud small { font-size: 11px; font-weight: 900; text-transform: uppercase; opacity: .7; letter-spacing: .5px; }
.hud-sredina { min-width: 0; padding: 0 14px 0 6px; }
.hud-cilj { margin-top: 6px; font-size: 12px; font-weight: 900; text-align: center; opacity: .8; }

.napredek {
  position: relative; height: 14px; border-radius: 99px;
  background: #e9dcc9; box-shadow: inset 0 2px 3px rgba(0,0,0,.2);
}
.napredek-polnilo {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(180deg, #ffe37a, #ffb703);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), inset 0 2px 0 rgba(255,255,255,.5);
  transition: width .4s;
}
.napredek-zvezda {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  font-size: 22px; color: var(--rumena); text-shadow: 0 0 0 #000, 0 2px 0 #b07a00, 0 0 3px rgba(0,0,0,.4);
}

.plosca-ovoj {
  position: relative; z-index: 1; margin-top: auto;
  width: min(100%, 500px, calc(100dvh - 200px));
  min-width: 260px;
}
.plosca {
  position: relative; aspect-ratio: 1; width: 100%;
  border-radius: 20px; overflow: hidden; touch-action: none;
  background:
    repeating-conic-gradient(rgba(255,255,255,.07) 0 25%, rgba(255,255,255,0) 0 50%) 0 0 / 25% 25%,
    linear-gradient(180deg, rgba(10,40,90,.72), rgba(8,28,70,.8));
  border: 3px solid rgba(255,255,255,.35);
  box-shadow: inset 0 4px 14px rgba(0,0,0,.45), 0 10px 30px rgba(0,0,0,.3);
  container-type: inline-size;
}
.ploscica {
  position: absolute; left: 0; top: 0;
  width: 12.5%; height: 12.5%;
  transition: transform .34s cubic-bezier(.34, 1.45, .64, 1);
}

/* Sijoč 3D element */
.element {
  position: absolute; inset: 6%;
  display: grid; place-items: center;
  font-size: 8cqw; line-height: 1;
  border-radius: 30%;
  background:
    radial-gradient(ellipse 42% 26% at 38% 20%, rgba(255,255,255,.95), rgba(255,255,255,0) 72%),
    radial-gradient(ellipse 80% 40% at 50% 105%, rgba(255,255,255,.35), rgba(255,255,255,0) 70%),
    radial-gradient(circle at 40% 32%, color-mix(in srgb, var(--barva), #fff 30%), var(--barva) 50%, color-mix(in srgb, var(--barva), #000 38%) 100%);
  box-shadow:
    0 0 0 0.45cqw rgba(45,12,40,.7),
    inset 0 -0.6cqw 1cqw rgba(0,0,0,.35),
    inset 0 0.4cqw 0.5cqw rgba(255,255,255,.6),
    0 0.7cqw 0.8cqw rgba(0,0,0,.45);
}
/* funky: pikice čez bonbonček (statično, brez filtrov) */
.element::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,.28) 0 14%, transparent 16%) 0 0 / 25% 25%;
  -webkit-mask: linear-gradient(160deg, transparent 35%, #000 75%); mask: linear-gradient(160deg, transparent 35%, #000 75%);
}
.element .ikona { transform: translateY(2%); }
.element img { position: relative; z-index: 1; }
.el-burek img { rotate: -8deg; } .el-rakija img { rotate: 7deg; } .el-pivo img { rotate: -6deg; }
.el-aperol img { rotate: 9deg; } .el-utezi img { rotate: -4deg; } .el-domacica img { rotate: 10deg; }
.element img { width: 85%; height: 85%; object-fit: contain; pointer-events: none; }
.napis { font-family: var(--naslov); font-size: 3.2cqw; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* Vsak element ima svojo obliko, da se ločijo tudi brez barv */
.el-burek    { border-radius: 50%; }
.el-rakija   { border-radius: 30%; }
.el-pivo     { border-radius: 24%; }
.el-aperol   { border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }
.el-utezi    { border-radius: 30% / 50%; inset: 14% 4%; }
.el-domacica {
  border-radius: 22%; inset: 7%;
  /* barve škatle Domačice: rumeno, belo, temno rjav vogal */
  background:
    radial-gradient(ellipse 42% 26% at 38% 20%, rgba(255,255,255,.8), rgba(255,255,255,0) 72%),
    linear-gradient(135deg, #4a2412 0 16%, #ffb300 16% 58%, #fffaf0 58%);
}
.el-domacica img { width: 92%; height: 92%; }
.el-dora {
  /* Dorina bomba: temna krogla z mavričnim obročem, utripa; drugačna od vseh ploščic */
  border-radius: 50%;
  background:
    radial-gradient(ellipse 40% 24% at 38% 20%, rgba(255,255,255,.55), rgba(255,255,255,0) 72%),
    radial-gradient(circle at 50% 45%, #3a1a5e 0 45%, #14082a 70%);
  box-shadow: 0 0 0 0.55cqw #fff, 0 0 0 1.1cqw #ff2d87, 0 0 3cqw 0.6cqw #ffd23f;
  animation: bomba-utrip .9s ease-in-out infinite;
}
.el-dora::before {
  content: ''; position: absolute; inset: -9%; border-radius: 50%; z-index: -1;
  background: conic-gradient(#ff2d87, #ffd23f, #19d46a, #00b4ff, #8f4dff, #ff2d87);
  animation: bomba-obroc 1.6s linear infinite;
}
.el-dora::after { display: none; }
@keyframes bomba-utrip { 50% { transform: scale(1.1); } }
@keyframes bomba-obroc { to { transform: rotate(360deg); } }
.ploscica.dora .strela { font-size: 5.5cqw; right: -4%; top: -10%; z-index: 2; }
.ploscica.polni .element { animation: polni .26s ease-in forwards; }
@keyframes polni { to { transform: scale(1.55) rotate(12deg); box-shadow: 0 0 0 0.8cqw #fff, 0 0 6cqw 2cqw #ffd23f; } }

.ploscica.izbrana .element { animation: izbrana .7s ease-in-out infinite; }
.ploscica.izbrana::before {
  content: ""; position: absolute; inset: 2%; border-radius: 26%;
  box-shadow: 0 0 0 0.6cqw #fff, 0 0 2cqw #fff;
}
@keyframes izbrana { 50% { transform: scale(1.12); } }
.ploscica.namig .element { animation: namig 1s ease-in-out infinite; box-shadow: 0 0 0 3px #fff, 0 0 14px 4px rgba(255,255,255,.9); }
@keyframes namig { 50% { transform: scale(1.14) rotate(7deg); } }
.ploscica.ne .element { animation: ne .3s; }
@keyframes ne { 25% { translate: -6% 0; } 75% { translate: 6% 0; } }
.ploscica.pok .element { animation: pok .26s forwards; }
@keyframes pok { 35% { transform: scale(1.35); box-shadow: 0 0 0 0.9cqw #fff, 0 0 3cqw #fff; } 100% { transform: scale(0) rotate(25deg); opacity: 0; } }
.ploscica.nova .element { animation: nova .45s; }
@keyframes nova { 0% { transform: scale(0) rotate(-90deg); } 70% { transform: scale(1.3); } }

.strela { position: absolute; right: 0; top: -4%; font-size: 4cqw; animation: iskra .8s ease-in-out infinite; text-shadow: 0 0 4px #fff; }
@keyframes iskra { 50% { transform: scale(1.35); opacity: .6; } }

.laser {
  position: absolute; left: 0; width: 100%; height: 12.5%;
  background: linear-gradient(180deg, transparent 25%, #fff 44%, #ff4f8b 50%, #fff 56%, transparent 75%);
  box-shadow: 0 0 30px #ff4f8b;
  animation: laser .6s ease-out forwards; pointer-events: none; z-index: 2;
}
@keyframes laser { 0% { transform: scaleX(0); } 30% { transform: scaleX(1); } 100% { opacity: 0; transform: scaleY(1.6); } }

.plavajoce {
  position: absolute; left: 50%; top: 42%;
  font-family: var(--naslov); font-size: clamp(40px, 13vw, 60px); white-space: nowrap;
  color: #fff3b0;
  background: linear-gradient(180deg, #fffbe0 10%, #ffd23f 55%, #ff9f1c 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px #8e1048;
  filter: drop-shadow(0 4px 0 #8e1048) drop-shadow(0 8px 12px rgba(0,0,0,.4));
  pointer-events: none; z-index: 3;
  animation: plava 1s ease-out forwards;
}
@keyframes plava {
  0% { transform: translate(-50%, -50%) scale(.3) rotate(-8deg); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1.15) rotate(2deg); opacity: 1; }
  45% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  100% { transform: translate(-50%, -110%) scale(1); opacity: 0; }
}

.navodilo { position: relative; z-index: 1; margin: 14px 0 auto; font-size: 13px; font-weight: 800; opacity: .85; text-align: center; }

/* ---------- Telefon na boku ---------- */

.obrni { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (min-aspect-ratio: 13/10) and (pointer: coarse) {
  .obrni {
    position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 24px;
    padding: 16px; color: #fff; font-size: 16px; font-weight: 800; text-align: left;
    background: linear-gradient(180deg, #2f7fd6 0%, #6a55d9 50%, #c23a8e 100%);
  }
  .obrni img { height: min(70vh, 240px); }
  .obrni p { margin: 0; }
  .obrni-naslov { margin-bottom: 6px !important; font-family: var(--naslov); font-size: 34px; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
}

/* ---------- Zaslon zmage ---------- */

.zmaga {
  position: fixed; inset: 0; z-index: 25; overflow: hidden;
  display: none; flex-direction: column; align-items: center;
  /* vse na enem zaslonu: lik zavzame, kar ostane, gumbi so vedno spodaj vidni */
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #3aa0ff 0%, #8f7bff 45%, #ff7ac6 100%);
  text-align: center;
}
.zmaga.odprto { display: flex; }
.zmaga::before {
  content: ""; position: absolute; left: 50%; top: 36%; width: 900px; height: 900px; translate: -50% -50%;
  background: repeating-conic-gradient(rgba(255,255,255,.14) 0 10deg, rgba(255,255,255,0) 10deg 20deg);
  animation: zarki 30s linear infinite; pointer-events: none;
}
@keyframes zarki { to { rotate: 360deg; } }
.zmaga > * { position: relative; }
.zmaga-naslov {
  margin: 0; font-family: var(--naslov); font-weight: 800; font-size: clamp(30px, 8.6vw, 52px); line-height: 1.02;
  text-shadow: 0 3px 0 #8e1048, 0 6px 0 #5e0a30, 0 12px 20px rgba(0,0,0,.3);
  animation: vskok .6s cubic-bezier(.3,1.6,.5,1) both;
}
.zmaga-pod { margin: 6px 0 0; font-size: 19px; font-weight: 900; text-shadow: 0 2px 4px rgba(0,0,0,.25); }
.zmaga-zvezdice { display: flex; gap: 4px; margin: 4px 0 2px; align-items: flex-end; }
.zmaga-zvezdice span {
  font-size: clamp(40px, 7vh, 60px); line-height: 1; color: rgba(255,255,255,.35);
  text-shadow: 0 4px 0 rgba(0,0,0,.12);
}
.zmaga-zvezdice span:nth-child(2) { font-size: clamp(52px, 9vh, 78px); }
.zmaga-zvezdice span.polna {
  color: var(--rumena);
  text-shadow: 0 4px 0 #c77d00, 0 0 24px rgba(255,236,150,.9);
  animation: zvezda .55s cubic-bezier(.3,1.8,.5,1) both;
}
@keyframes zvezda { from { transform: scale(0) rotate(-180deg); } }
.zmaga-tocke { font-family: var(--naslov); font-size: 24px; text-shadow: 0 2px 0 rgba(0,0,0,.2); }
.zmaga-tocke small { display: block; font-family: var(--besedilo); font-size: 14px; font-weight: 800; opacity: .9; }
.zmaga-gumbi { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; width: min(100%, 320px); }
.zmaga-gumbi button { font-size: 20px; padding: 11px 16px; }
.zmaga-vrsta { display: flex; gap: 10px; }
.zmaga .zmaga-vrsta button { flex: 1; font-size: 17px; padding: 9px 8px; white-space: nowrap; }
.zmaga-lik {
  /* junak proslave na sredini: zavzame preostali prostor med naslovom in točkami */
  position: relative; flex: 1 1 0; min-height: 90px; width: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 110px; line-height: 1; filter: drop-shadow(0 10px 20px rgba(0,0,0,.3));
  animation: lik-gor .7s cubic-bezier(.3,1.5,.5,1) .3s both;
}
.zmaga-lik > span { height: 100%; max-height: 260px; aspect-ratio: 1; display: grid; place-items: center; }
.zmaga-lik img { width: 100%; height: 100%; object-fit: contain; display: block; }
.zmaga-lik.stoja > * { display: inline-block; animation: stoja 1.4s ease-in-out 1s both; }
@keyframes stoja { 0% { transform: rotate(0); } 60% { transform: rotate(200deg); } 100% { transform: rotate(180deg); } }
.zmaga-lik.sij > * { display: inline-block; animation: sij 1s ease-in-out infinite; }
.zmaga-lik.skok > * { display: inline-block; animation: skok .9s ease-in-out infinite; }
@keyframes skok { 50% { transform: translateY(-14px) rotate(-3deg); } }
@keyframes sij { 50% { transform: scale(1.12); filter: drop-shadow(0 0 30px #ffd60a); } }
@keyframes lik-gor { from { transform: scale(.2); opacity: 0; } }
.zmaga-lik.koncert > span { transform-origin: 50% 92%; animation: koncert 1.2s ease-in-out infinite; }
@keyframes koncert { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .zmaga-lik.koncert, .zmaga-lik.koncert > span { animation: none; } }
@keyframes vskok { from { transform: scale(.3); opacity: 0; } }

.konfeti { position: absolute; inset: 0; pointer-events: none; }
.konfeti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px;
  animation: konfet var(--t) linear var(--z) infinite;
}
@keyframes konfet { to { transform: translate(var(--x), 110dvh) rotate(720deg); } }

/* ---------- Okno ---------- */

.okno {
  position: fixed; inset: 0; z-index: 30;
  display: none; place-items: center; padding: 16px;
  background: rgba(10, 30, 60, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.okno.odprto { display: grid; }
.okno-kartica {
  position: relative;
  width: min(100%, 380px); text-align: center; color: #7a1f45;
  padding: 30px 22px 24px; border-radius: 30px;
  background: linear-gradient(180deg, #fffdf6, var(--krema));
  border: 5px solid #fff;
  box-shadow: 0 0 0 5px var(--turkizna), 0 8px 0 5px #0b6c7c, 0 24px 50px rgba(0,0,0,.4);
  animation: vskok .35s cubic-bezier(.3,1.5,.5,1);
}
.okno-kartica h2 {
  margin: 0 0 8px; font-family: var(--naslov); font-weight: 800; font-size: 36px; color: var(--koral);
  text-shadow: 0 3px 0 var(--koral-temna);
}
.okno-kartica p { margin: 10px 0 22px; font-size: 18px; font-weight: 800; line-height: 1.45; }
.okno-kartica p b { font-family: var(--naslov); font-weight: 800; font-size: 22px; color: #0b6c7c; }
.okno-zvezdice { font-size: 46px; color: #e9dcc9; letter-spacing: 4px; }
.okno-zvezdice:empty { display: none; }
.okno-zvezdice .polna { color: var(--rumena); text-shadow: 0 3px 0 #c77d00; }
.okno-gumbi { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.okno-gumbi button { width: 100%; padding: 14px 20px; }
.okno-zapri {
  position: absolute; top: -16px; right: -16px; width: 46px; height: 46px; padding: 0;
  font-family: var(--besedilo); font-size: 22px; font-weight: 900;
  background: linear-gradient(180deg, #ff8a8a, #ff3b3b 55%, #c41d1d);
  box-shadow: 0 4px 0 #8f1010, 0 6px 12px rgba(0,0,0,.3);
}
.okno-zapri::after { top: 3px; }

/* ---------- Dinamika na plošči ---------- */

.iskrica {
  position: absolute; z-index: 3; width: var(--v); height: var(--v); margin: calc(var(--v) / -2) 0 0 calc(var(--v) / -2);
  border-radius: 50%; background: var(--b); box-shadow: 0 0 6px var(--b);
  pointer-events: none; animation: razlet .65s cubic-bezier(.2, .7, .3, 1) forwards;
}
.iskrica.bela { background: #fff; box-shadow: 0 0 8px #fff; border-radius: 2px; rotate: 45deg; }
@keyframes razlet {
  0% { transform: translate(0, 0) scale(1.4); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}
.tocke-plava {
  position: absolute; z-index: 4; translate: -50% -50%;
  font-family: var(--naslov); font-size: clamp(18px, 5.5vw, 28px); color: #fff;
  -webkit-text-stroke: 1.5px #8e1048; text-shadow: 0 2px 0 #8e1048, 0 4px 8px rgba(0,0,0,.4);
  pointer-events: none; animation: tocke-gor 1s ease-out forwards;
}
@keyframes tocke-gor {
  0% { transform: translateY(0) scale(.4); opacity: 0; }
  20% { transform: translateY(-10px) scale(1.25); opacity: 1; }
  100% { transform: translateY(-60px) scale(1); opacity: 0; }
}
.tresi { animation: tresi .35s; }
.tresi-mocno { animation: tresi-mocno .5s; }
@keyframes tresi { 20% { translate: -4px 2px; } 40% { translate: 4px -2px; } 60% { translate: -3px -1px; } 80% { translate: 2px 1px; } }
@keyframes tresi-mocno {
  10% { translate: -9px 4px; rotate: -1deg; } 25% { translate: 8px -5px; rotate: 1deg; } 40% { translate: -7px -3px; }
  55% { translate: 6px 4px; } 70% { translate: -4px 2px; } 85% { translate: 2px -1px; }
}
.blisk {
  position: fixed; inset: 0; z-index: 20; pointer-events: none;
  background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.95), rgba(255,210,63,.6) 40%, rgba(255,79,139,0) 75%);
  animation: blisk .45s ease-out forwards;
}
@keyframes blisk { from { opacity: 1; } to { opacity: 0; } }

/* HUD */
.hud-poteze.malo b { color: #e8173a; animation: malo .6s ease-in-out infinite; display: inline-block; }
@keyframes malo { 50% { transform: scale(1.25); } }
.hud b.bump { animation: bump .25s ease-out; display: inline-block; }
@keyframes bump { 40% { transform: scale(1.35); } }
.napredek-zvezda { transition: color .2s; color: #d8cbb6; }
.napredek-zvezda.dosezena { color: var(--rumena); animation: zvezda-hud .6s cubic-bezier(.3,1.8,.5,1); }
@keyframes zvezda-hud { 0% { transform: translate(-50%, -50%) scale(.3); } 60% { transform: translate(-50%, -50%) scale(1.8) rotate(20deg); } 100% { transform: translate(-50%, -50%) scale(1); } }
.zmaga-zvezdice span.polna::after {
  content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,170,.9), rgba(255,240,170,0) 60%);
  animation: zvezda-sij .7s ease-out forwards; pointer-events: none;
}
.zmaga-zvezdice span { position: relative; }
@keyframes zvezda-sij { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
button { transition: transform .12s cubic-bezier(.3,1.6,.5,1), box-shadow .1s; }
button:active { transform: translateY(3px) scale(.96); }
#zmaga-naprej { animation: vabi 1.4s ease-in-out 1.6s infinite; }
@keyframes vabi { 50% { transform: scale(1.06); } }

/* ---------- Intro stopnje ---------- */
.intro {
  position: absolute; z-index: 5; left: 50%; top: 42%; translate: -50% -50%;
  display: none; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 34px; border-radius: 26px; pointer-events: none;
  background: linear-gradient(180deg, #fffdf6, var(--krema)); color: #7a1f45;
  box-shadow: 0 0 0 5px var(--turkizna), 0 8px 0 5px #0b6c7c, 0 24px 50px rgba(0,0,0,.4);
}
.intro.tece { display: flex; animation: intro 1.6s cubic-bezier(.3,1.5,.5,1) forwards; }
.intro b { font-family: var(--naslov); font-size: 40px; color: var(--koral); text-shadow: 0 3px 0 var(--koral-temna); }
.intro small { font-size: 17px; font-weight: 900; }
@keyframes intro {
  0% { scale: .2; opacity: 0; rotate: -8deg; }
  18% { scale: 1.08; opacity: 1; rotate: 2deg; }
  28% { scale: 1; rotate: 0deg; }
  80% { scale: 1; opacity: 1; translate: -50% -50%; }
  100% { scale: .6; opacity: 0; translate: -50% -140%; }
}
.plavajoce { rotate: var(--rot, 0deg); }
.plavajoce.vroce {
  background: linear-gradient(180deg, #ffffff 5%, #8ff0ff 45%, #3a86ff 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 2px #1d3c8f;
  filter: drop-shadow(0 4px 0 #1d3c8f) drop-shadow(0 8px 12px rgba(0,0,0,.4));
}
.plavajoce.roza {
  background: linear-gradient(180deg, #ffffff 5%, #ffb3d9 45%, #ff4fa3 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 2px #7a1f45;
  filter: drop-shadow(0 4px 0 #7a1f45) drop-shadow(0 8px 12px rgba(0,0,0,.4));
}

/* ---------- Lestvica (karta raziskovalke) ---------- */

.lestvica-gumb { display: block; margin: 14px auto 0; padding: 10px 28px; font-size: 20px; }
button.pokal {
  flex: none; white-space: nowrap; padding: 6px 14px 7px; font-size: 16px; border-width: 2px;
  background: linear-gradient(180deg, #ffe27a, var(--rumena) 55%, #e0a800);
  color: #6b3a12; text-shadow: 0 1px 0 rgba(255,255,255,.5);
  box-shadow: 0 4px 0 #b07d00, 0 6px 12px rgba(0,0,0,.25);
}
button.pokal:active { box-shadow: 0 1px 0 #b07d00; }
button.pokal small { font-family: var(--besedilo); font-size: 13px; font-weight: 900; opacity: .85; margin-left: 2px; }
.moj-rezultat { margin: -8px 0 16px; font-size: 15px; font-weight: 900; color: #0b6c7c; }
.razmik { flex: 1; }
#zaslon-lestvica {
  padding: max(10px, env(safe-area-inset-top)) 14px 16px; overflow-y: auto;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.18) 0 40px, transparent 41px),
    radial-gradient(circle at 85% 70%, rgba(255,255,255,.12) 0 60px, transparent 61px),
    linear-gradient(180deg, #62c6f5 0%, #4fb06a 100%);
}
#zaslon-lestvica .vrstica { padding: 0 0 8px; }
.lestvica-karta {
  position: relative; width: min(100%, 440px); margin: 92px auto 20px; padding: 70px 16px 18px;
  color: #6b3a12; text-align: center; border-radius: 26px;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(160,110,50,.06) 22px 23px),
    linear-gradient(180deg, #fff3cf, #f6dfa6);
  border: 4px solid #fff8e4;
  box-shadow: 0 0 0 4px #c98a3c, 0 8px 0 4px #8f5a1c, 0 22px 44px rgba(0,0,0,.3);
}
.dora-lestvica {
  position: absolute; left: 0; right: 0; margin: 0 auto; top: -112px; height: 170px;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); animation: dora-vstop 2.4s ease-in-out infinite;
}
.lestvica-karta .explora { margin: 0; }
.lestvica-karta .explora span { font-size: 38px; -webkit-text-stroke: 1.5px #6b3a12; }
.lestvica-pod { margin: 4px 0 14px; font-weight: 800; font-size: 15px; }
.lestvica-seznam { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.lestvica-seznam li {
  display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 16px; background: rgba(255,255,255,.7);
  box-shadow: 0 3px 0 rgba(143,90,28,.25);
  animation: vrstica-noter .45s cubic-bezier(.3,1.5,.5,1) backwards;
}
@keyframes vrstica-noter { from { opacity: 0; transform: translateX(-30px) scale(.9); } }
.lestvica-seznam .mesto { font-family: var(--naslov); font-size: 22px; text-align: center; color: #c98a3c; }
.lestvica-seznam .kdo { font-weight: 900; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lestvica-seznam .kdo small { display: block; font-weight: 800; font-size: 12px; opacity: .7; }
.lestvica-seznam .rezultat { text-align: right; font-family: var(--naslov); font-size: 18px; line-height: 1.1; }
.lestvica-seznam .rezultat b { color: #e0a800; text-shadow: 0 2px 0 #8f5a1c33; }
.lestvica-seznam .rezultat small { display: block; font-family: var(--besedilo); font-weight: 800; font-size: 12px; opacity: .7; }
.lestvica-seznam li.jaz { background: linear-gradient(90deg, #ffd1e6, #fff); box-shadow: 0 0 0 3px var(--koral), 0 3px 0 var(--koral-temna); }
.lestvica-seznam li.prvi { background: linear-gradient(90deg, #fff1a8, #fff); }
.lestvica-opomba { margin: 12px 0 0; font-size: 13px; font-weight: 800; opacity: .75; }
.lestvica-opomba:empty { display: none; }

/* ---------- Dan in noč ---------- */

button.dan-noc {
  position: relative; width: 66px; height: 36px; padding: 0; margin-right: 8px; border: 2px solid #fff;
  border-radius: 999px; overflow: hidden; font-size: 18px;
  background: linear-gradient(180deg, #8fd8ff, #4fb8f0);
  box-shadow: 0 4px 0 rgba(0,0,0,.15), 0 6px 14px rgba(0,0,0,.2);
  transition: background .4s;
}
button.dan-noc::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; right: auto;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25);
  transition: transform .35s cubic-bezier(.3,1.5,.5,1);
}
button.dan-noc span { position: absolute; top: 50%; translate: 0 -50%; line-height: 1; z-index: 1; transition: opacity .3s; }
.ikona-sonce { left: 6px; }
.ikona-luna { right: 6px; opacity: .5; }
body.noc button.dan-noc { background: linear-gradient(180deg, #2b3a67, #121a3a); }
body.noc button.dan-noc::after { transform: translateX(30px); }
body.noc .ikona-sonce { opacity: .5; }
body.noc .ikona-luna { opacity: 1; }

.nebo-sonce {
  position: absolute; top: 74px; right: 26px; width: 74px; height: 74px; border-radius: 50%;
  background: radial-gradient(circle, #fff7b0 0 40%, #ffd23f 62%, #ffb300 100%);
  box-shadow: 0 0 0 10px rgba(255,226,90,.25), 0 0 50px 16px rgba(255,214,60,.55);
  animation: sonce-sij 4s ease-in-out infinite;
}
.nebo-sonce::before {
  content: ""; position: absolute; inset: -26px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255,220,80,.5) 0 8deg, transparent 8deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 46%, #000 48%, #000 66%, transparent 70%);
  mask: radial-gradient(circle, transparent 46%, #000 48%, #000 66%, transparent 70%);
  animation: vrti 30s linear infinite;
}
@keyframes sonce-sij { 50% { box-shadow: 0 0 0 14px rgba(255,226,90,.2), 0 0 64px 22px rgba(255,214,60,.6); } }
@keyframes vrti { to { rotate: 360deg; } }
.nebo-luna, .nebo-zvezde { display: none; }
.svet3d { transition: background .6s; }
body.noc .svet3d { background: linear-gradient(180deg, #0b1030 0%, #1b2557 40%, #2c3a72 56%, #1b2547 100%); }
body.noc .nebo-sonce { display: none; }
/* krajec: senca kroga, iz katere je izrezan sam krog */
body.noc .nebo-luna {
  display: block; position: absolute; top: 70px; right: 54px; width: 56px; height: 56px; border-radius: 50%;
  box-shadow: 16px 8px 0 0 #fff1b8;
  filter: drop-shadow(0 0 10px rgba(255, 240, 180, .65)) drop-shadow(0 0 26px rgba(255, 240, 180, .35));
  rotate: -18deg;
  animation: luna 6s ease-in-out infinite;
}
@keyframes luna { 50% { translate: 0 -4px; } }
body.noc .nebo-zvezde {
  display: block; position: absolute; inset: 0 0 45% 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 28% 8%, #fff, transparent),
    radial-gradient(2px 2px at 44% 22%, #fff, transparent), radial-gradient(1.5px 1.5px at 58% 12%, #fff, transparent),
    radial-gradient(2px 2px at 70% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 86% 36%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 8% 40%, #fff, transparent), radial-gradient(2px 2px at 36% 44%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 52% 38%, #fff, transparent), radial-gradient(2px 2px at 94% 14%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 64% 4%, #fff, transparent);
  animation: zvezde 3s ease-in-out infinite;
}
@keyframes zvezde { 50% { opacity: .55; } }
body.noc .oblaki span { opacity: .18; }

button.majhen:active { box-shadow: 0 1px 0 #0b6c7c; }

/* hitrost: ploščice in padajoče stvari na svojih plasteh (animira jih samo grafični čip) */
.ploscica, .drop { will-change: transform; }
#zaslon-vstop .explora span { -webkit-text-stroke: 4px #5c1233; paint-order: stroke fill; }
button.povezava.domaci { display: block; margin: 14px auto 0; font-size: 15px; }

/* podnapis kombinacije pod velikim napisom */
.plavajoce-pod {
  position: absolute; left: 50%; top: calc(42% + clamp(34px, 10vw, 48px)); translate: -50% 0;
  padding: 3px 12px; border-radius: 999px; background: #8e1048; color: #fff;
  font-family: var(--naslov); font-size: 18px; white-space: nowrap;
  pointer-events: none; z-index: 3; animation: plava-pod 1s ease-out forwards;
}
@keyframes plava-pod { 0% { opacity: 0; scale: .5; } 25% { opacity: 1; scale: 1.1; } 45% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }

/* deli rezultat: bel gumb s temnim robom, viden na modro-roza ozadju zmage */
button.deli {
  background: #fff; color: #0b6c7c; border: 3px solid #0b6c7c;
  box-shadow: 0 4px 0 #0b6c7c, 0 6px 12px rgba(0,0,0,.2); text-shadow: none; font-size: 18px; padding: 10px 18px;
}
button.deli:active { box-shadow: 0 1px 0 #0b6c7c; }

/* ploščice, ki jih zadene Dorina strela, odletijo */
.ploscica.leti { z-index: 3; animation: leti .5s cubic-bezier(.2, .6, .4, 1) forwards; }
@keyframes leti { to { transform: translate(var(--lx), var(--ly)) rotate(var(--lr)) scale(.3); opacity: 0; } }
.ploscica.leti .element { box-shadow: 0 0 0 0.8cqw #fff, 0 0 3cqw #ffd23f; }
/* navpični laser in udarni val */
.laser.navpicni {
  top: 0; width: 12.5%; height: 100%;
  background: linear-gradient(90deg, transparent 25%, #fff 44%, #00b4ff 50%, #fff 56%, transparent 75%);
  box-shadow: 0 0 30px #00b4ff; animation-name: laser-n;
}
@keyframes laser-n { 0% { transform: scaleY(0); } 30% { transform: scaleY(1); } 100% { opacity: 0; transform: scaleX(1.6); } }
.val {
  position: absolute; z-index: 3; width: 12.5%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  border: 0.8cqw solid #fff; pointer-events: none; animation: val .45s ease-out forwards;
}
.val.velik { border-width: 1.6cqw; border-color: #ffd23f; box-shadow: 0 0 4cqw #ff2d87, inset 0 0 3cqw #fff; animation: val-velik .7s ease-out forwards; }
@keyframes val { from { transform: scale(.4); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
@keyframes val-velik { from { transform: scale(.3); opacity: 1; } to { transform: scale(9); opacity: 0; } }

/* Laserska Dora: turkizen žeton, oči in vrteči se obroč. */
.el-dora-laser {
  border-radius: 50%;
  background: radial-gradient(circle at 45% 35%, #155b65, #10233f 70%);
  box-shadow: 0 0 0 .45cqw #fff, 0 0 0 .95cqw #4df6df, 0 0 2.5cqw #4df6df;
  animation: laser-dih 1.5s ease-in-out infinite;
}
.el-dora-laser img { width: 100%; height: 100%; }
.el-dora-laser::before {
  content: ''; position: absolute; inset: -13%; border: .65cqw dashed #c3fff7;
  border-radius: 50%; animation: bomba-obroc 4s linear infinite;
}
.el-dora-laser::after { display: none; }
@keyframes laser-dih { 50% { transform: scale(1.07); } }
.ploscica.vrti { z-index: 9; }
.ploscica.vrti .element { animation: none; transform: scale(1.45); }
.ploscica.vrti .strela { display: none; }
.laser-vrtinec { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 8; pointer-events: none; }
.laser-vrtinec path { fill: none; stroke-linecap: round; stroke-dasharray: 1 1; }
.laser-jezik-rob { stroke: #4df6df; stroke-width: 13; opacity: .4; }
.laser-jezik { stroke: #ff5aa7; stroke-width: 7; }
.laser-jezik-jedro { stroke: #eaffff; stroke-width: 2.5; }
.plavajoce.laser-obvestilo { top: 10%; font-size: clamp(24px, 8vw, 38px); }
.plavajoce-pod.laser-obvestilo { top: calc(10% + 32px); font-size: 13px; }
.ploscica.laser-zadeta .element { animation: laser-zadetek .3s ease-out forwards; }
@keyframes laser-zadetek {
  25% { transform: scale(1.3); box-shadow: 0 0 0 .7cqw #4df6df, 0 0 3cqw #fff; }
  100% { transform: scale(0) rotate(100deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .el-dora-laser, .el-dora-laser::before { animation: none; }
  .ploscica.vrti img { transform: none !important; }
  .ploscica.laser-zadeta .element { animation-duration: .1s; }
}
