/* Zakładki księgi: tabliczki wsunięte za górną krawędź okładki (dół schowany pod okładką), wybrana leży na okładce i wpada na stronę. */
.zak-ksiegi { position: relative; display: flex; align-items: flex-end; gap: 4px; padding: 0 64px; margin-bottom: -30px; }
.zak-ksiegi .zak { min-height: 66px; padding: 0 14px 22px; font-size: 15.5px; }
.zak-ksiegi .zak:hover { transform: translateY(-3px); filter: brightness(1.15); }
.zak-ksiegi .zak[aria-selected="true"] { z-index: 2; color: #3a1e10; text-shadow: 0 1px 0 #fff3cf88; border-image: url(/ui/k/zak_akt.webp) 44 54 92 54 fill / 12px 16px 24px 16px stretch; min-height: 74px; padding-bottom: 22px; transform: none; }
.zak-ksiegi .odstep { flex: 1; }
@media (max-width: 1100px) { .zak-ksiegi { padding: 0 52px; } .zak-ksiegi .zak { padding: 0 9px 22px; font-size: 14.5px; gap: 6px; } }
@media (max-width: 760px) {
  .zak-ksiegi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 3px; padding: 0 4px; margin-bottom: -16px; }
  .zak-ksiegi.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .zak-ksiegi .odstep { display: none; }
  .zak-ksiegi .zak { flex-direction: column; justify-content: flex-start; gap: 1px; min-height: 54px; padding: 0 2px 12px; font-size: 13px; border-width: 7px; border-image-width: 7px; white-space: nowrap; }
  .zak-ksiegi .zak img { width: 18px; height: 18px; }
  .zak-ksiegi .zak[aria-selected="true"] { min-height: 56px; border-image-width: 7px 7px 14px 7px; padding-bottom: 12px; }
  .zak-ksiegi .zak span.dl { display: none; }
}
/* Wnętrze księgi: encyklopedia i menedżer postaci (lista po lewej, karta po prawej – jak menu gry). */
.menedzer { gap: 14px; }
.naglowek-listy { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.naglowek-listy .nagl { margin-bottom: 8px; }
.naglowek-listy .ile { font-size: 14px; color: var(--brazowy); white-space: nowrap; }
.szukaj { margin-bottom: 10px; }
.szukaj input { background: #efd9a8 url(/ui/k/ik/cel.webp) 10px center/22px no-repeat; padding-left: 40px; border: 2px solid #9a7a4c; box-shadow: inset 0 3px 5px #8a6a3a55; color: var(--atrament); }
.szukaj input::placeholder { color: #8a6a48; }
.ksiega.wysoka > .lewa:has(.lista-ramka) { display: flex; flex-direction: column; }
.lista-ramka { position: relative; flex: 1 1 0; min-height: 440px; }
#lista { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; overflow: auto; padding: 2px 6px 12px 0; scrollbar-width: thin; scrollbar-color: #a07a44 #e2c99a; -webkit-mask-image: linear-gradient(#000 calc(100% - 18px), #0006); mask-image: linear-gradient(#000 calc(100% - 18px), #0006); }
#lista > * { flex: none; }
#lista.koniec { -webkit-mask-image: none; mask-image: none; }
.wiecej { align-self: center; margin-top: 8px; white-space: nowrap; padding: 3px 14px; font-size: 13.5px; font-weight: 700; color: #fbe6b8; background: #5a2a14; border: 1px solid #c8964a; box-shadow: 0 2px 0 #0005; pointer-events: none; }
.wiersz .mini { width: 46px; height: 46px; display: grid; place-items: center; border-style: solid; border-width: 4px; border-image: url(/ui/k/slot.webp) 30 fill / 4px stretch; overflow: hidden; }
.wiersz .mini img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.wiersz .mini .duszek { width: 38px; height: 38px; background-size: 300% 100%; background-position: 0 0; image-rendering: pixelated; transform: scale(1.8); }
.wiersz .poz { font-weight: 700; color: #5a1c10; font-size: 14px; text-align: right; white-space: nowrap; }
.wiersz .poz small { display: block; font-weight: 400; }
.karta-puste { display: grid; place-items: center; min-height: 300px; text-align: center; color: var(--brazowy); }
.karta h2 { font-size: 26px; color: #5a1c10; margin-bottom: 2px; }
.karta .pod { color: var(--brazowy); margin-bottom: 12px; }
.karta .obraz { display: grid; place-items: center; min-height: 200px; margin: 6px auto 14px; max-width: 360px; border-style: solid; border-width: 10px; border-image: url(/ui/k/slot.webp) 30 / 10px stretch; background: radial-gradient(closest-side, #f6e6c0, #dcc08a 75%, #c4a26a); }
.karta .obraz img { max-height: 260px; width: auto; image-rendering: auto; }
.karta .obraz img.pix { image-rendering: pixelated; width: 190px; height: 190px; object-fit: contain; }
.duszek-duzy { width: 300px; height: 300px; max-width: 100%; background-size: 300% 100%; image-rendering: pixelated; animation: klatki 0.9s steps(3) infinite; }
@keyframes klatki { from { background-position: 0 0; } to { background-position: 150% 0; } }
.karta h4 { color: #5a1c10; font-size: 17px; margin: 14px 0 6px; display: flex; align-items: center; gap: 8px; }
.karta h4::after { content: ""; flex: 1; height: 8px; background: url(/ui/k/orn_linia.webp) left center/200% 100% no-repeat; opacity: .8; }
.tabela { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabela th, .tabela td { text-align: left; padding: 5px 6px; border-bottom: 1px dotted #b89a6a; }
.tabela th { color: #5a1c10; font-weight: 700; }
.tabela td.l, .tabela th.l { text-align: right; font-variant-numeric: tabular-nums; }
.czesci { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.czesci figure { margin: 0; text-align: center; font-size: 12.5px; color: var(--brazowy); }
.czesci .slot { aspect-ratio: 1; }
.czesci .slot img { image-rendering: auto; }
.chipy { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 2px 10px; background: #e0c48e; border: 1px solid #a5855a; font-size: 14px; color: var(--atrament); border-radius: 2px; }
.chip.slaby { background: #f0c8a8; border-color: #b8603c; } .chip.mocny { background: #c8d8a8; border-color: #6a8a3c; }
.wstecz { display: none; }
@media (max-width: 760px) {
  .ksiega.wysoka .str.prawa:empty { display: none; }
  .s-kowal .wiersz, .s-alchemik .wiersz { grid-template-columns: auto minmax(0, 1fr); row-gap: 0; }
  .s-kowal .wiersz > .poz, .s-alchemik .wiersz > .poz { grid-column: 2; text-align: left; justify-self: start; margin-top: -2px; }
  .wiersz > .poz small { display: inline; }
  .wiersz small { font-size: 14.5px; }
  .wstecz { display: inline-flex; margin-bottom: 12px; }
  /* encyklopedia na telefonie: albo lista, albo jedna karta */
  .ksiega.wysoka > .lewa:has(.lista-ramka) { display: block; }
  .ksiega.wysoka.ma-karte > .lewa, .ksiega.wysoka.ma-karte > .lewa:has(.lista-ramka) { display: none; }
  .ksiega.ma-karte > .prawa { border-top: 0; padding-top: 6px; }
  .ksiega.ma-karte > .prawa::before { display: none; }
  .lista-ramka { min-height: 0; } #lista { position: static; max-height: none; overflow: visible; -webkit-mask-image: none; mask-image: none; padding-bottom: 0; }
  .tabela.czesci-t thead { display: none; }
  .tabela.czesci-t tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 8px; padding: 6px 0; border-bottom: 1px dotted #b89a6a; }
  .tabela.czesci-t td, .tabela.czesci-t th { border: 0; padding: 1px 0; text-align: left; font-size: 14.5px; }
  .tabela.czesci-t .n { grid-column: 1 / -1; font-weight: 700; color: #4a1c10; }
  .tabela.czesci-t [data-l]::before { content: attr(data-l) " "; font-weight: 400; color: var(--brazowy); font-size: 13px; }
  .tabela.czesci-t tr.razem th:empty { display: none; }
  .czesci { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .karta .obraz { min-height: 150px; }
}
.karta .obraz.arena { aspect-ratio: 16 / 10; max-width: 420px; min-height: 0; background-size: cover; background-position: center; overflow: hidden; position: relative; }
.karta .obraz.arena::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 40px #0008; pointer-events: none; }
.karta .obraz.arena .duszek-duzy { width: 260px; height: 260px; transform: translateY(-6%) scale(1.4); transform-origin: 50% 66%; filter: drop-shadow(0 6px 0 #0005); }
@media (max-width: 760px) { .karta .obraz.arena .duszek-duzy { width: 220px; height: 220px; transform: translateY(-9%) scale(1.15); transform-origin: 50% 62%; } }
.wiecej-tel { margin: 12px auto 4px; justify-self: center; align-self: center; }
.wiersz .mini.hd img { image-rendering: auto; }   /* ilustracje HD w miniaturze: płynne zmniejszenie (2026-11-29) */
