/* Pack C views (src/ui/games/cita-tiho.js, koji-slog.js, procitaj.js). Linked from index.html after packb.css. */

/* Momo čita tiho: the written word, one box per letter (LJ NJ DŽ in one box) */
.ct-top { width: 100%; }
.ct-word { display: flex; flex-wrap: nowrap; justify-content: center; gap: 5px; max-width: 100%; padding: 10px 12px 12px; background: var(--paper); border: 3px solid var(--ink); border-radius: 18px 16px 19px 15px / 15px 19px 16px 18px; box-shadow: 0 4px 0 var(--shadow); }
.ct-l {
  min-width: .9em; padding: 0 3px; font-size: clamp(38px, 12.5vw, 64px); font-weight: 800; line-height: 1.15; letter-spacing: .01em; text-align: center;
  border-bottom: 3px solid rgba(58, 47, 42, .18); border-radius: 8px; transition: background .12s, transform .12s;
}
.ct-word.long .ct-l { font-size: clamp(25px, 7.6vw, 46px); padding: 0 2px; }
.ct-word.long { gap: 3px; padding: 10px 8px 12px; }
.ct-l.on { background: var(--sun); transform: translateY(-4px); }
.ct-l.all, .ct-word.done .ct-l { background: var(--leaf); }

/* Koji slog čuješ?: the listen button, the syllable tiles, the word picture after solving */
.ks-top { flex-direction: column; gap: 10px; }
.ks-src { min-height: 84px; display: flex; align-items: center; gap: 10px; visibility: hidden; }
.ks-src.on { visibility: visible; animation: rise .3s ease-out; }
.ks-src .pic { width: 76px; border: 2.5px solid var(--ink); border-radius: 12px; }
.ks-word { font-size: clamp(22px, 7vw, 32px); font-weight: 800; letter-spacing: .05em; }
.choices.ks .lt { font-size: clamp(36px, 11.5vw, 58px); }
.choices.ks .ks-tile.long .lt { font-size: clamp(27px, 8.2vw, 46px); }

/* Pročitaj i pokaži: the sentence card, the reading dot, picture pairs (one pair per row) */
.pp-top { width: 100%; }
.pp-sent {
  position: relative; margin: 0; max-width: 100%; padding: 10px 14px 20px; text-align: center; font-size: clamp(30px, 9.6vw, 54px); font-weight: 800; line-height: 1.3; letter-spacing: .04em;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 18px 16px 19px 15px / 15px 19px 16px 18px; box-shadow: 0 4px 0 var(--shadow);
}
.pp-sent.long { font-size: clamp(25px, 7.6vw, 46px); }
.pp-w { display: inline-block; border-radius: 8px; padding: 0 2px; transition: background .12s; }
.pp-w.on { background: var(--hl); }
.pp-sent.done .pp-w { background: var(--leaf); }
.pp-dot { position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); opacity: 0; transition: left .22s ease-out, top .22s ease-out, opacity .2s; pointer-events: none; }
.pp-dot.on { opacity: 1; }
.choices.pp-pairs { grid-template-columns: minmax(0, 1fr); max-width: 236px; margin: 0 auto; gap: 10px; }
.pp-pair { aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; }
.pp-pair .pic { height: auto; aspect-ratio: 1; border-radius: 10px; }

@media (max-height: 700px) and (orientation: portrait) {
  .ct-l { font-size: clamp(34px, 11vw, 52px); }
  .ks-src { min-height: 66px; } .ks-src .pic { width: 60px; }
  .choices.pp-pairs { max-width: 196px; gap: 8px; }
}
@media (min-width: 700px) {
  .choices.pp-pairs { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 640px; gap: 16px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .play-zone.game-cita-tiho, .play-zone.game-procitaj { grid-template-columns: minmax(0, 1fr); }
  .play-zone.game-cita-tiho > *, .play-zone.game-procitaj > * { grid-column: 1; }
  .game-cita-tiho .pic-tile, .game-procitaj .pic-tile:not(.pp-pair) { max-width: 108px; margin: 0 auto; width: 100%; }
  .choices.pp-pairs { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; }
  .pp-pair { max-width: 180px; margin: 0 auto; width: 100%; }
  .ct-l { font-size: clamp(26px, 8dvh, 44px); }
  .pp-sent, .pp-sent.long { font-size: clamp(22px, 7dvh, 36px); padding-bottom: 16px; }
  .ks-src { min-height: 56px; } .ks-src .pic { width: 52px; }
}
