/* pikpik.games - widok telewizora.
   Kierunek: ilustracja z książki dla dzieci - miękkie kształty, pastelowe niebo ze wzgórzami i zamkiem w tle,
   mało ozdobników. Karty bez konturów, tylko z delikatnym cieniem; wyraźna zostaje jedynie ramka fokusu.
   1rem = 1/54 wysokości ekranu 16:9 (20px na Full HD), więc wszystko skaluje się z telewizorem.
   Kolory wyłącznie przez zmienne: motyw (t-...) wybiera odcień, tryb (m-dark / m-light) jasność.
   Bez flex-gap, inset, aspect-ratio, clamp - starsze przeglądarki TV ich nie mają. */
html { font-size: 1.0417vw; }
@supports (font-size: min(1vw, 1vh)) { html { font-size: min(1.0417vw, 1.852vh); } }

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  /* stałe akcenty */
  --y: #ffd166; --r: #f2708f; --b: #6aa9ff; --g: #55c595; --o: #ffa25e; --v: #a78bfa;
  --on: #2a2550;                 /* tekst na akcentach */
  --ok-bg: #8be8b5; --bad-bg: #ffb4ab;
  font-family: 'Baloo 2', ui-rounded, 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  font-weight: 500; color: var(--ink); background: var(--bg); overflow: hidden;
  -webkit-user-select: none; user-select: none; cursor: default;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
b { font-weight: 700; }
h1, h2, h3, .btn, .card-n, .prof-n, .pod-n, .pl-n, .bar-b span, .ch-timer, .age-n, .pair-t, .qn { font-family: 'Grandstander', 'Baloo 2', sans-serif; font-weight: 700; }

/* ---------- motywy × tryby ---------- */
/* d0-d3: nocne niebo, bliższe wzgórze, dalsze wzgórze, karta; l0-l2: dzienne niebo, dalsze i bliższe wzgórze */
.t-noc, .th-noc           { --d0: #221b4b; --d1: #2b2360; --d2: #362d75; --d3: #40378a; --l0: #f3efff; --l1: #dcd3fb; --l2: #c5b8f5; }
.t-ocean, .th-ocean       { --d0: #0e2c4f; --d1: #143a66; --d2: #1b4a7e; --d3: #235a96; --l0: #e8f5fd; --l1: #c8e6f7; --l2: #a9d6ef; }
.t-dzungla, .th-dzungla   { --d0: #12372b; --d1: #184636; --d2: #1f5743; --d3: #276950; --l0: #edf8ea; --l1: #cfeccb; --l2: #b2dfad; }
.t-zachod, .th-zachod     { --d0: #40203a; --d1: #55294a; --d2: #6b345b; --d3: #7f3f6c; --l0: #fff1e4; --l1: #ffdcc2; --l2: #ffc7a3; }
.t-kosmos, .th-kosmos     { --d0: #0d0e22; --d1: #15173a; --d2: #1e2150; --d3: #282c66; --l0: #f0f2f9; --l1: #d8dded; --l2: #c0c8e0; }
.t-cukierek, .th-cukierek { --d0: #44193f; --d1: #5a2253; --d2: #712c69; --d3: #86377d; --l0: #fff0f7; --l1: #ffd7ea; --l2: #ffbfdc; }
.m-dark  { --bg: var(--d0); --h1: var(--d2); --h2: var(--d1); --orb: #fff3c4; --stars: 1; --cloud: rgba(255, 255, 255, .07);
           --rail: rgba(0, 0, 0, .22); --ink: #fff6e3; --ink-soft: rgba(255, 246, 227, .74);
           --paper: var(--d3); --paper2: var(--d2); --paper-ink: #fff6e3; --line: rgba(0, 0, 0, .32); --edge: rgba(0, 0, 0, .3); --shade: rgba(0, 0, 0, .22);
           --focus: #ffd166; --slot: rgba(0, 0, 0, .28); }
.m-light { --bg: var(--l0); --h1: var(--l1); --h2: var(--l2); --orb: #ffd166; --stars: 0; --cloud: rgba(255, 255, 255, .9);
           --rail: rgba(255, 255, 255, .55); --ink: #2a2550; --ink-soft: rgba(42, 37, 80, .72);
           --paper: #ffffff; --paper2: var(--l0); --paper-ink: #2a2550; --line: rgba(42, 37, 80, .22); --edge: rgba(42, 37, 80, .13); --shade: rgba(42, 37, 80, .1);
           --focus: #ec4a8a; --slot: rgba(42, 37, 80, .09); }

/* tło: bajkowy pejzaż narysowany w SVG (index.html) - niebo, księżyc albo słońce, gwiazdy, chmury, wzgórza z zamkiem */
.bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg); }
.bg svg { width: 100%; height: 100%; display: block; }
.sc-star { fill: #fff; opacity: var(--stars); }
.sc-orb { fill: var(--orb); }
.sc-cut { fill: var(--bg); opacity: var(--stars); }
.sc-cloud { fill: var(--cloud); }
.sc-far { fill: var(--h1); }
.sc-near { fill: var(--h2); }

/* ---------- pasek z przyciskami: po lewej (domyślnie) albo na górze (body.bar-top) ---------- */
#bar { position: fixed; top: 0; left: 0; width: 6.4rem; height: 100%; background: var(--rail);
  display: flex; flex-direction: column; align-items: center; padding-top: 1rem; z-index: 3; }
.bar-b { width: 5rem; height: 4.8rem; margin-bottom: .5rem; border-radius: 1.2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); }
.bar-b span { font-size: .78rem; line-height: 1.1; margin-top: .2rem; }
.bar-b:disabled { opacity: .3; }
.ico { width: 2.2rem; height: 2.2rem; display: block; }
.bar-b .lang-sw { display: flex; margin: .3rem 0 0; font-size: .9rem; }
.lang-sw b { font-family: 'Grandstander', sans-serif; font-weight: 700; padding: .2rem .32rem .05rem; border-radius: .5rem; opacity: .5; }
.lang-sw b.on { background: var(--y); color: var(--on); opacity: 1; }
.bar-logo { display: none; }
.bar-pair { margin-top: auto; margin-bottom: 1.4rem; text-align: center; color: var(--ink-soft); font-size: .95rem; line-height: 1.2; }
.bar-pair .ico { width: 1.7rem; height: 1.7rem; margin: 0 auto .1rem; }
.bar-pair b, .bar-pair i { display: block; font-style: normal; }
.bar-pair i { color: var(--g); font-weight: 700; }

#app { position: fixed; top: 0; left: 6.4rem; right: 0; height: 100%; padding: 1.6rem 2.6rem 2.2rem; }

.bar-top #bar { width: 100%; height: 4.6rem; flex-direction: row; padding: 0 1.6rem; }
.bar-top .bar-logo { display: block; font-family: 'Grandstander', sans-serif; font-weight: 700; font-size: 1.9rem; margin-right: auto; color: var(--ink); }
.bar-top .bar-b { width: auto; height: 3.4rem; flex-direction: row; margin: 0 0 0 .5rem; padding: 0 .9rem; }
.bar-top .bar-b span { font-size: 1rem; margin: 0 0 0 .5rem; }
.bar-top .bar-b .lang-sw { margin: 0; }
.bar-top .ico { width: 1.8rem; height: 1.8rem; }
.bar-top .bar-pair { margin: 0 0 0 1.4rem; display: flex; align-items: center; }
.bar-top .bar-pair .ico { margin: 0 .3rem 0 0; }
.bar-top .bar-pair i { margin-left: .4rem; }
.bar-top #app { top: 4.6rem; left: 0; height: auto; bottom: 0; padding-top: 1.2rem; }
.bar-top .home-t { display: none; }
.bar-top .mcard { width: 8.1rem; height: 8.1rem; font-size: 4.6rem; }
.bar-top .mgrid.r3 .mcard { width: 10.5rem; height: 10.5rem; font-size: 6rem; }
.bar-top #cv { width: 31rem; height: 31rem; }
.bar-top .ch-big { font-size: 8rem; }

#audiohint { position: fixed; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 60; background: var(--y); color: var(--on); font-size: 1.4rem; font-weight: 700; padding: .6rem 1.6rem; border-radius: 2rem; box-shadow: 0 .6rem 1.4rem var(--shade); }

/* ---------- przyciski, karty, fokus ---------- */
.btn, .card, .prof-b, .av, .qcard, .pair, .edit-card, .namebox, .pod, .ans, .tile, .opt, .theme, .modal-box, .mcard, .srow {
  border: 0; box-shadow: 0 .32rem 0 var(--edge), 0 .9rem 1.8rem var(--shade);
}
.btn { background: var(--paper); color: var(--paper-ink); border-radius: 2.4rem; padding: .65rem 1.8rem; font-size: 1.7rem; margin: 0 .6rem; line-height: 1.2; }
.btn.go { background: var(--y); color: var(--on); }
.btn.huge { font-size: 2.6rem; padding: .9rem 3.6rem .7rem; border-radius: 3rem; }
.btn.sm { font-size: 1.35rem; padding: .5rem 1.3rem; }
.btn.del { background: var(--bad-bg); color: var(--on); }
.btn:disabled, .key:disabled { opacity: .3; box-shadow: none; }
[data-f] { transition: transform .1s; position: relative; }
/* fokus musi być widoczny z kanapy: gruba ramka w kolorze --focus, element lekko uniesiony */
[data-f]:focus { outline: none; z-index: 5; transform: translateY(-.2rem) scale(1.05);
  box-shadow: 0 0 0 .4rem var(--focus), 0 1.1rem 2.2rem var(--shade); }
.bar-b:focus, .prof-edit:focus { box-shadow: 0 0 0 .3rem var(--focus); transform: scale(1.06); background: var(--paper); color: var(--paper-ink); }
.row { display: flex; justify-content: center; align-items: center; }

/* kolory graczy */
.pc0 { --c: var(--r); } .pc1 { --c: var(--b); } .pc2 { --c: var(--g); } .pc3 { --c: var(--o); }

/* ---------- start ---------- */
.home { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.home-t { display: flex; align-items: baseline; margin-bottom: 1.4rem; }
.logo { font-size: 4.2rem; line-height: 1; color: var(--ink); }
.logo .pk { height: 6.4rem; width: auto; display: inline-block; vertical-align: middle; overflow: visible; }
.fx-lite .pk * { animation: none !important; opacity: 1; }
.fx-lite .pk .pk-ring { opacity: 0; }
.logo em { font-style: normal; font-size: 1.5rem; background: var(--r); color: #fff; padding: .25rem .9rem; border-radius: 1rem; margin-left: .2rem; vertical-align: 1.6rem; display: inline-block; transform: rotate(-4deg); }
.tag { font-size: 1.6rem; margin-left: 2rem; color: var(--ink-soft); }
.cards { display: grid; grid-template-columns: repeat(5, 1fr); grid-gap: 1.3rem 1.3rem; }
.card { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--paper); color: var(--paper-ink); border-radius: 2rem; padding: 1rem .7rem .8rem; height: 13.6rem; }
.card-i { width: 6rem; height: 6rem; border-radius: 50%; background: var(--ic); padding: .9rem; --line: #3a3470; }
.gicon { width: 100%; height: 100%; display: block; }
.c-wheel { --ic: #ffd9e6; } .c-ladder { --ic: #fff0b8; } .c-survey { --ic: #cfe8ff; } .c-truefalse { --ic: #e6dcff; } .c-memory { --ic: #c9f3dc; }
.c-oddone { --ic: #ffe2c7; } .c-english { --ic: #cfe8ff; } .c-spell { --ic: #ffd9e6; } .c-charades { --ic: #e6dcff; } .c-draw { --ic: #c9f3dc; }
.card-n { font-size: 1.55rem; margin-top: .6rem; line-height: 1.1; }
.card-d { font-size: 1.02rem; line-height: 1.2; margin-top: .3rem; opacity: .72; }
.home-b { margin-top: 1.5rem; display: flex; align-items: center; }
.home-links { margin-left: auto; align-self: flex-end; }
.link { font-size: 1.05rem; color: var(--ink-soft); padding: .3rem .9rem; border-radius: .8rem; text-decoration: underline; }
.link:focus { background: var(--paper); color: var(--paper-ink); box-shadow: 0 0 0 .3rem var(--focus); }
.soon { font-size: 1.15rem; color: var(--ink-soft); margin-left: 2rem; }

.pair { display: flex; align-items: center; background: var(--paper); color: var(--paper-ink); border-radius: 1.2rem; padding: .7rem 1.4rem .7rem .7rem; }
.pair.off { padding: 1.1rem 1.6rem; }
.pair-qr { width: 8.4rem; height: 8.4rem; display: block; border-radius: .4rem; margin-right: 1.2rem; background: #fff; }
.pair-t { font-size: 1.35rem; }
.pair-s { font-size: 1rem; line-height: 1.3; margin: .1rem 0 .35rem; }
.pair-code span { display: inline-block; width: 2.3rem; line-height: 2.8rem; margin-right: .3rem; font-size: 2rem; font-weight: 700; text-align: center; background: var(--on); color: var(--y); border-radius: .5rem; }
.pair-n { font-size: .95rem; margin-top: .3rem; opacity: .7; }
.pair-n.yes { opacity: 1; font-weight: 700; color: var(--g); }

/* ---------- okienka i ustawienia ---------- */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(7, 6, 15, .72); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal-box { background: var(--paper); color: var(--paper-ink); border-radius: 1.6rem; padding: 2.2rem 3rem 2.6rem; text-align: center; }
.modal-box h2 { font-size: 2.6rem; margin-bottom: 1.8rem; }
.modal-box.wide { padding: 1.8rem 2.6rem 2.2rem; }
.modal-box.wide h2 { margin-bottom: 1.2rem; }
.modal-box .btn { background: var(--paper2); }
.modal-box .btn.go { background: var(--y); }
.sets { display: grid; grid-template-columns: repeat(4, 15.5rem); grid-gap: 1.1rem 1.2rem; }
.btn.set { border-radius: 1.4rem; }
.btn.set { margin: 0; font-size: 1.5rem; padding: .7rem .5rem; line-height: 1.25; }
.btn.set b { display: block; font-family: 'Baloo 2', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--r); }
.btn.set b.on { color: var(--g); }
.m-light .btn.set b.on { color: #0c7a43; } .m-light .btn.set b { color: #c2272d; }
.sets-h { font-size: 1.5rem; margin: 1.5rem 0 .8rem; }
.themes { display: grid; grid-template-columns: repeat(6, 8.2rem); grid-gap: .95rem; margin-bottom: 1.8rem; justify-content: center; }
.theme { height: 5rem; border-radius: 1.2rem; background: var(--d2); color: #fff6e3; display: flex; align-items: flex-end; justify-content: center; padding-bottom: .4rem; }
.m-light .theme { background: var(--l2); color: #2a2550; }
.theme.on { box-shadow: 0 0 0 .3rem var(--y), 0 .6rem 1.2rem var(--shade); }
.theme-n { font-size: 1rem; font-weight: 700; line-height: 1.1; }

/* ---------- regulamin i polityka prywatności ---------- */
.modal-box.doc { width: 62rem; padding: 1.6rem 2rem 1.8rem; text-align: left; }
.doc-text { height: 31rem; overflow-y: auto; padding: 0 1.2rem 1rem .4rem; font-size: 1.25rem; line-height: 1.5; }
.doc-text h1 { font-size: 2.2rem; margin-bottom: .4rem; } .doc-text h2 { font-size: 1.5rem; margin: 1.2rem 0 .4rem; text-align: left; }
.doc-text p, .doc-text li { margin-bottom: .5rem; } .doc-text ul, .doc-text ol { padding-left: 1.6rem; }
.doc-text .todo { background: var(--y); color: var(--on); padding: 0 .3rem; border-radius: .3rem; }
.doc-nav { margin-top: 1.2rem; }
.doc-hint { font-size: 1rem; color: var(--ink-soft); text-align: center; margin-top: .7rem; }
.modal-box .doc-hint { opacity: .7; color: inherit; }

/* ---------- gracze i profile ---------- */
.setup { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.setup h2 { font-size: 3rem; line-height: 1.1; }
.setup h2 small { font-family: 'Baloo 2', sans-serif; font-size: 1.8rem; font-weight: 500; color: var(--ink-soft); margin-left: 1rem; }
.setup-h { font-size: 1.4rem; color: var(--ink-soft); margin: .5rem 0 1.4rem; }
.profs { display: grid; grid-template-columns: repeat(4, 15rem); grid-gap: 1.2rem 1.6rem; justify-content: center; margin-bottom: 2rem; }
.prof { display: flex; flex-direction: column; align-items: center; }
.prof-b { width: 100%; height: 11.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--paper); color: var(--paper-ink); border-radius: 1.3rem; opacity: .6; }
.prof.on .prof-b { opacity: 1; border-color: var(--c); box-shadow: 0 .32rem 0 var(--c); }
.prof-b:focus { opacity: 1; }
.prof-b.add { background: none; color: var(--ink); border-style: dashed; box-shadow: none; opacity: 1; }
.prof-plus { font-family: 'Grandstander', sans-serif; font-weight: 700; font-size: 4.6rem; line-height: 1; }
.prof-e { font-size: 5rem; line-height: 1.1; }
.prof-n { font-size: 1.7rem; line-height: 1.1; }
.prof-age { font-size: 1.05rem; opacity: .7; }
.prof-ok { position: absolute; top: -.9rem; right: -.9rem; width: 2.8rem; height: 2.8rem; line-height: 2.4rem; border-radius: 50%; background: var(--c); color: var(--on); border: .2rem solid var(--line); font-size: 1.5rem; font-weight: 700; }
.prof-edit { margin-top: .9rem; font-size: 1.05rem; font-weight: 700; background: var(--slot); border-radius: .7rem; padding: .25rem 1.1rem; }
.edit { display: flex; align-items: center; margin-top: 2rem; }
.edit-card { width: 19rem; height: 19rem; margin-right: 3rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--paper); color: var(--paper-ink); border-radius: 1.6rem; }
.edit-card .prof-e { font-size: 8rem; } .edit-card .prof-n { font-size: 2.4rem; } .edit-card .prof-age { font-size: 1.3rem; }
.edit-b { display: flex; flex-direction: column; }
.edit-b .btn { margin: .5rem 0; font-size: 1.5rem; text-align: left; min-width: 24rem; }
.avs { display: grid; grid-template-columns: repeat(6, 11rem); grid-gap: 1.2rem; margin-top: 2rem; }
.av { height: 10.2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--paper); color: var(--paper-ink); border-radius: 1.2rem; }
.av.on, .agebig.on { background: var(--y); color: var(--on); }
.av-e { font-size: 5rem; line-height: 1.15; display: block; }
.av-n { font-size: 1.2rem; font-weight: 700; }
.agepick { display: flex; margin-top: 3rem; }
.btn.agebig { width: 15rem; height: 14rem; font-size: 1.7rem; margin: 0 1rem; padding: 0; }
.age-n { display: block; font-size: 5rem; line-height: 1.1; }
.namebox { display: flex; align-items: center; background: var(--paper); color: var(--paper-ink); border-radius: 1.2rem; padding: .3rem 2.4rem .3rem 1.4rem; margin-top: 1.2rem; min-width: 30rem; }
.name-t { font-size: 3.4rem; font-weight: 700; margin-left: 1.2rem; }
.name-t.empty { opacity: .35; }
.name-t i { font-style: normal; font-weight: 500; color: var(--r); animation: blink .6s infinite alternate; }
.abc.name-abc { grid-template-columns: repeat(8, 5.4rem); grid-gap: .7rem; }
.name-abc .key { height: 3.9rem; font-size: 2.2rem; }
.name-row { margin-top: 1.8rem; }

/* ---------- wspólne w grach ---------- */
.game { height: 100%; display: flex; flex-direction: column; }
.hud { display: flex; justify-content: center; flex: none; margin-bottom: 1.3rem; }
.pl { display: flex; align-items: center; background: var(--slot); border: .2rem solid transparent; border-radius: 1rem; padding: .3rem 1.2rem .3rem .5rem; margin: 0 .5rem; opacity: .75; }
.pl.on { background: var(--paper); color: var(--paper-ink); border-color: var(--line); opacity: 1; box-shadow: 0 .28rem 0 var(--c); }
.pl.out { opacity: .45; }
.pl-a { font-size: 2.4rem; line-height: 1; margin-right: .6rem; }
.pl-n { font-size: 1.25rem; line-height: 1.1; margin-right: 1.1rem; }
.pl-n small { display: block; font-family: 'Baloo 2', sans-serif; font-size: .85rem; font-weight: 500; opacity: .7; }
.pl-s { font-size: 1.6rem; font-weight: 700; }
.msg { font-size: 1.8rem; min-height: 2.5rem; line-height: 1.3; text-align: center; margin: 1rem 0; }
.msg.good { color: var(--g); font-weight: 700; } .msg.bad { color: var(--o); font-weight: 700; }
.m-light .msg.good { color: #0c7a43; } .m-light .msg.bad { color: #b3470c; }
.rev { color: var(--ink); font-weight: 500; }
.wait { font-size: 1.7rem; color: var(--ink-soft); text-align: center; animation: blink 1s infinite alternate; }
@keyframes blink { to { opacity: .35; } }
@keyframes yay { 50% { transform: scale(1.06); } }
.qcard { background: var(--paper); color: var(--paper-ink); border-radius: 1.3rem; padding: 1rem 2rem 1.3rem; text-align: center; }
.qn { font-size: 1.05rem; opacity: .65; letter-spacing: .02em; }
.qt { font-size: 2.5rem; font-weight: 700; line-height: 1.2; margin-top: .3rem; }
.bottom { min-height: 8rem; margin-top: 1.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bottom .msg { margin: 0 0 1rem; }

/* ---------- Kręciołek ---------- */
.wg { flex: 1; display: grid; grid-template-columns: 28rem 1fr; grid-gap: 3rem; align-items: center; }
.wheel-box { position: relative; width: 28rem; height: 28rem; }
.wheel { width: 100%; height: 100%; }
.wheel svg { width: 100%; height: 100%; display: block; }
.pointer { position: absolute; top: -1.2rem; left: 50%; margin-left: -1.5rem; z-index: 2; width: 0; height: 0; border-left: 1.5rem solid transparent; border-right: 1.5rem solid transparent; border-top: 2.8rem solid var(--focus); }
.wg-r { display: flex; flex-direction: column; align-items: center; }
.hint { display: flex; align-items: center; font-size: 1.8rem; margin-bottom: 1.2rem; }
.hint-e { font-size: 4.4rem; line-height: 1; margin-right: 1rem; }
.hint-t { font-weight: 700; }
.hint-n { font-size: 1.1rem; color: var(--ink-soft); margin-left: 1.4rem; background: var(--slot); padding: .2rem .9rem; border-radius: .6rem; }
.board { text-align: center; }
.word { display: inline-block; margin: 0 1rem .7rem; white-space: nowrap; }
.lt { display: inline-block; vertical-align: top; width: 4.2rem; height: 5.2rem; line-height: 4.9rem; margin: 0 .2rem; font-size: 3.4rem; font-weight: 700; text-align: center; background: var(--slot); border: .22rem solid var(--line); border-radius: .7rem; color: transparent; }
.lt.ghost { color: var(--ink-soft); opacity: .45; }
.lt.open { background: var(--y); color: var(--on); opacity: 1; }
.lt.open.late { background: var(--paper2); color: var(--paper-ink); }
.board.long .lt { width: 3.2rem; height: 4.1rem; line-height: 3.8rem; font-size: 2.6rem; margin: 0 .12rem; }
.board.long .word { margin: 0 .7rem .6rem; }
.ctl { min-height: 13rem; display: flex; align-items: flex-start; justify-content: center; }
.opts { display: flex; }
.btn.letter { font-size: 4.2rem; width: 7rem; height: 7.4rem; padding: 0; margin: 0 .7rem; }
.abc { display: grid; grid-template-columns: repeat(8, 4.3rem); grid-gap: .55rem; }
.abc.az { grid-template-columns: repeat(9, 4.3rem); }
.key { height: 2.9rem; background: var(--paper); color: var(--paper-ink); border: .16rem solid var(--line); border-radius: .5rem; font-size: 1.7rem; font-weight: 700; }

/* ---------- Złota Drabina ---------- */
.lg { flex: 1; display: grid; grid-template-columns: 14rem 1fr; grid-gap: 2.6rem; align-items: center; }
.ladder { background: var(--slot); border-radius: 1rem; padding: .7rem; border-left: .45rem solid var(--y); border-right: .45rem solid var(--y); }
.rung { display: flex; align-items: center; height: 3.8rem; border-bottom: .3rem solid var(--y); padding: 0 .5rem; }
.rung.ground { border-bottom: 0; }
.rung.top .rn { color: var(--y); font-size: 2rem; }
.rn { font-size: 1.3rem; font-weight: 700; width: 3.4rem; opacity: .85; }
.rung.ground .rn { font-size: .85rem; }
.rav { font-size: 2.1rem; line-height: 1; margin-right: .1rem; }
.qa { display: flex; flex-direction: column; }
.answers { display: grid; grid-gap: 1.2rem 1.4rem; margin-top: 1.8rem; }
.answers.n4 { grid-template-columns: 1fr 1fr; }
.answers.n3 { grid-template-columns: 1fr 1fr 1fr; }
.ans { display: flex; align-items: center; text-align: left; background: var(--paper); color: var(--paper-ink); border-radius: 1.1rem; padding: .8rem 1.3rem; min-height: 5.4rem; font-size: 1.9rem; font-weight: 700; }
.a0 { --c: var(--r); } .a1 { --c: var(--b); } .a2 { --c: var(--g); } .a3 { --c: var(--o); }
.ans-l { flex: none; width: 3rem; height: 3rem; line-height: 2.7rem; text-align: center; border-radius: .7rem; background: var(--c); color: var(--on); border: .18rem solid var(--line); margin-right: 1rem; font-family: 'Grandstander', sans-serif; font-weight: 700; }
.ans-t { flex: 1; }
.answers.young .ans { flex-direction: column; text-align: center; font-size: 2.4rem; min-height: 10.5rem; justify-content: center; }
.answers.young .ans-l { margin: 0 0 .5rem; }
.ans.hid { visibility: hidden; }
.ans.sel { background: var(--y); color: var(--on); }
.ans.good, .opt.good, .tile.hit { background: var(--ok-bg); color: var(--on); }
.ans.good, .opt.good { animation: yay .5s 3; }
.ans.bad, .opt.bad, .tile.miss { background: var(--bad-bg); color: var(--on); }
.owl-hint { font-size: 2.4rem; margin-left: .6rem; animation: yay .6s infinite; }
.life { display: flex; }

/* ---------- Zgadula ---------- */
.sg { flex: 1; display: flex; flex-direction: column; }
.sg-b { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-gap: 2.6rem; align-items: center; margin-top: 1.3rem; }
.picks { margin-left: 1rem; }
.srow { display: flex; align-items: center; background: var(--slot); color: var(--ink); border-radius: .9rem; height: 4.4rem; margin-bottom: .8rem; padding: 0 1.1rem; font-size: 1.9rem; font-weight: 700; box-shadow: none; }
.srank { width: 2.5rem; height: 2.5rem; line-height: 2.5rem; text-align: center; border-radius: .6rem; background: var(--y); color: var(--on); margin-right: 1.1rem; font-size: 1.4rem; }
.stext { flex: 1; } .stext i { font-style: normal; opacity: .35; letter-spacing: .3rem; }
.srow.open { background: var(--ok-bg); color: var(--on); box-shadow: 0 .28rem 0 var(--line); }
.srow.missed { opacity: .65; }
.sg-r { display: flex; flex-direction: column; align-items: center; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 1rem; width: 100%; }
.tile { background: var(--paper); color: var(--paper-ink); border-radius: .9rem; font-size: 1.6rem; font-weight: 700; padding: .5rem .8rem; min-height: 4.3rem; }
.tiles.young .tile { font-size: 2rem; min-height: 5.4rem; }
.tiles.few .tile { font-size: 2.5rem; min-height: 7.6rem; }
.tile.hit, .tile.miss { box-shadow: none; opacity: .8; }

/* ---------- Memory ---------- */
.mg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mgrid { display: grid; grid-gap: 1rem; justify-content: center; }
.mcard { width: 9rem; height: 9rem; border-radius: 1.1rem; font-size: 5.2rem; line-height: 1; background-color: var(--b);
  background-image: radial-gradient(rgba(255, 255, 255, .28) 16%, transparent 17%); background-size: 1.5rem 1.5rem; }
.mgrid.r3 .mcard { width: 11.5rem; height: 11.5rem; font-size: 6.8rem; }
.mback { font-family: 'Grandstander', sans-serif; font-weight: 700; font-size: 4rem; color: #fff; }
.mcard.up { background: #fff; }
.mcard.done { opacity: .35; box-shadow: none; }
.mcard.flip { animation: mflip .3s ease-out; }
@keyframes mflip { from { transform: scaleX(.1); } }
.mcard.hint { animation: mhint .5s ease-in-out infinite alternate; border-color: var(--y); }
@keyframes mhint { to { transform: translateY(-.7rem) rotate(4deg); } }
.mg .msg { margin: 1.1rem 0 0; }

/* ---------- Kalambury i Rysowanki ---------- */
.chg { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.chg h2 { font-size: 2.9rem; line-height: 1.15; }
.ch-n { font-size: 1.15rem; background: var(--slot); padding: .2rem 1.1rem; border-radius: .6rem; margin-bottom: 1rem; }
.ch-big { font-size: 10rem; line-height: 1.15; }
.chg h2.ch-word { font-size: 4.2rem; background: var(--y); color: var(--on); border: .22rem solid var(--line); border-radius: 1rem; padding: .1rem 2.2rem; box-shadow: 0 .32rem 0 var(--line); }
.ch-p { font-size: 1.7rem; margin: 1rem 0 2rem; color: var(--ink-soft); }
.ch-row { margin-top: 1.4rem; }
.ch-timer { width: 13rem; height: 13rem; line-height: 12.2rem; border-radius: 50%; background: var(--paper); color: var(--paper-ink); border: .45rem solid var(--y); font-size: 6.4rem; margin-bottom: 1.2rem; }
.ch-timer.low { border-color: var(--r); color: var(--r); animation: yay .5s infinite; }
.ch-who .btn { border-bottom: .6rem solid var(--c, var(--line)); }
.ch-draw { display: flex; align-items: center; }
#cv { width: 35rem; height: 35rem; background: #fff; border: .25rem solid var(--line); border-radius: 1rem; box-shadow: 0 .32rem 0 var(--line); margin-right: 3rem; }
.ch-side { display: flex; flex-direction: column; align-items: center; width: 30rem; }
.ch-side h2 { font-size: 2.2rem; margin-bottom: 1.6rem; }
.ch-side .ch-timer { width: 10rem; height: 10rem; line-height: 9.2rem; font-size: 4.8rem; }
.ch-side .row { flex-direction: column; } .ch-side .btn { margin: .5rem 0; }

/* ---------- szybkie gry: prawda/fałsz, co nie pasuje, angielski, dźwięki ---------- */
.qk { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.qbig { font-size: 3.4rem; font-weight: 700; line-height: 1.2; margin-top: .4rem; }
.qbig .pic { font-size: 6.5rem; line-height: 1.1; }
.k-truefalse .qt { font-size: 2.1rem; font-weight: 500; }
.k-truefalse .qbig { display: inline-block; background: var(--y); color: var(--on); border: .2rem solid var(--line); border-radius: .9rem; padding: .1rem 1.6rem; margin-top: .8rem; }
.qopts { display: grid; grid-gap: 1.4rem; margin-top: 1.8rem; justify-content: center; }
.qopts.n2 { grid-template-columns: repeat(2, 24rem); } .qopts.n3 { grid-template-columns: repeat(3, 17rem); }
.qopts.n4 { grid-template-columns: repeat(4, 17rem); } .qopts.n5 { grid-template-columns: repeat(5, 14.4rem); }
.opt { background: var(--paper); color: var(--paper-ink); border-radius: 1.2rem; min-height: 6rem; font-size: 2.2rem; font-weight: 700; padding: .6rem 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pics .opt { min-height: 12rem; }
.pic { font-size: 6.6rem; line-height: 1.15; display: block; }
.cap { font-size: 1.35rem; line-height: 1.15; }
.opt.yes, .opt.no { font-family: 'Grandstander', sans-serif; font-weight: 700; font-size: 3rem; min-height: 8.4rem; color: var(--on); }
.opt.yes { background: var(--g); } .opt.no { background: var(--r); }
.opt.yes.bad, .opt.no.bad { opacity: .45; }
.opt:disabled { box-shadow: none; }
/* Literki po angielsku: obrazek, miejsca na litery i kafelki z literami */
.slots { display: inline-block; vertical-align: middle; margin-left: 1.4rem; }
.slots b { display: inline-block; width: 4.4rem; height: 5.2rem; line-height: 5.2rem; margin: 0 .25rem; border-radius: .9rem; background: var(--slot); font-family: 'Grandstander', sans-serif; font-size: 3.4rem; text-align: center; vertical-align: middle; }
.slots b.in { background: var(--y); color: var(--on); animation: ltpop .35s cubic-bezier(.2, 1.6, .4, 1); }
.letters .qbig .pic { display: inline-block; vertical-align: middle; }
.letters .qopts { grid-template-columns: none; display: flex; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }
.opt.ltr { width: 7.4rem; min-height: 7.4rem; margin: 0 .6rem .9rem; font-family: 'Grandstander', sans-serif; font-size: 4rem; }
.qopts.many .opt.ltr { width: 6.2rem; min-height: 6.2rem; font-size: 3.3rem; margin: 0 .45rem .8rem; }
.opt.ltr.used { opacity: .25; }
.opt.shake { animation: shake .35s; }
@keyframes shake { 20% { transform: translateX(-.5rem); } 50% { transform: translateX(.5rem); } 80% { transform: translateX(-.3rem); } }

/* ---------- wyniki ---------- */
.results { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.results h2 { font-size: 4rem; margin-bottom: 2.6rem; }
.podium { display: flex; align-items: flex-end; margin-bottom: 3rem; }
.pod { width: 15rem; margin: 0 .9rem; text-align: center; background: var(--paper); color: var(--paper-ink); border-radius: 1.3rem; padding: 1.2rem 1rem; box-shadow: 0 .32rem 0 var(--c); }
.pod.first { padding: 2.2rem 1rem; background: var(--y); color: var(--on); }
.pod-m { width: 3.4rem; height: 3.4rem; line-height: 3rem; margin: 0 auto .3rem; border-radius: 50%; border: .2rem solid var(--line); background: var(--paper2); font-family: 'Grandstander', sans-serif; font-weight: 700; font-size: 1.8rem; }
.pod-m.m1 { background: #fff; color: var(--on); }
.pod-a { font-size: 5.2rem; line-height: 1.15; }
.pod-n { font-size: 1.6rem; } .pod-s { font-size: 2.1rem; font-weight: 700; }

/* ============ ruch i efekty ============ */
/* obrazki zamiast emoji (public/emoji) - zachowują się jak litera w tekście */
.emo { width: 1em; height: 1em; vertical-align: -.14em; display: inline-block; }
.pic .emo, .prof-e .emo, .av-e .emo, .ch-big .emo, .pod-a .emo, .hint-e .emo, .pl-a .emo, .mcard .emo { vertical-align: middle; }
#fx { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

/* żywe tło: migoczące gwiazdy, płynące chmury, spadająca gwiazda, światła w oknach zamku */
.sc-star:nth-of-type(3n) { animation: twinkle 3.2s ease-in-out infinite alternate; }
.sc-star:nth-of-type(7n) { animation: twinkle 2.1s ease-in-out .8s infinite alternate; }
@keyframes twinkle { from { opacity: calc(var(--stars) * .15); } to { opacity: var(--stars); } }
.sc-cloud.c1 { animation: drift 46s ease-in-out infinite alternate; }
.sc-cloud.c2 { animation: drift 62s ease-in-out infinite alternate-reverse; }
.sc-cloud.c3 { animation: drift 38s ease-in-out -10s infinite alternate; }
@keyframes drift { from { transform: translateX(-70px); } to { transform: translateX(110px); } }
.sc-shoot { stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: 0; animation: shoot 17s linear 4s infinite; }
@keyframes shoot { 0% { opacity: 0; transform: translate(1500px, 60px); } 1% { opacity: var(--stars); } 5% { opacity: 0; transform: translate(1040px, 250px); } 100% { opacity: 0; transform: translate(1040px, 250px); } }
.sc-win { fill: var(--bg); }
.m-dark .sc-win { fill: #ffd98a; animation: candle 4s ease-in-out infinite alternate; }
.m-dark .sc-win.w2 { animation-delay: -1.3s; } .m-dark .sc-win.w3 { animation-delay: -2.6s; }
@keyframes candle { 0%, 100% { opacity: .95; } 40% { opacity: .6; } 70% { opacity: .85; } }
.sc-orb { animation: glow 6s ease-in-out infinite alternate; transform-origin: 1690px 170px; }
@keyframes glow { to { transform: scale(1.06); } }

/* wejście nowej zawartości: elementy wjeżdżają z dołu po kolei (klasa .enter na #app, ustawiana przez enter()) */
@keyframes rise { from { opacity: 0; transform: translateY(1.6rem) scale(.96); } }
@keyframes drop { from { opacity: 0; transform: translateY(-1.2rem); } }
.enter .card, .enter .ans, .enter .opt, .enter .tile, .enter .prof, .enter .av, .enter .btn.agebig, .enter .pod, .enter .btn.letter { animation: rise .42s cubic-bezier(.2, .9, .3, 1.25) backwards; }
.enter .qcard, .enter .hint, .enter .setup h2, .enter .home-t, .enter .results h2, .enter .chg h2 { animation: drop .4s ease-out backwards; }
.enter .card:nth-child(2), .enter .ans:nth-child(2), .enter .opt:nth-child(2), .enter .tile:nth-child(2), .enter .prof:nth-child(2), .enter .pod:nth-child(2) { animation-delay: .06s; }
.enter .card:nth-child(3), .enter .ans:nth-child(3), .enter .opt:nth-child(3), .enter .tile:nth-child(3), .enter .prof:nth-child(3), .enter .pod:nth-child(3) { animation-delay: .12s; }
.enter .card:nth-child(4), .enter .ans:nth-child(4), .enter .opt:nth-child(4), .enter .tile:nth-child(4), .enter .prof:nth-child(4), .enter .pod:nth-child(4) { animation-delay: .18s; }
.enter .card:nth-child(5), .enter .opt:nth-child(5), .enter .tile:nth-child(5), .enter .prof:nth-child(5) { animation-delay: .24s; }
.enter .card:nth-child(n+6), .enter .tile:nth-child(n+6), .enter .prof:nth-child(n+6) { animation-delay: .3s; }
.enter .card:nth-child(n+8) { animation-delay: .38s; }
.enter .av { animation-duration: .3s; }
.enter [data-f]:focus { animation: none; }

/* żywe elementy gier */
.mcard.flip { animation: mflip3d .45s ease-out; }
@keyframes mflip3d { from { transform: perspective(40rem) rotateY(90deg); } }
.srow.flipin { animation: rowflip .55s ease-out; }
@keyframes rowflip { from { transform: perspective(40rem) rotateX(-90deg); } }
.rav { display: inline-block; }
.rav.climb { animation: climb .7s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes climb { from { transform: translateY(3.8rem); } }
.wheel-box.spinning .pointer { animation: tick .11s linear infinite alternate; transform-origin: 50% 0; }
@keyframes tick { to { transform: rotate(-16deg); } }
.wheel-val { position: absolute; top: 50%; left: 50%; width: 9rem; height: 9rem; margin: -4.5rem 0 0 -4.5rem; line-height: 9rem; text-align: center; border-radius: 50%; background: var(--y); color: var(--on);
  font-family: 'Grandstander', sans-serif; font-weight: 700; font-size: 2.8rem; box-shadow: 0 0 0 .6rem rgba(255, 255, 255, .5), 0 1rem 2rem var(--shade); animation: valpop .5s cubic-bezier(.2, 1.6, .4, 1); z-index: 3; }
@keyframes valpop { from { transform: scale(0); } }
.lt.open { animation: ltpop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes ltpop { from { transform: scale(.6); } }
.lt.open.late { animation: none; }
.pl.on { transition: transform .25s; }
.pod.first .pod-a { animation: hop .7s ease-in-out infinite alternate; }
@keyframes hop { to { transform: translateY(-.9rem) rotate(4deg); } }
.msg.good { animation: drop .3s ease-out; }

/* sowa-prowadząca */
.hud { position: relative; }
.owl-box { position: absolute; right: .4rem; top: -.6rem; width: 6.2rem; height: 6.2rem; }
.owl { width: 100%; height: 100%; display: block; overflow: visible; }
.owl-wing { fill: #7a5fc2; transform-origin: 50% 52%; transform-box: fill-box; }
.owl-body { animation: bob 2.8s ease-in-out infinite alternate; transform-origin: 50% 100%; transform-box: fill-box; }
@keyframes bob { to { transform: translateY(-.25rem); } }
.owl-lids { transform: scaleY(0); transform-origin: 50% 0; transform-box: fill-box; animation: blinkowl 4.6s infinite; }
@keyframes blinkowl { 0%, 94%, 100% { transform: scaleY(0); } 96%, 98% { transform: scaleY(1.9); } }
.owl.happy .owl-body { animation: owljump .32s ease-in-out infinite alternate; }
@keyframes owljump { to { transform: translateY(-.9rem); } }
.owl.happy .wl { animation: flapl .16s ease-in-out infinite alternate; } .owl.happy .wr { animation: flapr .16s ease-in-out infinite alternate; }
@keyframes flapl { to { transform: rotate(38deg); } } @keyframes flapr { to { transform: rotate(-38deg); } }
.owl.sad .owl-body { animation: none; transform: rotate(-7deg); }
.owl.sad .owl-eyes { transform: translateY(3px); }
.owl.sad .owl-lids { animation: none; transform: scaleY(1); }
.home-t { align-items: center; }
.home-owl { display: flex; align-items: center; margin-left: 2rem; }
.home-owl .owl-box { position: static; width: 5.6rem; height: 5.6rem; flex: none; }
.tag.bubble { margin-left: .8rem; background: var(--paper); color: var(--paper-ink); padding: .5rem 1.3rem; border-radius: 1.6rem 1.6rem 1.6rem .3rem; font-size: 1.45rem; box-shadow: 0 .3rem 0 var(--edge); }
.res-owl .owl-box { position: static; width: 8rem; height: 8rem; margin-bottom: .4rem; }
.results h2 { margin-bottom: 2rem; }

/* Animacje: oszczędne (ustawienia) - zostaje tylko ramka fokusu i samo kręcenie koła */
.fx-lite .bg *, .fx-lite #app *, .fx-lite #overlay * { animation: none !important; }
.fx-lite #fx { display: none; }

@media (prefers-reduced-motion: reduce) { .bg *, .owl *, .enter * { animation: none !important; } }
@media (prefers-reduced-motion: reduce) { [data-f]:focus, .owl-hint, .ans.good, .opt.good, .wait, .mcard.hint, .ch-timer.low { animation: none; } }

/* ciemne obrazki (pająk, mrówka, kot) na ciemnych kartach: delikatna jasna poświata, żeby nie znikały */
.m-dark .emo { filter: drop-shadow(0 0 .12em rgba(255, 255, 255, .55)); }
.fx-lite.m-dark .emo { filter: none; }

/* ---- ułatwienia dla 3-4 lat: kropki do policzenia przy cyfrach, blady wzór słowa, podświetlone miejsce na literkę ---- */
.dots { display: inline-block; vertical-align: middle; margin-right: .7rem; }
.dots i { display: inline-block; width: 1.1rem; height: 1.1rem; margin-right: .3rem; border-radius: 50%; background: currentColor; }
.qbig .dots i { width: 1.5rem; height: 1.5rem; margin-right: .45rem; }
.slots b.ghost { color: var(--ink-soft); opacity: .5; }
.slots b.ghost.now { opacity: 1; color: var(--ink); box-shadow: 0 0 0 .3rem var(--y); animation: nowpulse 1.1s ease-in-out infinite; }
@keyframes nowpulse { 50% { box-shadow: 0 0 0 .55rem var(--y); } }
.fx-lite .slots b.ghost.now { animation: none; }
.opt.yes .emo, .opt.no .emo { margin-right: .5rem; }

/* ---- logo widoczne także poza ekranem startowym: w rogu ekranu (pasek po lewej) albo na górnym pasku ---- */
#brand { position: fixed; top: 1.1rem; left: 8rem; z-index: 2; color: var(--ink); pointer-events: none; }
#brand .pk { height: 3.4rem; width: auto; display: block; overflow: visible; }
.at-home #brand, .bar-top #brand { display: none; }
.bar-top .bar-logo { color: var(--ink); line-height: 0; }
.bar-logo .pk { height: 3rem; width: auto; display: block; overflow: visible; }
.bar-logo .pk-l { animation: none; }
