@font-face {
  font-family:Literata;
  src:url('assets/fonts/literata-latin-400-normal.woff2') format('woff2');
  font-style:normal;
  font-weight:400;
  font-display:swap;
}
@font-face {
  font-family:Literata;
  src:url('assets/fonts/literata-latin-ext-400-normal.woff2') format('woff2');
  font-style:normal;
  font-weight:400;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF;
}
@font-face {
  font-family:Nunito;
  src:url('assets/fonts/nunito-sans-latin-400-normal.woff2') format('woff2');
  font-weight:400;
  font-display:swap;
}
@font-face {
  font-family:Nunito;
  src:url('assets/fonts/nunito-sans-latin-ext-400-normal.woff2') format('woff2');
  font-weight:400;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF;
}
@font-face {
  font-family:Nunito;
  src:url('assets/fonts/nunito-sans-latin-600-normal.woff2') format('woff2');
  font-weight:600;
  font-display:swap;
}
@font-face {
  font-family:Nunito;
  src:url('assets/fonts/nunito-sans-latin-ext-600-normal.woff2') format('woff2');
  font-weight:600;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF;
}
@font-face {
  font-family:Nunito;
  src:url('assets/fonts/nunito-sans-latin-700-normal.woff2') format('woff2');
  font-weight:700;
  font-display:swap;
}
@font-face {
  font-family:Nunito;
  src:url('assets/fonts/nunito-sans-latin-ext-700-normal.woff2') format('woff2');
  font-weight:700;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF;
}
:root {
  --paper:#f6f3ec;
  --ink:#302d35;
  --muted:#6a626d;
  --plum:#51415c;
  --plum-hover:#3f304a;
  --line:#d9d2c9;
  --shelf:#eae7df;
  --sage:#dde4d8;
  --white:#fffefa;
  --focus:#78608d;
  --radius:12px;
  color:var(--ink);
  background:var(--paper);
  font:400 16px/1.55 Nunito,sans-serif;
  scrollbar-color:#b4a9b8 var(--paper);
  scrollbar-width:thin;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,input {
  font:inherit;
}
a {
  color:inherit;
  text-underline-offset:4px;
}
button,a {
  -webkit-tap-highlight-color:transparent;
}
button {
  cursor:pointer;
}
button:disabled {
  cursor:default;
  opacity:.38;
}
button,a,input {
  touch-action:manipulation;
}
button:focus-visible,a:focus-visible,input:focus-visible,[tabindex]:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:5px;
}
::selection {
  background:#dbcee3;
  color:var(--ink);
}
input {
  caret-color:var(--plum);
}
[hidden] {
  display:none!important;
}
svg {
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  flex-shrink:0;
}
.svg-defs {
  position:absolute;
  width:0;
  height:0;
}
.wrap {
  width:min(1184px,calc(100% - 96px));
  margin-inline:auto;
}
.sr-only,.skip-link:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.skip-link:focus {
  position:fixed;
  z-index:20;
  top:12px;
  left:12px;
  background:var(--white);
  padding:12px;
}
.site-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-block:26px;
  border-bottom:1px solid var(--line);
}
.brand {
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  font-weight:700;
  font-size:23px;
  letter-spacing:-.025em;
}
.brand svg {
  width:30px;
  height:30px;
  color:var(--plum);
}
.brand-dot {
  color:#89709a;
}
.header-note {
  color:var(--muted);
  font-size:14px;
}
.introduction {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:32px;
  padding:32px 0 30px;
}
h1,h2,h3,p {
  margin:0;
}
h1,h2,h3 {
  font-weight:400;
}
h1,h3 {
  font-family:Literata,Georgia,serif;
  text-wrap:balance;
}
h1 {
  font-size:clamp(32px,3.2vw,40px);
  line-height:1.2;
  letter-spacing:-.025em;
}
.introduction p {
  margin-top:16px;
  color:var(--muted);
  font-size:17px;
}
.collection-heading {
  display:flex;
  align-items:baseline;
  gap:14px;
  margin-bottom:24px;
}
.collection-heading h2 {
  font-size:16px;
  font-weight:700;
}
.collection-heading>span {
  color:var(--muted);
  font-size:14px;
}
.books {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:32px;
}
.book {
  min-width:0;
  display:flex;
  flex-direction:column;
}
.cover-link {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--shelf);
  padding:23px 22px;
  aspect-ratio: .88;
  text-decoration:none;
  border-radius:3px;
}
.book:nth-child(2) .cover-link {
  background:#e1e7e4;
}
.book:nth-child(3) .cover-link {
  background:#e8e0da;
}
.book:nth-child(4) .cover-link {
  background:#e7e6d8;
}
.cover-link img {
  position:absolute;
  inset:22px;
  width:calc(100% - 44px);
  height:calc(100% - 44px);
  object-fit:contain;
  filter:drop-shadow(3px 8px 7px #302d3529);
  transition:transform .3s cubic-bezier(.16,1,.3,1),filter .3s cubic-bezier(.16,1,.3,1);
}
.cover-link:hover img {
  transform:translateY(-5px) rotate(-1deg);
  filter:drop-shadow(4px 13px 9px #302d3538);
}
.cover-link[href="#czytaj/dragonball-majtki"] img,
.cover-link[href="#czytaj/dragonball-pan-1"] img {
  filter:blur(3px) drop-shadow(3px 8px 7px #302d3529);
}
.cover-link[href="#czytaj/dragonball-majtki"]:hover img,
.cover-link[href="#czytaj/dragonball-pan-1"]:hover img {
  filter:blur(3px) drop-shadow(4px 13px 9px #302d3538);
}
.ribbon {
  position:absolute;
  top:0;
  right:15px;
  width:30px;
  height:38px;
  background:var(--plum);
  color:var(--white);
  display:grid;
  place-items:center;
  clip-path:polygon(0 0,100% 0,100% 100%,50% 83%,0 100%);
}
.ribbon svg {
  width:16px;
  height:16px;
  margin-bottom:6px;
}
.book h3 {
  font-size:21px;
  line-height:1.4;
  margin-top:20px;
  min-height:2.8em;
}
.book h3 a {
  text-decoration:none;
}
.book h3 a:hover {
  text-decoration:underline;
}
.book-meta {
  font-size:13px;
  color:var(--muted);
  margin:10px 0 16px;
}
.book-action {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:46px;
  padding:10px 15px;
  border:1px solid #bcb1c3;
  border-radius:8px;
  text-decoration:none;
  color:var(--plum);
  font-weight:700;
  font-size:14px;
  margin-top:auto;
  transition:background .15s,color .15s;
}
.book-action:hover,.book-action.resume {
  background:var(--plum);
  color:var(--white);
  border-color:var(--plum);
}
.book-action svg {
  width:19px;
  height:19px;
}
.bookmark-note {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:43px 0 36px;
  color:var(--muted);
  font-size:14px;
}
.bookmark-note svg {
  width:19px;
  height:19px;
}
.bookmark-note strong {
  font-weight:600;
  color:var(--ink);
}
.site-footer {
  display:flex;
  justify-content:space-between;
  gap:24px;
  border-top:1px solid var(--line);
  padding-block:23px;
  color:var(--muted);
  font-size:13px;
}
.site-footer>span:first-child {
  font-weight:700;
  color:var(--plum);
}
.continue {
  display:flex;
  align-items:center;
  gap:14px;
  max-width:360px;
  padding:18px 20px;
  background:var(--sage);
  border-radius:var(--radius);
  text-decoration:none;
}
.continue>svg:first-child {
  color:#465840;
}
.continue>span {
  display:flex;
  flex-direction:column;
  gap:3px;
}
.continue small {
  font-size:12px;
  color:#4e5b48;
}
.continue strong {
  font-weight:700;
  font-size:15px;
}
.continue span span {
  font-size:12px;
  color:#4e5b48;
}
.continue>svg:last-child {
  width:19px;
}
.continue:hover {
  background:#d2ddcd;
}
.reader-header {
  height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:16px 30px;
  border-bottom:1px solid var(--line);
  background:var(--paper);
}
.reader-header h1 {
  font-family:Nunito,sans-serif;
  font-size:17px;
  font-weight:700;
  letter-spacing:0;
  text-align:center;
}
.back-link {
  display:flex;
  align-items:center;
  gap:6px;
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
}
.pdf-link {
  font-size:13px;
  white-space:nowrap;
  color:var(--muted);
}
#reader {
  height:100dvh;
  background:#e6e3dc;
  display:flex;
  flex-direction:column;
}
body.reading {
  overflow:hidden;
}
.reading-area {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:24px 24px 140px;
  position:relative;
  scrollbar-gutter:stable;
}
.paper {
  position:relative;
  background:white;
  box-shadow:0 6px 24px #302d351c;
  margin:0 auto;
  flex-shrink:0;
}
.paper canvas {
  display:block;
}
.paper .textLayer {
  position:absolute;
  inset:0;
  opacity:1;
  line-height:1;
  text-align:initial;
  transform-origin:0 0;
}
.loading,.reader-error {
  position:absolute;
  inset:24px 24px 130px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:16px;
  text-align:center;
  color:var(--muted);
}
.loading-mark {
  background:var(--paper);
  border-radius:50%;
  padding:20px;
  display:flex;
}
.loading-mark svg {
  width:36px;
  height:36px;
}
.reader-error h2 {
  font-family:Literata,serif;
  font-size:26px;
  color:var(--ink);
}
.reader-error a {
  font-size:14px;
}
.primary {
  background:var(--plum)!important;
  color:var(--white)!important;
  border:0;
  border-radius:8px;
  padding:10px 16px;
  font-weight:700;
}
.primary:hover:not(:disabled) {
  background:var(--plum-hover)!important;
}
.reader-bottom {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:0 16px max(20px,env(safe-area-inset-bottom));
  pointer-events:none;
  background:linear-gradient(0deg,#e6e3dc 65%,#e6e3dc00);
}
.reader-status {
  min-height:27px;
  padding:2px 10px;
  color:#554d58;
  font-size:12px;
  text-align:center;
}
.toolbar {
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--white);
  border-radius:var(--radius);
  box-shadow:0 7px 30px #302d3521;
  padding:10px;
  pointer-events:auto;
}
.page-controls,.zoom-controls {
  display:flex;
  align-items:center;
  gap:5px;
}
.icon-button {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  padding:0;
  border:0;
  border-radius:8px;
  color:var(--plum);
  background:transparent;
}
.icon-button:hover:not(:disabled),.fit-button:hover {
  background:#eee8f1;
}
#page-form {
  display:flex;
  align-items:center;
  gap:6px;
  font-size:14px;
  white-space:nowrap;
  padding-inline:5px;
  font-variant-numeric:tabular-nums;
}
#page-number {
  width:48px;
  padding:6px 2px;
  border:1px solid var(--line);
  border-radius:5px;
  text-align:center;
  background:var(--paper);
  color:var(--ink);
  appearance:textfield;
  font-weight:700;
}
#page-number::-webkit-inner-spin-button,#page-number::-webkit-outer-spin-button {
  -webkit-appearance:none;
}
.toolbar-divider {
  width:1px;
  height:28px;
  background:var(--line);
}
.fit-button {
  height:44px;
  min-width:79px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--plum);
  font-size:13px;
  font-weight:700;
}
.fullscreen {
  margin-left:2px;
}
.catalog-retry {
  margin-top:16px;
}
@media(min-width:1450px) {
  .introduction {
    padding-block:40px 36px;
  }
  .cover-link {
    padding:26px;
  }
  .books {
    gap:38px;
  }
}
@media(max-width:1000px) {
  .wrap {
    width:calc(100% - 48px);
  }
  .books {
    gap:22px;
  }
  .cover-link {
    padding:16px;
  }
  .cover-link img {
    inset:16px;
    width:calc(100% - 32px);
    height:calc(100% - 32px);
  }
  .book h3 {
    font-size:18px;
  }
  .introduction {
    padding-block:36px;
  }
  .continue {
    max-width:300px;
  }
  .reader-header {
    padding-inline:20px;
  }
}
@media(max-width:700px) {
  .wrap {
    width:calc(100% - 40px);
  }
  .site-header {
    padding-block:22px;
  }
  .brand {
    font-size:21px;
  }
  .header-note {
    display:none;
  }
  .introduction {
    align-items:stretch;
    flex-direction:column;
    gap:22px;
    padding:32px 0;
  }
  .introduction h1 {
    font-size:36px;
  }
  .introduction p {
    font-size:15px;
    margin-top:14px;
  }
  .continue {
    max-width:none;
    padding:14px 16px;
  }
  .continue>span {
    flex:1;
  }
  .books {
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:30px 20px;
  }
  .collection-heading {
    margin-bottom:18px;
  }
  .cover-link {
    padding:17px 15px;
    aspect-ratio:.76;
  }
  .cover-link img {
    inset:17px 15px;
    width:calc(100% - 30px);
    height:calc(100% - 34px);
  }
  .book h3 {
    font-size:18px;
    margin-top:15px;
    min-height:4.2em;
  }
  .book-meta {
    margin-block:8px 12px;
    font-size:12px;
  }
  .book-action {
    padding:10px 12px;
    font-size:13px;
  }
  .bookmark-note {
    align-items:flex-start;
    text-align:left;
    margin-block:32px;
  }
  .bookmark-note svg {
    margin-top:3px;
  }
  .bookmark-note strong {
    display:block;
  }
  .site-footer {
    font-size:12px;
    gap:16px;
  }
  .reader-header {
    height:90px;
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px 16px;
    padding:12px 16px;
  }
  .reader-header h1 {
    grid-row:2;
    grid-column:1/-1;
    text-align:left;
    font-size:14px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .reader-header .pdf-link {
    font-size:12px;
  }
  .reading-area {
    padding:16px 10px 156px;
  }
  .toolbar {
    gap:5px;
    padding:7px;
    max-width:100%;
    flex-wrap:wrap;
    justify-content:center;
  }
  .toolbar-divider {
    display:none;
  }
  .fullscreen {
    display:none;
  }
  .zoom-controls {
    border-left:1px solid var(--line);
    padding-left:5px;
  }
  .icon-button {
    width:40px;
    height:44px;
  }
  .fit-button {
    min-width:62px;
  }
  #page-form {
    font-size:12px;
    gap:4px;
    padding-inline:0;
  }
  #page-form label {
    display:none;
  }
  #page-number {
    width:39px;
  }
  .reader-bottom {
    padding:0 8px max(14px,env(safe-area-inset-bottom));
  }
  .reader-status {
    font-size:11px;
  }
  .reader-error h2 {
    font-size:22px;
  }
  .loading,.reader-error {
    inset:18px 18px 150px;
  }
}
@media(max-width:370px) {
  .wrap {
    width:calc(100% - 32px);
  }
  .books {
    gap:28px 16px;
  }
  .cover-link {
    padding:12px;
  }
  .cover-link img {
    inset:12px;
    width:calc(100% - 24px);
    height:calc(100% - 24px);
  }
  .book h3 {
    font-size:16px;
  }
  .book-action {
    font-size:12px;
    padding-inline:9px;
  }
  .introduction h1 {
    font-size:32px;
  }
  .icon-button {
    width:35px;
  }
  .fit-button {
    min-width:55px;
  }
  .site-footer {
    flex-direction:column;
    gap:5px;
  }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    transition:none!important;
    animation:none!important;
    scroll-behavior:auto!important;
  }
}

#password-dialog {
  width:min(420px, calc(100% - 32px));
  padding:24px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  color:var(--ink);
}
#password-dialog::backdrop { background:#302d3580; }
#password-form { display:grid; gap:16px; }
#password-title { font-family:Literata,serif; font-size:24px; }
#comic-password { width:100%; min-height:44px; padding:10px; border:1px solid var(--muted); border-radius:5px; background:var(--white); color:var(--ink); }
.password-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:8px; }
.password-actions button { min-height:44px; padding:10px 16px; border:1px solid var(--line); border-radius:8px; background:var(--white); color:var(--ink); }
.password-actions button:hover { background:var(--shelf); }
