@font-face { font-family: 'Jakarta'; src: url('/static/fonts/PlusJakartaSans-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/static/fonts/PlusJakartaSans-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/static/fonts/PlusJakartaSans-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }

:root {
  --zelena: #76B729; --tmava: #387931; --nejtmavsi: #13451E; --akcent: #B8338B;
  --papir: #FBF8F0; --papir2: #F2ECDC; --linka: #E3DCC8; --text: #1F2A22; --sedy: #6B6F63;
  --stin: 0 10px 30px rgba(19, 69, 30, .18);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Jakarta', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text);
  background: #DDE8C8 url('/static/img/kulisa_rybnik.webp') center top / cover fixed no-repeat;
  -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 1.45;
}
button, input, textarea { font: inherit; color: inherit; }
.skryto { display: none !important; }

.aplikace { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); }

/* horní lišta */
.lista { display: flex; align-items: center; gap: 12px; padding: 12px 0 6px; }
.lista .logo { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); display: grid; place-items: center; flex: none; }
.lista .logo img { width: 38px; height: 38px; object-fit: contain; }
.postup { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.75); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.postup i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--zelena), var(--tmava)); border-radius: inherit; transition: width .5s ease; }
.zvuk { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); display: grid; place-items: center; cursor: pointer; flex: none; }
.zvuk svg { width: 22px; height: 22px; stroke: var(--tmava); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* scéna: postava a bublina (jedna postava), nebo obě postavy a bublina nad nimi (úvod) */
.scena { position: relative; height: clamp(200px, 31vh, 270px); display: flex; align-items: flex-end; gap: 6px; margin-top: 2px; }
.postava { position: relative; height: 92%; flex: none; transform-origin: 50% 100%; filter: drop-shadow(0 6px 6px rgba(0,0,0,.18)); }
.postava img { position: absolute; left: 0; top: 0; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.postava .zaklad { position: relative; height: 100%; width: auto; }
.postava .pusa { display: none; }
.scena[data-rezim=zajic] .postava[data-p=zabak], .scena[data-rezim=zabak] .postava[data-p=zajic] { display: none; }
.postava.mluvi { animation: houpani 1.6s ease-in-out infinite; }
.postava.prichod { animation: prichod .45s cubic-bezier(.2,.9,.3,1.2); }
@keyframes houpani { 0%,100% { transform: rotate(0) } 50% { transform: rotate(1.6deg) translateY(-2px) } }
@keyframes prichod { from { transform: translateY(40px) scale(.9); opacity: 0 } to { transform: none; opacity: 1 } }
.bublina { position: relative; align-self: flex-start; margin-top: 8%; background: #fff; border-radius: 18px; padding: 12px 14px; font-weight: 700; font-size: 15px; line-height: 1.35;
  box-shadow: var(--stin); min-height: 48px; flex: 1; opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s; }
.bublina.ukaz { opacity: 1; transform: none; }
.bublina::after { content: ''; position: absolute; top: 60%; left: -9px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }
.scena[data-rezim=zabak] .bublina::after { left: auto; right: -9px; border: 10px solid transparent; border-left-color: #fff; border-right: 0; }
.scena[data-rezim=duo] { justify-content: space-between; }
.scena[data-rezim=duo] .postava { height: 72%; }
.scena[data-rezim=duo] .bublina { position: absolute; top: 0; left: 14%; right: 14%; margin: 0; }
.scena[data-rezim=duo] .bublina::after { top: auto; bottom: -10px; left: 22%; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.scena[data-rezim=duo][data-mluvi=zabak] .bublina::after { left: auto; right: 22%; }

/* karta s otázkou */
.karta { background: var(--papir); border-radius: 24px; box-shadow: var(--stin); padding: 22px 18px 18px; margin-top: -6px; position: relative; z-index: 2; animation: karta .4s ease; }
@keyframes karta { from { transform: translateY(16px); opacity: 0 } to { transform: none; opacity: 1 } }
.karta h1 { font-size: 23px; line-height: 1.2; font-weight: 800; margin: 0 0 6px; color: var(--nejtmavsi); letter-spacing: -.01em; }
.karta h2 { font-size: 16px; margin: 18px 0 8px; font-weight: 700; color: var(--nejtmavsi); }
.karta p { margin: 0 0 12px; }
.napoveda { color: var(--sedy); font-size: 14px; margin: -2px 0 14px; }
.otazka-cislo { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tmava); margin-bottom: 6px; }

/* tlačítka */
.tlacitka { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.btn { appearance: none; border: 0; border-radius: 16px; padding: 16px 20px; font-weight: 800; font-size: 17px; cursor: pointer; min-height: 56px;
  background: var(--zelena); color: #fff; box-shadow: 0 4px 0 var(--tmava); transition: transform .08s, box-shadow .08s, opacity .2s; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tmava); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 var(--tmava); }
.btn.vedlejsi { background: transparent; color: var(--tmava); box-shadow: none; min-height: 44px; padding: 10px; font-weight: 700; font-size: 15px; }
.btn.akcent { background: #fff; color: var(--akcent); border: 2px solid var(--akcent); box-shadow: none; font-size: 15px; min-height: 50px; padding: 12px 16px; text-align: center; text-decoration: none; }
.btn.akcent::before { content: '★ '; }
.odkazy { display: grid; gap: 10px; margin-top: 4px; }
.odkazy .btn.vedlejsi { justify-self: center; }
.zpet { appearance: none; border: 0; background: none; color: var(--sedy); font-weight: 700; font-size: 14px; padding: 8px 0; cursor: pointer; }

/* NPS 0–10 */
.nps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.nps button { aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--linka); background: #fff; font-weight: 800; font-size: 18px; cursor: pointer; transition: transform .12s, background .15s; }
.nps button:active { transform: scale(.94); }
.nps button.vybrano { background: var(--zelena); border-color: var(--tmava); color: #fff; transform: scale(1.06); }
.nps-popisky { display: flex; justify-content: space-between; font-size: 12px; color: var(--sedy); margin-top: 8px; font-weight: 700; }

/* čipy */
.cipy { display: flex; flex-wrap: wrap; gap: 8px; }
.cip { appearance: none; border: 2px solid var(--linka); background: #fff; border-radius: 99px; padding: 10px 14px; font-weight: 700; font-size: 15px; cursor: pointer; min-height: 44px; }
.cip.vybrano { background: #E8F3DA; border-color: var(--zelena); color: var(--nejtmavsi); }
.cip.vybrano::before { content: '✓ '; color: var(--tmava); }

textarea, input[type=text] { width: 100%; border: 2px solid var(--linka); border-radius: 14px; padding: 12px 14px; background: #fff; font-size: 16px; resize: vertical; min-height: 48px; }
textarea { min-height: 96px; }
textarea:focus, input:focus { outline: none; border-color: var(--zelena); }

/* produkty a smajlíci */
.produkt { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 18px; padding: 12px; margin-bottom: 12px; border: 2px solid transparent; }
.produkt.hotovo { border-color: #CFE5B5; }
.produkt img.foto { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: #fff; flex: none; }
.produkt .nazev { font-weight: 800; font-size: 15px; line-height: 1.25; margin-bottom: 6px; }
.produkt .vpravo { flex: 1; min-width: 0; }
.produkt-detail { margin: -4px 0 14px; }
.smajlici { display: flex; gap: 4px; justify-content: space-between; max-width: 260px; }
.smajlici button { appearance: none; border: 0; background: none; padding: 2px; cursor: pointer; width: 46px; height: 46px; border-radius: 50%; transition: transform .15s; }
.smajlici button svg { width: 100%; height: 100%; }
.smajlici button.vybrano { transform: scale(1.18); }
.smajlici button:not(.vybrano) svg .tvar { fill: #F1EEE4; }

/* hvězdičky */
.radek-hodnoceni { background: #fff; border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.radek-hodnoceni .popis { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.hvezdy { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.hvezdy button { appearance: none; border: 0; background: none; padding: 3px; width: 44px; height: 44px; cursor: pointer; }
.hvezdy svg { width: 100%; height: 100%; }
.hvezdy svg path { fill: #E6E1D2; transition: fill .15s, transform .15s; }
.hvezdy button.zap svg path { fill: #F2B705; }
.hvezdy button.cip { width: auto; height: auto; margin: 6px 0 0 2px; padding: 7px 14px; min-height: 38px; font-size: 14px; border: 2px solid var(--linka); background: #fff; }
.hvezdy button.cip.vybrano { background: #E8F3DA; border-color: var(--zelena); }
.hvezdy .zalom { flex-basis: 100%; height: 0; }

/* dlaždice s obrázky */
.dlazdice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dlazdice button { appearance: none; position: relative; border: 3px solid transparent; border-radius: 16px; padding: 0; overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--papir2); }
.dlazdice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dlazdice span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 6px 6px; background: linear-gradient(transparent, rgba(0,0,0,.65)); color: #fff; font-weight: 800; font-size: 13px; line-height: 1.15; text-align: left; }
.dlazdice .jinak { display: grid; place-items: center; background: #fff; border: 2px dashed var(--linka); }
.dlazdice .jinak span { position: static; background: none; color: var(--tmava); padding: 0 6px; text-align: center; font-size: 14px; }
.dlazdice button.vybrano { border-color: var(--zelena); box-shadow: 0 0 0 2px #fff inset; }
.dlazdice button.vybrano::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--zelena); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.segment { display: flex; background: #fff; border-radius: 14px; padding: 4px; gap: 4px; }
.segment button { flex: 1; appearance: none; border: 0; background: none; border-radius: 10px; padding: 12px 4px; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px; }
.segment button.vybrano { background: var(--zelena); color: #fff; }

/* kolo štěstí */
.kolo-obal { position: relative; width: min(100%, 340px); margin: 6px auto 0; aspect-ratio: 1; }
.kolo-obal svg.kolo { width: 100%; height: 100%; transform-origin: 50% 50%; transition: transform 5.2s cubic-bezier(.12,.72,.1,1); filter: drop-shadow(0 8px 16px rgba(19,69,30,.3)); }
.ukazatel { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 34px; height: 44px; z-index: 3; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.stred { position: absolute; inset: 39%; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.2); z-index: 2; }
.stred img { width: 78%; }
.vyhra { text-align: center; animation: karta .5s ease; }
.vyhra .castka { font-size: 46px; font-weight: 800; color: var(--tmava); line-height: 1; margin: 6px 0 4px; }
.kod { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 2px dashed var(--zelena); border-radius: 16px; padding: 14px; margin: 14px 0 6px; }
.kod b { font-size: 20px; letter-spacing: .04em; white-space: nowrap; }
.kod button { appearance: none; border: 0; background: var(--nejtmavsi); color: #fff; border-radius: 10px; padding: 10px 12px; font-weight: 700; cursor: pointer; }
.test-pruh { background: var(--akcent); color: #fff; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 5px; border-radius: 0 0 10px 10px; margin: 0 auto; width: fit-content; padding: 4px 14px; }
canvas.konfety { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.pata { display: none; }
.pata a { color: #fff; }
.vyhra a:not(.btn), .napoveda a { color: var(--tmava); font-weight: 700; }
.vyhra a.btn { display: block; text-align: center; text-decoration: none; color: #fff; }
.chyba { background: #FDECEC; color: #8A1C1C; border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; margin-top: 10px; }

@media (min-width: 560px) {
  .aplikace { padding-top: 16px; }
  .scena { height: clamp(240px, 36vh, 330px); }
  .karta { padding: 26px 24px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
