/* =========================================================
   🎒 Předškoláček – velké, barevné, minimum textu (navazuje na style.css: barvy, písma, tmavý režim html.dark)
   ========================================================= */
body.predskolak { --ps-radius: 24px; --ps-tap: 64px; min-height: 100dvh; }
.predskolak .hidden { display: none !important; }
.predskolak .invisible { visibility: hidden; }

.ps-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  margin: 8px; padding: 6px 10px; border-radius: 22px; background: var(--card); box-shadow: var(--shadow);
}
.ps-brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font: 800 1.25rem var(--font-head); color: var(--primary); white-space: nowrap; overflow: hidden; }
.ps-brand img { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.ps-round { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 2px solid var(--border); background: var(--card); color: var(--text); font-size: 1.35rem; cursor: pointer; }
.ps-round:focus-visible, .ps-option:focus-visible, .ps-big:focus-visible, .ps-area:focus-visible, .ps-level:focus-visible { outline: 4px solid var(--primary); outline-offset: 3px; }
.ps-counters { display: flex; gap: 6px; flex: none; }
.ps-counter { font: 800 1.1rem var(--font-head); color: var(--text); padding: 4px 10px; border-radius: 999px; background: var(--almost-bg); white-space: nowrap; }
.ps-voice-note { margin: 0 12px; padding: 10px 14px; border-radius: 14px; background: var(--almost-bg); color: var(--text); font-weight: 700; text-align: center; }

.ps-main { max-width: 920px; margin: 0 auto; padding: 8px 12px 48px; }
.ps-card { margin: 18px auto; max-width: 600px; padding: 22px; border-radius: var(--ps-radius); background: var(--card); box-shadow: var(--shadow); text-align: center; color: var(--text); }
.ps-card h1, .ps-h1 { font: 800 1.9rem var(--font-head); margin: 0 0 8px; color: var(--text); }
.ps-h2 { font: 800 1.35rem var(--font-head); margin: 18px 4px 10px; color: var(--text); }
.ps-muted { color: var(--muted); }
.ps-hero-img { width: 130px; height: 130px; border-radius: 50%; }
#ps-login-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
#ps-login-form input { flex: 1 1 200px; font-size: 1.3rem; text-align: center; }

/* Maty a bublina */
.ps-maty { display: flex; align-items: center; gap: 10px; min-height: 72px; margin: 6px 0; }
.ps-maty img { width: 72px; height: 72px; border-radius: 50%; flex: none; }
.ps-maty-big img { width: 110px; height: 110px; }
.ps-bubble {
  position: relative; padding: 10px 16px; border-radius: 18px; background: var(--card); color: var(--text);
  border: 2.5px solid var(--text); font: 800 1.2rem var(--font-head); box-shadow: var(--shadow);
}
.ps-bubble:empty { display: none; }

/* menu */
.ps-wide-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--ps-tap); padding: 10px 18px;
  border: 3px solid var(--border); border-radius: 20px; background: var(--card); color: var(--text);
  font: 800 1.25rem var(--font-head); cursor: pointer; text-align: left;
}
.ps-wide-btn:hover { border-color: var(--primary); }
.ps-continue { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); margin: 6px 0 4px; }
.ps-menu-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 10px 0; }
.ps-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.ps-area {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px 10px; min-height: 150px;
  border: 3px solid color-mix(in srgb, var(--area) 45%, transparent); border-radius: var(--ps-radius);
  background: color-mix(in srgb, var(--area) 10%, var(--card)); color: var(--text); cursor: pointer;
  transition: transform .12s, border-color .12s;
}
.ps-area:hover { transform: translateY(-3px); border-color: var(--area); }
.ps-area-emoji { font-size: 2.8rem; line-height: 1; }
.ps-area-name { font: 800 1.08rem/1.15 var(--font-head); text-align: center; }
.ps-area-bar { width: 100%; height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--area) 18%, var(--card)); overflow: hidden; }
.ps-area-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--area); transition: width .4s; }
.ps-area-medals { min-height: 1.3em; font-size: 1.1rem; letter-spacing: 2px; }
.ps-parents-link { text-align: center; margin-top: 24px; font-weight: 700; }

/* úrovně */
.ps-area-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.ps-area-head .ps-area-emoji { font-size: 2.6rem; }
.ps-level-list { display: grid; gap: 12px; margin: 14px 0; }
.ps-level {
  display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 10px 18px; border-radius: 20px;
  border: 3px solid var(--area); background: color-mix(in srgb, var(--area) 12%, var(--card)); color: var(--text);
  font: 800 1.4rem var(--font-head); cursor: pointer;
}
.ps-level-emoji { font-size: 2.2rem; }
.ps-level-name { flex: 1; text-align: left; }
.ps-level-count { font-size: 1.05rem; color: var(--muted); }
.ps-locked { opacity: .55; border-style: dashed; }

/* hra */
.ps-play-head { display: flex; align-items: center; gap: 10px; }
.ps-dots { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.ps-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); font-size: 1rem; }
.ps-dot-now { outline: 3px solid var(--primary); }
.ps-dot-done { background: var(--almost-bg); }
.ps-say-row { display: flex; gap: 10px; justify-content: center; margin: 4px 0; }
.ps-say-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 0 18px; border-radius: 999px;
  border: 2px solid var(--border); background: var(--card); color: var(--text); font: 800 1.15rem var(--font-head); cursor: pointer;
}
.ps-instruction { text-align: center; color: var(--muted); font-weight: 700; margin: 4px 0 10px; font-size: 1.05rem; }
.ps-task { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ps-next-row { display: flex; justify-content: center; margin: 16px 0; }
.ps-big {
  min-height: var(--ps-tap); padding: 0 26px; border: none; border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font: 800 1.35rem var(--font-head); cursor: pointer; box-shadow: 0 6px 0 var(--primary-dark);
}
.ps-big:active { transform: translateY(3px); box-shadow: 0 3px 0 var(--primary-dark); }
.ps-big:disabled { opacity: .45; }
.ps-big.ps-secondary { background: var(--primary-soft); color: var(--primary-dark); box-shadow: 0 6px 0 var(--border); }

/* zadání (obrázky) */
.ps-stage { display: flex; justify-content: center; width: 100%; }
.ps-show { font-size: clamp(3rem, 14vw, 5.5rem); line-height: 1.1; text-align: center; }
.ps-svg { width: min(70vw, 260px); height: auto; color: var(--text); }
.ps-stack { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 3.4rem; padding: 10px 26px; border-radius: 20px; background: var(--primary-soft); }
.ps-row { display: flex; align-items: center; gap: 10px; font-size: 3.2rem; padding: 8px 14px; border-radius: 20px; background: var(--primary-soft); }
.ps-hand { font-size: 2rem; opacity: .75; }
.ps-count { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 520px; padding: 10px; border-radius: 20px; background: var(--primary-soft); }
.ps-count-scatter { position: relative; width: min(90vw, 420px); height: 260px; display: block; }
.ps-count-scatter .ps-count-item { position: absolute; }
.ps-count-item { width: 64px; height: 64px; border: none; border-radius: 16px; background: transparent; font-size: 2.6rem; cursor: pointer; }
.ps-count-item.ps-counted { background: var(--almost-bg); outline: 3px solid var(--almost); }
.ps-story { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; font-size: 2.6rem; padding: 10px; border-radius: 20px; background: var(--primary-soft); }
.ps-story-new { filter: drop-shadow(0 0 6px var(--ok)); }
.ps-story-op { font-size: 1.8rem; margin: 0 6px; }
.ps-crossed { position: relative; opacity: .45; }
.ps-crossed::after { content: '✖'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--wrong); font-size: 2.4rem; }
.ps-seq { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 2.8rem; padding: 10px; border-radius: 20px; background: var(--primary-soft); }
.ps-seq-gap { width: 1.3em; text-align: center; border-bottom: 5px solid var(--primary); }
.ps-listen-btn { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--primary); background: var(--primary-soft); font-size: 2.8rem; cursor: pointer; animation: ps-pulse 2.4s ease-in-out infinite; }

/* možnosti */
.ps-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; width: 100%; }
.ps-option {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 112px; min-height: 112px; padding: 8px 10px; border: 3px solid var(--border); border-radius: 22px;
  background: var(--card); color: var(--text); cursor: pointer; box-shadow: 0 5px 0 var(--border);
  transition: transform .1s, border-color .12s, opacity .2s;
}
.ps-option:hover:not(:disabled) { border-color: var(--primary); }
.ps-option:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 var(--border); }
.ps-pic { font-size: 3.6rem; line-height: 1.05; }
.ps-options-wide .ps-option { min-width: 150px; }
.ps-options-wide .ps-pic { font-size: 2.2rem; letter-spacing: 2px; }
.ps-option-label { font: 700 .9rem var(--font-body); color: var(--muted); }
.ps-sil { filter: brightness(0); opacity: .85; }
html.dark .ps-sil { filter: brightness(0) invert(1); }
.ps-flip { display: inline-block; transform: scaleX(-1); }
.ps-option.ps-right { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 5px 0 var(--ok); }
.ps-option.ps-wrong-soft { opacity: .45; }
.ps-option.ps-gone { opacity: .2; }
.ps-option.ps-selected { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 5px 0 var(--primary); }
.ps-option.ps-lit { border-color: var(--almost); background: var(--almost-bg); }
.ps-option:disabled { cursor: default; }
.ps-done-btn { margin-top: 6px; }

/* najdi jiný */
.ps-odd { display: grid; grid-template-columns: repeat(3, auto); gap: 10px; justify-content: center; }
.ps-odd-5, .ps-odd-8 { grid-template-columns: repeat(4, auto); }

/* dvojice */
.ps-pairs { display: flex; gap: clamp(24px, 10vw, 90px); justify-content: center; }
.ps-pairs-col { display: flex; flex-direction: column; gap: 10px; }
.ps-pair { min-width: 96px; min-height: 96px; }
.ps-pair.ps-paired { border-color: var(--pair); background: color-mix(in srgb, var(--pair) 18%, var(--card)); box-shadow: 0 5px 0 var(--pair); }

/* třídění a scény */
.ps-zones { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.ps-zone {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 150px; min-height: 150px; flex: 1 1 150px; max-width: 280px;
  padding: 10px; border: 4px dashed var(--border); border-radius: 22px; background: var(--card); color: var(--text); cursor: pointer;
}
.ps-zone-head { font-size: 2.6rem; }
.ps-zone-label { font: 800 1rem var(--font-head); color: var(--muted); }
.ps-zone-items { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; font-size: 2rem; }
.ps-zone.ps-over, .ps-scene-zone.ps-over { border-color: var(--primary); background: var(--primary-soft); }
.ps-tray { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; min-height: 84px; padding: 8px; border-radius: 20px; background: var(--primary-soft); width: 100%; }
.ps-chip {
  width: 80px; height: 80px; border: 3px solid var(--primary); border-radius: 20px; background: var(--card); font-size: 2.7rem;
  cursor: grab; touch-action: none; user-select: none; box-shadow: 0 5px 0 var(--primary-soft);
}
.ps-chip.ps-selected { outline: 4px solid var(--almost); }
.ps-chip.ps-dragging { opacity: .35; }
.ps-ghost { position: fixed; z-index: 200; pointer-events: none; transform: translate(-50%, -50%) scale(1.1); margin: 0; }
.ps-scene { position: relative; width: min(92vw, 520px); aspect-ratio: 1.45; border-radius: 22px; background: color-mix(in srgb, var(--primary-soft) 70%, var(--card)); overflow: hidden; color: var(--text); }
.ps-scene-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ps-scene-zone { position: absolute; display: grid; place-items: center; border: 3px dashed transparent; border-radius: 16px; background: transparent; cursor: pointer; }
.ps-scene-zone.ps-zone-show { border-color: color-mix(in srgb, var(--primary) 55%, transparent); }
.ps-scene-zone.ps-right { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.ps-placed { font-size: 2.8rem; animation: pop .35s ease-out; }
.ps-placed-wrong { opacity: .6; }

/* řazení */
.ps-slots { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ps-slots-tower { flex-direction: column-reverse; }
.ps-slot {
  position: relative; width: 92px; height: 92px; display: grid; place-items: center; border: 3px dashed var(--border); border-radius: 18px;
  background: var(--card); color: var(--text); cursor: pointer;
}
.ps-slot.ps-filled { border-style: solid; border-color: var(--primary); }
.ps-slot.ps-right { border-color: var(--ok); background: var(--ok-bg); }
.ps-slot-no { position: absolute; top: 2px; left: 8px; font: 800 .9rem var(--font-head); color: var(--muted); }
.ps-slot-pic { font-size: 2.8rem; }
.ps-option.ps-used { opacity: .3; }
.ps-vzor { display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; padding: 8px 18px; border-radius: 16px; background: var(--primary-soft); font-size: 2rem; }
.ps-vzor-label { font: 800 .85rem var(--font-head); color: var(--muted); }

/* paměť a pexeso */
.ps-memory-show { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 3.4rem; padding: 12px 18px; border-radius: 22px; background: var(--primary-soft); }
.ps-memory-gone { opacity: .5; }
.ps-pexeso { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(92vw, 420px); }
.ps-pexeso-4 { grid-template-columns: repeat(4, 1fr); }
.ps-pexeso-6 { grid-template-columns: repeat(4, 1fr); }
.ps-pcard {
  position: relative; aspect-ratio: 1; border: 3px solid var(--primary); border-radius: 16px; background: var(--primary); cursor: pointer; padding: 0;
  font-size: 2.4rem; color: var(--on-primary);
}
.ps-pcard .ps-card-face { display: none; }
.ps-pcard.ps-open, .ps-pcard.ps-peek { background: var(--card); }
.ps-pcard.ps-open .ps-card-face, .ps-pcard.ps-peek .ps-card-face { display: inline; }
.ps-pcard.ps-open .ps-card-back, .ps-pcard.ps-peek .ps-card-back { display: none; }
.ps-pcard.ps-found { border-color: var(--ok); background: var(--ok-bg); }

/* kreslení */
.ps-draw { width: 100%; max-width: 640px; display: flex; justify-content: center; }
.ps-canvas { border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 3px var(--border); touch-action: none; cursor: crosshair; }
.ps-draw-tools { display: flex; gap: 12px; align-items: center; justify-content: center; }
.ps-round-btn { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--border); background: var(--card); font-size: 1.8rem; cursor: pointer; }

/* dospělý potvrzuje */
.ps-adult { width: 100%; max-width: 560px; padding: 14px 16px; border-radius: 20px; border: 2px dashed var(--border); background: var(--surface, var(--card)); color: var(--text); }
.ps-adult-head { margin: 0 0 6px; font-weight: 800; }
.ps-adult-tips { margin: 0 0 10px; color: var(--muted); }
.ps-adult-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ps-steps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; font-size: 2rem; }
.ps-step { padding: 6px 12px; border-radius: 16px; background: var(--primary-soft); }

/* konec kola, oslavy */
.ps-done-text { font: 800 1.35rem var(--font-head); }
.ps-done-buttons { display: grid; gap: 12px; margin-top: 14px; }
.ps-new-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ps-badge-new { padding: 6px 14px; border-radius: 999px; background: var(--almost-bg); font-weight: 800; }
.ps-celebrate-card { text-align: center; }
.ps-celebrate-emoji { font-size: 4.5rem; line-height: 1.1; animation: ps-bounce 1s ease-out; }

/* týdny, zápis */
.ps-week-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ps-week {
  display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 8px 14px; border-radius: 20px; border: 3px solid var(--border);
  background: var(--card); color: var(--text); font: 800 1.15rem var(--font-head); cursor: pointer; text-align: left;
}
.ps-week-no { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); flex: none; }
.ps-week-emoji { font-size: 1.8rem; }
.ps-week-name { flex: 1; }
.ps-week-done { border-color: var(--ok); background: var(--ok-bg); }
.ps-teacher { font-size: 4.5rem; line-height: 1; }
.ps-zapis-stations { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ps-station { padding: 8px 14px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; }
.ps-station-note { background: var(--ok-bg); color: var(--ok); }
.ps-zapis-end { width: 100%; }
.ps-zapis-summary { list-style: none; padding: 0; display: grid; gap: 4px; text-align: left; max-width: 360px; margin: 0 auto; font-size: 1.1rem; }
.ps-rec { display: grid; gap: 8px; margin-bottom: 14px; }

/* odměny */
.ps-reward-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.ps-total { display: flex; flex-direction: column; align-items: center; padding: 12px; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); color: var(--text); }
.ps-total-emoji { font-size: 2.2rem; }
.ps-total b { font: 800 1.6rem var(--font-head); }
.ps-reward-areas { display: grid; gap: 8px; }
.ps-reward-area { display: grid; grid-template-columns: 44px minmax(120px, 1fr) 2fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; background: var(--card); color: var(--text); }
.ps-reward-area .ps-area-emoji { font-size: 1.9rem; }
.ps-reward-area .ps-area-name { text-align: left; }
.ps-reward-count { font-weight: 800; white-space: nowrap; }
.ps-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ps-badge { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px; border-radius: 18px; background: var(--card); color: var(--text); text-align: center; cursor: pointer; box-shadow: var(--shadow); }
.ps-badge-emoji { font-size: 2.4rem; }
.ps-badge-name { font: 800 1rem var(--font-head); }
.ps-badge .ps-muted { font-size: .85rem; }
.ps-badge-locked { opacity: .5; }

/* animace */
.ps-shake { animation: shake .45s ease-in-out; }
.ps-glow { animation: ps-glow 1.2s ease-in-out 2; }
@keyframes ps-glow { 50% { box-shadow: 0 0 0 6px var(--almost); border-color: var(--almost); } }
@keyframes ps-pulse { 50% { transform: scale(1.06); } }
@keyframes ps-bounce { 0% { transform: scale(.3); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .predskolak *, .predskolak *::before, .predskolak *::after { animation: none !important; transition: none !important; }
}

/* telefon */
@media (max-width: 520px) {
  .ps-brand span { display: none; }
  .ps-round { width: 42px; height: 42px; font-size: 1.15rem; }
  .ps-counter { font-size: .95rem; padding: 3px 8px; }
  .ps-option { min-width: 92px; min-height: 92px; }
  .ps-pic { font-size: 2.9rem; }
  .ps-areas { grid-template-columns: 1fr 1fr; }
  .ps-area { min-height: 132px; }
  .ps-chip { width: 68px; height: 68px; font-size: 2.2rem; }
  .ps-slot { width: 72px; height: 72px; }
  .ps-reward-area { grid-template-columns: 36px 1fr auto; }
  .ps-reward-area .ps-area-bar { grid-column: 1 / -1; }
}
