/* pakaplanet.com, in the app's Ink & Paper look (lib/core/theme/paka_ink.dart).
   Paper surfaces and flat fills; ink edges and the hard "sticker" shadow only on things you can press. */

@font-face {
  font-family: "Comic Neue";
  src: url("/assets/fonts/comic-neue-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Comic Neue";
  src: url("/assets/fonts/comic-neue-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #fffdf8;
  --floor: #f9e7d7;
  --ink: #2a2230;
  --ink2: #6f6776;
  --hairline: rgba(42, 34, 48, 0.15);
  --yellow: #ffd545;
  --sunny: #ffe58a;
  --wall: #5a72d8;
  --coral: #df5252;
  --leaf: #4e9e3f;
  --tint-blue: #e5eafb;
  --tint-green: #e2f0dd;
  --tint-yellow: #fff1c2;
  --tint-pink: #fbe3ee;
  --press: 0 3px 0 var(--ink);
  --gutter: clamp(16px, 4vw, 56px);
  --header-h: 72px;
  --voice: "Comic Neue", "Comic Sans MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
}

main { flex: 1; }

img, video, svg { display: block; max-width: 100%; }

a { color: var(--wall); }

h1, h2, h3, .display, .section-title { font-family: var(--voice); font-weight: 700; text-wrap: balance; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Buttons: the yellow sticker (main) and a paper sticker (ghost) */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--press);
  font: 700 18px/1 var(--voice);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn-primary { background: var(--yellow); }
.btn-secondary { background: var(--paper); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  padding-inline: var(--gutter);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.logo img { width: auto; height: 44px; }

.site-menu {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.site-nav { display: flex; gap: 6px; }

.site-nav a {
  padding: 7px 14px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 700 17px/1.2 var(--voice);
  color: var(--ink);
  text-decoration: none;  white-space: nowrap;
}
.site-nav a:hover { background: var(--tint-yellow); }
.site-nav a[aria-current="page"] { background: var(--sunny); border-color: var(--ink); }

.menu-toggle { display: none; }

/* Below 640px the menu moves behind the round menu button. */
@media (max-width: 639px) {
  .site-header { gap: 10px; }
  .logo { margin-right: auto; }
  .logo img { height: 36px; }

  .menu-toggle {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .menu-toggle::before {
    content: "";
    position: absolute;
    width: 36px;
    height: 36px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: var(--press);
  }
  .menu-toggle span,
  .menu-toggle span::before,
  .menu-toggle span::after {
    position: relative;
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.2s, background 0.2s;
  }
  .menu-toggle span::before,
  .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -5px; }
  .menu-toggle span::after { top: 5px; }
  .menu-open .menu-toggle span { background: transparent; }
  .menu-open .menu-toggle span::before { transform: translateY(5px) rotate(45deg); }
  .menu-open .menu-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

  .site-menu {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
    margin: 0;
    padding: 28px var(--gutter);
    background: var(--paper);
  }
  .menu-open .site-menu { display: flex; }
  .menu-open { overflow: hidden; }

  .site-nav { flex-direction: column; gap: 10px; }
  .site-nav a {
    padding: 14px 20px;
    border: 2px solid var(--ink);
    border-radius: 16px;
    font-size: 22px;
  }
  .site-nav a:not([aria-current="page"]) { background: var(--paper); }
}

/* Two-column sections (Desktop Buddy) */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(40px, 7vw, 110px) var(--gutter);
}
.split-media { display: flex; justify-content: center; }

.display {
  margin: 0 0 16px;
  font-size: clamp(36px, 3.4vw + 18px, 64px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.lead {
  margin: 0;
  font-size: clamp(18px, 0.5vw + 15px, 21px);
  color: var(--ink2);
}

.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.badges img { width: auto; height: clamp(48px, 2.4vw + 36px, 64px); }

.embed { position: relative; width: 100%; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-short { max-width: 340px; aspect-ratio: 9 / 16; }
.embed-wide { aspect-ratio: 4 / 3; }
.embed-wide,
.sticker-frame { border-radius: 20px; overflow: hidden; }

@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; }
  .buttons .btn { width: 100%; }
}

/* Home */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  min-height: min(calc(100vh - var(--header-h)), 860px);
  padding: clamp(32px, 5vw, 72px) var(--gutter);
}

.swash { position: relative; z-index: 0; white-space: nowrap; }
.swash::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.08em;
  right: -0.08em;
  bottom: 0.06em;
  height: 0.36em;
  border-radius: 0.2em;
  background: var(--yellow);
  transform: rotate(-1.5deg);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--tint-yellow);
  font-size: 15px;
}
.rating span { color: #e48a14; }

.hero-media { position: relative; display: flex; justify-content: center; }
.hero-media .phone { position: relative; z-index: 1; width: min(100%, 340px); height: auto; }
.hero-paka {
  position: absolute;
  z-index: 2;
  bottom: -4%;
  left: max(0%, calc(50% - 250px));
  width: auto;
  height: clamp(96px, 11vw, 150px);
}

.doodle { position: absolute; z-index: 0; fill: var(--yellow); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.doodle.heart { fill: var(--tint-pink); }
.d-1 { width: 42px; top: 4%; right: max(0%, calc(50% - 230px)); }
.d-2 { width: 24px; top: 20%; left: max(4%, calc(50% - 220px)); }
.d-3 { width: 34px; bottom: 16%; right: max(2%, calc(50% - 250px)); }

.band { padding: clamp(56px, 8vw, 110px) var(--gutter); text-align: center; }
.band-floor { background: var(--floor); }
.band-yellow { background: var(--tint-yellow); }

.section-title {
  max-width: 880px;
  margin: 0 auto 12px;
  font-size: clamp(30px, 2vw + 20px, 48px);
  line-height: 1.1;
}
.section-sub { max-width: 620px; margin: 0 auto; font-size: 19px; color: var(--ink2); }

.card {
  position: relative;
  padding: 26px 24px 24px;
  border-radius: 24px;
  text-align: center;
}
.card h3 { margin: 10px 0 4px; font-size: 25px; line-height: 1.15; }
.card p { margin: 0; color: var(--ink2); }
.card img { width: auto; height: 120px; margin: 0 auto; }
.tint-yellow { background: var(--tint-yellow); }
.tint-blue { background: var(--tint-blue); }
.tint-green { background: var(--tint-green); }
.tint-pink { background: var(--tint-pink); }
.tint-paper { background: var(--paper); }

.steps,
.life {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  max-width: 1120px;
  margin: 44px auto 0;
  padding: 0;
  list-style: none;
}

.num {
  position: absolute;
  top: -14px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  font: 700 18px/1 var(--voice);
}

.step-art { position: relative; display: block; width: fit-content; margin: 0 auto; }
.step-art .bulb { position: absolute; top: -8px; right: -34px; width: 44px; height: auto; }

.life .card { text-align: left; }
.life .card img { height: 110px; margin: 0 0 6px; }

.todo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 900px;
  margin: 34px auto 0;
  padding: 0;
  list-style: none;
}
.todo li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 12px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 16px;
}
.todo li::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--paper);
}
.todo li.done { color: var(--ink2); text-decoration: line-through; }
.todo li.done::before {
  background: var(--yellow) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%232a2230' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.companion {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  max-width: 1180px;
  margin: 0 auto;
  text-align: left;
}
.companion-media { display: flex; justify-content: center; }

.bubble-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 8px; }
.bubble {
  position: relative;
  flex: 1;
  margin: 0;
  padding: 18px 22px;
  border-radius: 22px;
  background: var(--paper);
  font-size: 19px;
}
.bubble::after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: 22px;
  border: 10px solid transparent;
  border-left-color: var(--paper);
  border-right: 0;
}
.bubble-row img { flex: none; width: auto; height: 130px; }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.compare .card { text-align: left; padding: 20px 22px; }
.compare h3 { margin-top: 0; font-size: 22px; }

.ticks,
.crosses { margin: 8px 0 0; padding: 0; list-style: none; }
.ticks li,
.crosses li { position: relative; margin: 8px 0; padding-left: 30px; }
.ticks li::before,
.crosses li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.crosses li::before {
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 4.5l7 7M11.5 4.5l-7 7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.notepad {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 44px clamp(22px, 5vw, 56px) 36px;
  border-radius: 8px 8px 24px 24px;
  background:
    repeating-linear-gradient(to bottom, transparent 0 41px, rgba(90, 114, 216, 0.14) 41px 42px),
    var(--paper);
  box-shadow: 0 1px 0 var(--hairline), 0 10px 30px rgba(42, 34, 48, 0.08);
  text-align: left;
}
.notepad .section-title { margin: 0 0 12px; text-align: center; }
.notepad .ticks li { margin: 0; padding: 8px 0 8px 36px; font-size: 19px; line-height: 26px; }
.notepad .ticks li::before {
  top: 11px;
  width: 22px;
  height: 22px;
  background-color: var(--yellow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%232a2230' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 2px var(--ink);
}
.tape {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 120px;
  height: 28px;
  margin-left: -60px;
  background: rgba(255, 213, 69, 0.75);
  transform: rotate(-3deg);
}
.notepad-paka { position: absolute; right: -30px; bottom: -20px; width: auto; height: 120px; }

.closing { position: relative; overflow: hidden; }
.trio { display: flex; justify-content: center; align-items: flex-end; gap: 6px; margin-bottom: 20px; }
.trio img { width: auto; height: 120px; }
.trio .trio-mid { height: 150px; }
.closing .badges { justify-content: center; }
.closing .d-1 { top: 14%; left: 12%; right: auto; }
.closing .d-3 { bottom: 18%; right: 12%; }

@media (max-width: 959px) {
  .steps,
  .life { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
  .companion { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: left; }
  .hero-paka { left: 0; }
  .compare { grid-template-columns: 1fr; }
  .notepad-paka { right: -8px; height: 90px; }
  .bubble-row img { height: 100px; }
}

@media (max-width: 479px) {
  .steps,
  .life { grid-template-columns: 1fr; }
}

/* Games */

main.games { padding: clamp(28px, 5vw, 64px) var(--gutter) 48px; }
.games-title { max-width: 1120px; margin: 0 auto 28px; }
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1120px;
  margin: 0 auto;
}
.game-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.game-art { display: grid; place-items: center; aspect-ratio: 4 / 3; }

/* A small copy of the Paka Tac Toe screen (lib/screens/games/paka_tac_toe/). */
.ttt-scene { position: relative; aspect-ratio: 1; container-type: inline-size; background: #f3f0fb; }
.ttt-bubble {
  position: absolute;
  top: 5%;
  left: 50%;
  z-index: 1;
  width: 68%;
  margin: 0;
  padding: 3cqw 4cqw;
  border: 2px solid var(--ink);
  border-radius: 5cqw;
  background: #fff;
  font: 700 4.4cqw/1.25 var(--voice);
  text-align: center;
  transform: translateX(-50%);
}
.ttt-yunka { position: absolute; top: 20%; left: 50%; width: auto; height: 35%; transform: translateX(-50%); }
.ttt-board {
  position: absolute;
  bottom: 6%;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 1.6cqw;
  width: 40%;
  aspect-ratio: 1;
  padding: 1.6cqw;
  border-radius: 3cqw;
  background: #fff;
  box-shadow: 0 1cqw 3cqw rgba(0, 0, 0, 0.08);
  transform: translateX(-50%);
}
.ttt-cell { display: grid; place-items: center; border: 1.5px solid #e5e1f0; border-radius: 2.2cqw; background: #f7f7fb; }
.ttt-cell b { font: 800 7cqw/1 var(--body); }
.ttt-x { color: #02c39a; }
.ttt-o { color: #6b46c1; }
.game-info { padding: 18px 22px 22px; }
.game-info h2 { margin: 0 0 4px; font-size: 26px; }
.game-info p { margin: 0 0 18px; color: var(--ink2); }

/* Tic Tac Toe fills the page under the header */

main.full { display: flex; }
.game { display: block; width: 100%; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); border: 0; }

/* Policy pages */

main.narrow { padding: clamp(32px, 6vw, 80px) var(--gutter); }

.prose {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.prose h1 { margin: 0 0 24px; font-size: clamp(32px, 2vw + 22px, 46px); line-height: 1.1; }
.prose h2 { margin: 32px 0 12px; font-size: clamp(24px, 1vw + 18px, 30px); line-height: 1.2; }
.prose p { margin: 14px 0; }
.prose ul { margin: 14px 0; padding-left: 26px; }
.prose li { margin: 6px 0; }
.prose li p { margin: 0; }
.prose blockquote { margin: 14px 0; padding: 12px 18px; border-radius: 14px; background: var(--tint-yellow); }

/* 404 */

.notfound { padding: clamp(56px, 9vw, 140px) var(--gutter); text-align: center; }
.notfound img { width: auto; height: 180px; margin: 0 auto 20px; }
.notfound .buttons { justify-content: center; }

/* Footer */

.site-footer {
  position: relative;
  margin-top: 70px;
  padding: 56px var(--gutter) 28px;
  background: var(--ink);
  color: var(--paper);
}
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.home + .site-footer { margin-top: 0; }
.footer-paka { position: absolute; top: -78px; right: clamp(16px, 8vw, 120px); width: auto; height: 90px; }

.footer-cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
}
.footer-brand img { width: auto; height: 44px; }
.footer-brand p { margin: 12px 0 0; color: rgba(255, 253, 248, 0.75); }
.footer-cols h3 { margin: 0 0 10px; font-size: 19px; color: var(--yellow); }
.footer-cols ul { margin: 0; padding: 0; list-style: none; }
.footer-cols li { margin: 6px 0; }
.footer-social a { display: inline-flex; align-items: center; gap: 10px; }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom {
  max-width: 1120px;
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 253, 248, 0.2);
  font-size: 14px;
  color: rgba(255, 253, 248, 0.7);
}

@media (max-width: 767px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Comics (reader in assets/comics.js) */

main.comics { padding: clamp(28px, 5vw, 64px) var(--gutter) 48px; }
.comics-title { max-width: 1120px; margin: 0 auto 28px; }

.comic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  max-width: 1120px;
  margin: 0 auto;
}

.paka-comic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--press);
  color: inherit;
  text-decoration: none;
  transition: transform 0.08s, box-shadow 0.08s;
}
.paka-comic-card:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.paka-comic-cover { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 2px solid var(--ink); }
.paka-comic-info { padding: 14px 16px 16px; }
.paka-comic-title { margin: 0 0 8px; font: 700 23px/1.15 var(--voice); }

.newest {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  font: 700 15px/1.2 var(--voice);
}

.paka-comic-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.char-tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint-green);
  font-size: 13px;
  font-weight: 600;
}
.char-yunka { background: var(--tint-yellow); }
.char-caraka { background: var(--tint-pink); }
.char-dekka { background: var(--tint-blue); }
.comic-date { margin-left: auto; font-size: 13px; color: var(--ink2); }

.paka-reader { max-width: 1180px; margin: 0 auto; padding-bottom: 24px; }
.comic-back { min-height: 44px; padding: 0 18px; font-size: 16px; }
.paka-reader-heading { margin: 22px 0 20px; text-align: center; }
.paka-reader-heading h1 { margin: 0 0 8px; font-size: clamp(30px, 2vw + 20px, 44px); }
.paka-reader-heading .comic-date { margin: 0; font-size: 15px; }

.comic-page {
  padding: clamp(12px, 2vw, 24px);
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.paka-panels { display: flex; gap: 10px; justify-content: center; align-items: flex-start; }
.paka-panels img { max-width: 100%; height: auto; object-fit: contain; border: 2px solid var(--ink); border-radius: 6px; }

@media (min-width: 768px) {
  .paka-panels img { flex: 1 1 0; min-width: 0; max-height: 78vh; width: auto; }
}

.paka-reader-footer { margin: 14px 0 0; font-size: 15px; color: var(--ink2); text-align: center; }
.paka-reader-footer strong { color: var(--ink); }
.paka-reader-footer a { color: var(--wall); }

.paka-reader-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 24px; }
.paka-reader-nav .btn {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 64px;
  max-width: 48%;
  padding: 10px 22px;
  border-radius: 20px;
}
.paka-reader-nav .paka-nav-next { align-items: flex-end; margin-left: auto; }
.paka-reader-nav small {
  overflow: hidden;
  max-width: 100%;
  font: 400 14px/1.2 var(--body);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paka-loading { padding: 40px; font-size: 17px; color: var(--ink2); text-align: center; }
.comic-missing { margin: 0; text-align: center; }

@media (max-width: 959px) {
  .comic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 767px) {
  .comic-grid { grid-template-columns: 1fr; }
  .paka-panels { flex-direction: column; }
  .paka-panels img { width: 100%; }
  .paka-reader-nav { flex-direction: column-reverse; }
  .paka-reader-nav .btn { max-width: none; width: 100%; }
  .paka-reader-nav .paka-nav-next { align-items: flex-start; margin-left: 0; }
}
