/* Szpula Iki: ekrany startowe. Sześć utworów, trzy poziomy i kalibracja muszą zmieścić się na małym telefonie. */
body[data-ekran="start"] #ov-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
body[data-blok] .overlay { pointer-events: none; }
body[data-ekran="start"] .ov-card { padding: 14px; gap: 10px; }
.naglowek { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 0 auto 6px; }
.logo-gry { display: block; flex: 0 1 auto; min-width: 0; width: 232px; height: auto; }
.ika-start { display: block; flex: none; width: 92px; height: 92px; }
body[data-ekran="start"] .ov-text { font-size: 14px; line-height: 1.35; text-align: center; }
.ov-extra { display: flex; flex-direction: column; gap: 8px; }
.utwory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.utw { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-height: 50px; padding: 4px 10px; text-align: left; line-height: 1.2; }
.utw b { font-size: clamp(11.5px, 3.3vw, 13px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.utw span { font-family: var(--mono); font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.utw span i { font-style: normal; color: var(--am); letter-spacing: 1px; }
.poziomy { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.poziomy .lvl { padding: 0 4px; }
.narz { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.narz .lvl { font-size: 12px; font-weight: 600; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.narz small { display: block; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.tryby { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tryby .lvl { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 2px; font-size: clamp(12px, 3.4vw, 14px); }
.tryby img { width: 22px; height: 22px; flex: none; }
.maratony { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.maratony .utw { padding: 4px 6px; }
.odz { width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; }
.wyj { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.wyj .lvl { font-size: 12px; padding: 0 8px; border-color: var(--am); color: var(--am); line-height: 1.15; }
.cw-utw { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.cw-utw select { min-height: 44px; min-width: 0; width: 100%; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--key); color: var(--fg); font: inherit; font-weight: 600; }
.fragmenty { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.fragmenty .lvl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 2px; line-height: 1.15; }
.fragmenty b { font-size: 12px; }
.fragmenty span { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.tempa { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.tempa .lvl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 2px; line-height: 1.12; min-height: 50px; }
.tempa b { font-size: 16px; font-weight: 800; }
.tempa span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.tempa .lvl[aria-pressed="true"] span { color: inherit; }
/* Wynik ma się mieścić bez przewijania: Ika i gwiazdki w jednym rzędzie, liczby zwarto, przyciski pod nimi. */
body[data-ekran="wynik"] .ov-card { padding: 14px 16px; gap: 8px; }
body[data-ekran="wynik"] .ov-card h2 { font-size: 26px; }
body[data-ekran="wynik"] .ov-text { font-size: 14px; line-height: 1.35; }
body[data-ekran="wynik"] .ov-extra { gap: 7px; }
.wynik-gora { display: flex; align-items: center; justify-content: center; gap: 12px; }
.ika-wynik { display: block; flex: none; width: 92px; height: 92px; }
.ika-opis { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.ika-opis span { font-size: 15px; font-weight: 800; font-style: italic; color: var(--am); }
.ika-opis .stars img { width: 38px; height: 38px; }
body[data-ekran="wynik"] .stat { padding: 5px 8px; gap: 1px; }
body[data-ekran="wynik"] .stat span { font-size: 8.5px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; }
body[data-ekran="wynik"] .stat b { font-size: 24px; }
body[data-ekran="wynik"] .levels { gap: 6px; }
body[data-ekran="wynik"] .levels .lvl { flex: 1 1 auto; padding: 0 8px; font-size: 13px; white-space: nowrap; }
.opcje { display: flex; flex-direction: column; gap: 10px; }
.opc { display: flex; flex-direction: column; gap: 4px; }
.opc > span { font-size: 13px; color: var(--muted); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.seg .lvl { padding: 0 4px; font-size: 13px; }
.wyg-t { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.wyg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.wyg-k { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding: 5px 2px; min-height: 92px; line-height: 1.15; }
.wyg-k img { width: 100%; height: 40px; object-fit: contain; }
.stroj .wyg-k img { height: 52px; }
.wyg-k b { font-size: 11px; }
.wyg-k span { font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.zasady { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.zasady li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 14px; line-height: 1.35; color: var(--muted); }
.zasady img { width: 44px; height: 44px; }
.zasady b { color: var(--fg); }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat span { font-size: 9px; letter-spacing: 0.08em; }
@media (max-height: 500px) {
  body[data-ekran="start"] .ov-card { max-width: 760px; padding: 8px 14px; gap: 5px; }
  .naglowek { float: left; margin: 0 12px 0 0; gap: 2px; }
  .logo-gry { width: 106px; }
  .ika-start { width: 46px; height: 46px; }
  body[data-ekran="start"] .ov-text { font-size: 12px; text-align: left; min-height: 41px; display: flow-root; }
  /* Poziomo liczy się każdy rząd: tryby i narzędzia dzielą jeden, a reszta idzie na całą szerokość. */
  body[data-ekran="start"] .ov-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .ov-extra > .tryby { order: -4; }
  .ov-extra > .narz { order: -3; }
  .ov-extra > .cw-utw { order: -2; }
  body[data-tryb="cwicz"] .ov-extra > .tempa { order: -1; }
  body[data-ekran="opcje"] .ov-card { padding: 8px 14px; gap: 5px; }
  body[data-ekran="opcje"] .ov-card h2 { font-size: 20px; }
  body[data-ekran="opcje"] .ov-text { font-size: 12.5px; line-height: 1.25; }
  .ov-extra > .utwory, .ov-extra > .maratony, .ov-extra > .fragmenty, .ov-extra > .wyj { grid-column: 1 / -1; }
  body[data-tryb="cwicz"] .ov-extra > .poziomy { grid-column: 1 / -1; }
  .tempa .lvl { min-height: 44px; }
  .tempa b { font-size: 14px; }
  .tempa span { font-size: 9px; }
  body[data-ekran="wynik"] .ov-card { max-width: 760px; padding: 8px 14px; gap: 5px; }
  body[data-ekran="wynik"] .ov-card h2 { font-size: 20px; }
  body[data-ekran="wynik"] .ov-text { font-size: 12.5px; line-height: 1.25; }
  body[data-ekran="wynik"] .ov-extra { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 5px 10px; align-items: center; }
  body[data-ekran="wynik"] .ov-extra > .levels { grid-column: 1 / -1; }
  .wynik-gora { justify-content: flex-start; }
  .ika-wynik { width: 84px; height: 84px; }
  body[data-ekran="wynik"] .stat { padding: 3px 8px; }
  body[data-ekran="wynik"] .stat b { font-size: 20px; }
  body[data-tryb="cwicz"][data-ekran="start"] .ov-text { min-height: 34px; }
  body[data-tryb="cwicz"][data-ekran="start"] .ov-card { padding: 6px 14px; }
  .tryby img { width: 18px; height: 18px; }
  .fragmenty { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .opcje { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
  .opc > span { font-size: 12px; }
  .ov-card:has(.opcje) { max-width: 760px; }
  .ov-card:has(.wyg) { max-width: 760px; }
  .wyg-k { min-height: 74px; }
  .wyg-k img, .stroj .wyg-k img { height: 34px; }
  .zasady { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }
  .utwory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .utw { min-height: 44px; }
  .narz .lvl, .poziomy .lvl { min-height: 44px; }
  .poziomy { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov-extra { gap: 6px; }
  .zasady { gap: 4px; }
  .zasady img { width: 32px; height: 32px; }
  .zasady li { grid-template-columns: 32px minmax(0, 1fr); font-size: 12px; line-height: 1.25; }
  body[data-ekran="start"] .ov-btns .main { min-height: 44px; }
}
@media (max-height: 660px) and (min-height: 501px) {
  .logo-gry { width: 190px; }
  .ika-start { width: 76px; height: 76px; }
  .naglowek { margin-bottom: 2px; }
  .tempa .lvl { min-height: 46px; }
  .ika-wynik { width: 76px; height: 76px; }
  .ika-opis .stars img { width: 32px; height: 32px; }
  body[data-ekran="wynik"] .stat span { font-size: 8px; letter-spacing: 0; }
  body[data-ekran="wynik"] .ov-text { font-size: 13px; line-height: 1.3; }
  .zasady { gap: 5px; }
  .zasady li { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; font-size: 12.5px; line-height: 1.25; }
  .zasady img { width: 34px; height: 34px; }
  body[data-ekran="jak"] .ov-card { padding: 12px 14px; gap: 8px; }
  body[data-ekran="jak"] .ov-card h2 { font-size: 24px; }
  .utw { min-height: 46px; }
  body[data-tryb="cwicz"][data-ekran="start"] .logo-gry { width: 130px; }
  body[data-tryb="cwicz"][data-ekran="start"] .ika-start { width: 56px; height: 56px; }
  body[data-ekran="opcje"] .ov-card { padding: 14px; gap: 8px; }
  body[data-ekran="opcje"] .ov-card h2 { font-size: 24px; }
  body[data-ekran="opcje"] .ov-text { font-size: 13px; line-height: 1.3; }
  .opcje { gap: 6px; }
}
