/* Hra „Staň sa porotcom“ (/porotca/) – herná scéna: pódium, podstavec so súťažiacim, porotca zozadu, plávajúce ovládanie. */
:root {
  --ink: #0c0b0f; --bone: #f2ece2; --signal: #ff4b1f; --signal-2: #b8300e; --gold: #e9b84f;
  --panel: rgba(12, 11, 15, .72); --panel-line: rgba(233, 184, 79, .35);
  --f-display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-sans: 'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--bone); font-family: var(--f-sans); overflow: hidden; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.hra-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- scéna ---------- */
.scena { position: fixed; inset: 0; overflow: hidden; background: #120b0c url('/assets/porotca/podium-2400.webp') center 35% / cover no-repeat; }
.scena::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 52% 60%, transparent 35%, rgba(6, 4, 6, .55) 100%), linear-gradient(to top, rgba(8, 6, 8, .65), transparent 30%); }
.scena.is-uvod::after { background: rgba(8, 6, 8, .78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.stojan { position: absolute; left: 52%; bottom: 5vh; width: min(52vh, 44vw); transform: translateX(-50%); z-index: 2; }
.stojan__podstavec { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 2.2vh rgba(255, 75, 31, .45)); animation: hra-pulz 3.6s ease-in-out infinite; }
/* Stred cez okraje, nie translateX(-50 %): Safari na iPhone si percentá v bežiacej animácii prepočíta raz, keď obrázok ešte nie je načítaný
   (šírka 0), a postava potom stojí o polovicu svojej šírky vpravo. V animácii a transforme tejto postavy preto nikdy nepoužívaj percentá.
   left/right −50 %: okraje sa dajú vyrovnať aj pri postave širšej než podstavec. */
.stojan__postava { position: absolute; left: -50%; right: -50%; margin: 0 auto; bottom: 46%; height: 64vh; width: auto; max-width: none;
  transform-origin: 50% 100%; filter: drop-shadow(0 0 calc(1vh + var(--hlas, 0) * 3vh) rgba(255, 190, 120, calc(.25 + var(--hlas, 0) * .6)));
  animation: hra-vznasa 3.4s ease-in-out infinite alternate; transition: opacity .28s ease, translate .38s cubic-bezier(.2, .8, .2, 1); }
.stojan__postava.is-von-vlavo { opacity: 0; translate: -38vh 0; }
.stojan__postava.is-von-vpravo { opacity: 0; translate: 38vh 0; }
.stojan__postava.is-spieva { scale: calc(1 + var(--hlas, 0) * .018); }
@keyframes hra-vznasa { from { transform: translateY(0); } to { transform: translateY(-1.1vh); } }
@keyframes hra-pulz { 0%, 100% { filter: drop-shadow(0 0 1.6vh rgba(255, 75, 31, .35)); } 50% { filter: drop-shadow(0 0 3.2vh rgba(255, 120, 60, .65)); } }

.porotca-zozadu { position: absolute; left: 0; bottom: -8vh; height: 62vh; width: auto; z-index: 3; pointer-events: none;
  filter: drop-shadow(0 0 2vh rgba(0, 0, 0, .6)); }

/* plávajúce ovládanie */
.vzduch { position: absolute; z-index: 4; display: grid; place-items: center; border: 0; cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent; }
.vzduch:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
/* pod súťažiacim na prednej hrane podstavca (podstavec 900×590, chodidlá na 46 % jeho výšky), vždy nad prehrávačom (2,2vh + 64px) */
.hrat { left: 52%; top: auto; bottom: max(calc(2.2vh + 116px), calc(5vh + min(52vh, 44vw) * .15)); width: 88px; height: 88px; transform: translate(-50%, 50%);
  background: radial-gradient(circle at 35% 30%, #ff8a5c, var(--signal) 55%, var(--signal-2)); color: #fff;
  box-shadow: 0 0 0 6px rgba(255, 75, 31, .22), 0 0 46px rgba(255, 75, 31, .7), inset 0 -6px 14px rgba(0, 0, 0, .25);
  animation: hra-pluje 3s ease-in-out infinite alternate; }
.hrat svg { width: 38px; height: 38px; margin-left: 6px; }
.hrat.is-hra svg { margin-left: 0; }
.hrat:hover { filter: brightness(1.08); }
@keyframes hra-pluje { from { translate: 0 -.6vh; } to { translate: 0 .9vh; } }
.sipka { top: 47%; width: 72px; height: 72px; transform: translate(-50%, -50%); background: rgba(12, 11, 15, .55);
  border: 2px solid rgba(242, 236, 226, .55); box-shadow: 0 0 26px rgba(255, 75, 31, .35); color: var(--bone); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: hra-pluje 2.6s ease-in-out infinite alternate; }
.sipka svg { width: 30px; height: 30px; }
.sipka:hover { border-color: var(--gold); color: var(--gold); }
.sipka--vlavo { left: calc(52% - min(26vh, 22vw)); }
.sipka--vpravo { left: calc(52% + min(26vh, 22vw)); animation-delay: -1.3s; }
.hodnotit { display: none; }   /* len na mobile – na počítači je hodnotenie stále vpravo */

/* ---------- HUD ---------- */
.hud { position: absolute; z-index: 5; }
.hud--meno { left: 2.4vw; top: 2.6vh; max-width: min(560px, 46vw); padding: 14px 22px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hud__meno { margin: 0; font: 800 clamp(30px, 4.6vh, 52px)/1 var(--f-display); letter-spacing: .02em; text-transform: uppercase; }
.hud__meno small { font: italic 400 clamp(20px, 2.8vh, 30px)/1 var(--f-serif); text-transform: none; color: var(--gold); letter-spacing: 0; margin-left: .3em; }
.hud__piesen { margin: 8px 0 0; font-size: clamp(14px, 1.9vh, 19px); color: rgba(242, 236, 226, .9); }
.hud__piesen b { color: var(--bone); }
.hud__kat { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; font: 600 12px/1.4 var(--f-sans); letter-spacing: .12em; text-transform: uppercase; background: rgba(233, 184, 79, .16); color: var(--gold); }
.hud--stav { right: calc(2.4vw + 240px); top: 2.6vh; display: flex; gap: 10px; align-items: center; }   /* vedľa .hud--von (230 px) */
/* odchod z hry na web (vždy viditeľný, aj na úvode) */
.hud--von { right: 2.4vw; top: 2.6vh; z-index: 12; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; width: 230px; height: 46px; padding: 0 8px 0 16px; border-radius: 12px;
  border: 1px solid var(--panel-line); background: var(--panel); color: var(--bone); text-decoration: none; font-weight: 600; font-size: 15px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hud--von svg { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: rgba(242, 236, 226, .12); }
.hud--von:hover { border-color: var(--gold); color: var(--gold); }
.hud--von:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.hud__cislo { padding: 10px 16px; border-radius: 12px; background: var(--panel); font: 800 26px/1 var(--f-display); letter-spacing: .04em; }
.hud__btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--panel-line); background: var(--panel); cursor: pointer; font-weight: 600; font-size: 15px; }
.hud__btn:hover { border-color: var(--gold); color: var(--gold); }
.hud__btn svg { width: 18px; height: 18px; }
.hud--logo { left: 2.4vw; bottom: 2vh; z-index: 4; text-shadow: 0 1px 10px rgba(0, 0, 0, .9); font: 800 18px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; color: rgba(242, 236, 226, .75); text-decoration: none; }

/* prehrávač (vlna) */
.prehravac { position: absolute; left: 50%; bottom: 2.2vh; z-index: 5; width: min(640px, 52vw); transform: translateX(-38%); display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity .3s ease; }
.prehravac.is-skryty { opacity: 0; pointer-events: none; }
.prehravac__vlna { flex: 1; min-width: 0; height: 42px; }
.prehravac__cas { font: 700 14px/1 var(--f-sans); font-variant-numeric: tabular-nums; color: rgba(242, 236, 226, .85); white-space: nowrap; }

/* ---------- hodnotenie ---------- */
.hodnotenie { position: absolute; right: 2.4vw; top: 50%; z-index: 6; width: min(380px, 30vw); max-height: 92vh; overflow: auto; transform: translateY(-46%);
  padding: 20px 22px 22px; border-radius: 18px; background: rgba(12, 11, 15, .8); border: 1px solid var(--panel-line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hodnotenie__hlava { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hodnotenie h2 { margin: 0 0 4px; font: 800 26px/1.05 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.hodnotenie__zavriet { display: none; flex: none; place-items: center; width: 40px; height: 40px; margin: -6px -6px 0 0; padding: 9px; border: 0; border-radius: 50%; background: rgba(242, 236, 226, .1); cursor: pointer; }
.hodnotenie__zavriet svg { width: 100%; height: 100%; }
.hodnotenie .hodnotenie__bez { display: none; }   /* .tlacidlo by ho inak zobrazilo */
.hodnotenie.is-pred-odchodom .hodnotenie__bez { display: inline-flex; }
.hodnotenie__uvod { margin: 0 0 14px; font: italic 400 19px/1.25 var(--f-serif); color: var(--gold); }
.otazka { margin: 0 0 12px; }
.otazka__text { margin: 0 0 4px; font-weight: 600; font-size: 15px; }
.hviezdy { display: flex; gap: 4px; }
.hviezda { width: 44px; height: 44px; padding: 4px; border: 0; background: none; cursor: pointer; color: rgba(242, 236, 226, .28); transition: transform .12s ease, color .12s ease; -webkit-tap-highlight-color: transparent; }
.hviezda svg { width: 100%; height: 100%; display: block; }
.hviezda.is-zapnuta { color: var(--gold); filter: drop-shadow(0 0 8px rgba(233, 184, 79, .55)); }
.hviezda:hover { transform: scale(1.12); }
.hviezda:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-radius: 6px; }
.tlacidlo { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 8px; padding: 14px 18px; border: 0; border-radius: 12px; cursor: pointer;
  font: 800 20px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; background: var(--signal); color: #fff; box-shadow: 0 8px 26px rgba(255, 75, 31, .45); }
.tlacidlo:disabled { background: rgba(242, 236, 226, .14); color: rgba(242, 236, 226, .45); box-shadow: none; cursor: not-allowed; }
.tlacidlo--druhe { background: transparent; border: 1px solid rgba(242, 236, 226, .35); box-shadow: none; }
.hodnotenie__chyba { margin: 8px 0 0; color: #ffb199; font-size: 14px; }

/* odhalenie: ty / porota / verejnosť */
.odhalenie__zhoda { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 12px; }
.odhalenie__zhoda b { font: 800 46px/1 var(--f-display); color: var(--gold); }
.odhalenie__riadok { margin: 0 0 12px; }
.odhalenie__nazov { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.skala { position: relative; height: 10px; border-radius: 5px; background: rgba(242, 236, 226, .12); }
.skala__bod { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translate(-50%, -50%); border: 2px solid var(--ink); }
.skala__bod--ty { background: var(--signal); z-index: 3; }
.skala__bod--porota { background: var(--gold); z-index: 2; }
.skala__bod--verejnost { background: var(--bone); z-index: 1; }
.legenda { display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 10px; font-size: 13px; color: rgba(242, 236, 226, .85); }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.odznak { display: inline-block; margin: 0 0 10px; padding: 5px 12px; border-radius: 999px; background: rgba(233, 184, 79, .18); color: var(--gold); font-weight: 700; font-size: 14px; }

/* ---------- úvod: výber porotcu ---------- */
.uvod { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3vh 4vw; text-align: center; }
.uvod__kicker { margin: 0; font: 600 13px/1.4 var(--f-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.uvod__titul { margin: 6px 0 4px; font: 900 clamp(44px, 9vh, 110px)/.92 var(--f-display); letter-spacing: .01em; text-transform: uppercase; }
.uvod__titul em { font: italic 400 .62em/1 var(--f-serif); text-transform: none; color: var(--gold); }
.uvod__text { max-width: 640px; margin: 8px 0 2.4vh; font-size: clamp(15px, 2vh, 19px); line-height: 1.45; color: rgba(242, 236, 226, .9); }
.vyber { display: flex; gap: 2vw; justify-content: center; align-items: flex-end; flex-wrap: wrap; }
.vyber__karta { position: relative; width: clamp(150px, 19vh, 220px); padding: 0 0 12px; border: 2px solid rgba(242, 236, 226, .16); border-radius: 18px; cursor: pointer;
  background: linear-gradient(to top, rgba(255, 75, 31, .2), rgba(12, 11, 15, .2) 60%); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.vyber__karta img { display: block; height: clamp(190px, 31vh, 330px); width: auto; max-width: 100%; margin: -3vh auto 6px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .5)); transition: transform .25s ease; }
.vyber__karta b { display: block; font: 800 20px/1.05 var(--f-display); letter-spacing: .04em; text-transform: uppercase; }
.vyber__karta span { display: block; margin-top: 3px; font-size: 13px; color: rgba(242, 236, 226, .75); }
.vyber__karta:hover, .vyber__karta.is-vybrany { border-color: var(--gold); transform: translateY(-6px); box-shadow: 0 0 34px rgba(233, 184, 79, .35); }
.vyber__karta.is-vybrany img { transform: scale(1.05); }
.vyber__karta:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.uvod__start { width: auto; min-width: 280px; margin-top: 3vh; font-size: 24px; padding: 18px 34px; }
.uvod__male { margin: 12px 0 0; font-size: 13px; color: rgba(242, 236, 226, .65); }
.uvod__male a, .uvod__vlastnik a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.uvod__vlastnik { margin: 8px 0 0; max-width: 72ch; font-size: 11px; line-height: 1.4; color: rgba(242, 236, 226, .72); }
.uvod__web { margin-top: 14px; font-size: 15px; color: rgba(242, 236, 226, .85); text-decoration: underline; text-underline-offset: 3px; }
.uvod__web:hover { color: var(--gold); }

/* ---------- výsledky (modálne okno) ---------- */
.okno { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 4vh 4vw; background: rgba(6, 4, 6, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.okno[hidden] { display: none; }
.okno__obsah { position: relative; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 28px; border-radius: 20px; background: #15111a; border: 1px solid var(--panel-line); text-align: center; }
.okno__zavriet { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; padding: 9px; border: 0; border-radius: 50%; background: rgba(242, 236, 226, .1); cursor: pointer; }
.okno__zavriet svg { width: 100%; height: 100%; }
.okno__web { margin-top: 4px; font-size: 15px; color: rgba(242, 236, 226, .8); text-decoration: underline; text-underline-offset: 3px; }
.okno__web:hover { color: var(--gold); }
.okno__obsah h2 { margin: 0; font: 900 44px/1 var(--f-display); text-transform: uppercase; }
.okno__velke { display: block; margin: 14px 0 4px; font: 900 96px/1 var(--f-display); color: var(--gold); }
.okno__titul { margin: 0 0 14px; font: italic 400 26px/1.2 var(--f-serif); color: var(--bone); }
.okno__obsah p { color: rgba(242, 236, 226, .85); line-height: 1.5; }
.okno__tlacidla { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- mobil na výšku ---------- */
/* Scéna na celú výšku; zospodu: stav a tlačidlá, vlna, ▶ a „Ohodnotiť“, podstavec. Hodnotenie je vysúvací panel (hra.js). */
@media (max-aspect-ratio: 1/1) {
  .scena { background-image: url('/assets/porotca/podium-mobil.webp'); background-position: center top; }
  /* svh = výška displeja aj s lištami prehliadača (vh na iPhone ráta bez nich a hlava by zašla pod menovku);
     postava stojí na 46 % výšky podstavca = v strede svietiaceho kruhu (ako na počítači) */
  .stojan { left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); width: min(78vw, 40vh); width: min(78vw, 40svh); }
  .stojan__postava { height: min(44vh, 118vw); height: min(42svh, 118vw); bottom: 46%; }
  .porotca-zozadu { left: -16vw; bottom: calc(48px + env(safe-area-inset-bottom)); height: 30vh; height: 30svh; }
  .hrat { left: 50%; top: auto; width: 64px; height: 64px; transform: translate(-50%, 50%);
    bottom: calc(150px + env(safe-area-inset-bottom) + min(78vw, 40vh) * .19); bottom: calc(150px + env(safe-area-inset-bottom) + min(78vw, 40svh) * .19); }
  .hrat svg { width: 30px; height: 30px; margin-left: 4px; }
  .sipka { top: 42vh; top: 42svh; width: 52px; height: 52px; }
  .sipka svg { width: 22px; height: 22px; }
  .sipka--vlavo { left: 9vw; }
  .sipka--vpravo { left: 91vw; }
  .hodnotit { display: inline-flex; position: absolute; z-index: 5; right: 4vw; bottom: calc(128px + env(safe-area-inset-bottom)); align-items: center; gap: 8px;
    padding: 13px 18px 12px; border: 0; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent;
    background: linear-gradient(180deg, #f6cf6f, var(--gold)); color: #2a1d06; font: 800 19px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase;
    box-shadow: 0 0 0 5px rgba(233, 184, 79, .18), 0 10px 30px rgba(233, 184, 79, .4); animation: hra-pluje 3.2s ease-in-out infinite alternate; }
  .hodnotit svg { width: 20px; height: 20px; flex: none; }
  .hodnotit.is-hotovo { background: var(--panel); color: var(--gold); box-shadow: inset 0 0 0 1px var(--panel-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
  .hud--meno { left: 3vw; right: calc(3vw + 54px); top: calc(1.6vh + env(safe-area-inset-top)); max-width: none; padding: 10px 14px 12px; }
  .hud--von { top: calc(1.6vh + env(safe-area-inset-top)); right: 3vw; width: 46px; padding: 0; justify-content: center; }
  .hud--von span { display: none; }
  .uvod .uvod__web { font-size: 14px; }
  .hud__meno { font-size: 30px; }
  .hud__piesen { font-size: 14px; margin-top: 6px; }
  .hud__kat { margin-top: 6px; }
  .hud--stav { top: auto; left: 3vw; right: 3vw; bottom: calc(10px + env(safe-area-inset-bottom)); justify-content: flex-end; gap: 8px; }
  .hud__cislo { margin-right: auto; font-size: 20px; padding: 8px 12px; }
  .hud__btn { padding: 9px 12px; font-size: 14px; }
  .hud--logo { display: none; }
  .prehravac { left: 3vw; right: 3vw; width: auto; bottom: calc(58px + env(safe-area-inset-bottom)); transform: none; padding: 8px 12px; }
  .prehravac__vlna { height: 32px; }
  .hodnotenie { left: 0; right: 0; top: auto; bottom: 0; z-index: 8; width: auto; max-height: 86vh; overflow: auto; overscroll-behavior: contain;
    transform: translateY(105%); visibility: hidden; transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
    border-radius: 20px 20px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -18px 50px rgba(0, 0, 0, .6); }
  .hodnotenie.is-otvorene { transform: none; visibility: visible; transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
  .hodnotenie__zavriet { display: grid; }
  .hodnotenie h2 { font-size: 22px; }
  .hodnotenie__uvod { font-size: 16px; margin-bottom: 8px; }
  .otazka { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
  .otazka__text { font-size: 14px; margin: 0; }
  .hviezda { width: 38px; height: 38px; padding: 3px; }
  .tlacidlo { padding: 13px 14px; font-size: 18px; }
  .uvod { justify-content: flex-start; padding-top: 5vh; overflow: auto; }
  .vyber { gap: 10px; }
  .vyber__karta { width: 42vw; }
  .vyber__karta img { height: 22vh; margin-top: -1.5vh; }
  .uvod__start { min-width: 0; width: 100%; max-width: 420px; }
}
@media (max-aspect-ratio: 1/1) and (max-height: 620px) {   /* malé telefóny (aj s lištami prehliadača) – hlava nesmie zájsť pod menovku */
  .stojan__postava { height: min(38svh, 118vw); }
}
@media (prefers-reduced-motion: reduce) {
  .stojan__postava, .stojan__podstavec, .hrat, .sipka, .hodnotit { animation: none; }
  .stojan__postava { transition: opacity .2s ease; }
}
