:root {
  --bg: #808080;           /* mid-tone grey */
  --panel: #f3f3f3;
  --scrim: rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
}

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Comic image */
.comic-wrap {
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0; /* no extra padding so it fills viewport */
}

.comic-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* scales to fit window */
}

/* Arrow buttons */
.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  text-decoration: none;
  transition: transform 120ms ease;
  outline: none;
}
.nav-arrow svg {
  width: 60%;
  height: 60%;
}
.nav-arrow:hover { transform: translateY(-50%) scale(1.08); }
.nav-arrow:active { transform: translateY(-50%) scale(1.02); }

.nav-prev { left: 16px; }
.nav-next { right: 16px; }

/* Hamburger + drawer */
#menu-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.hamburger {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #ffffffcc;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transition: transform 120ms ease;
  z-index: 30;
}
.hamburger:hover { transform: scale(1.04); }

.hamburger .lines {
  width: 24px;
  height: 18px;
  position: relative;
}
.hamburger .lines::before,
.hamburger .lines::after,
.hamburger .lines span {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: #111;
  border-radius: 2px;
}
.hamburger .lines::before { top: 0; }
.hamburger .lines span      { top: 7.5px; }
.hamburger .lines::after  { bottom: 0; }

/* Drawer panel */
.drawer-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 35;
}
.drawer {
  position: fixed;
  top: 0;
  right: -340px;
  width: 320px;
  height: 100vh;
  background: var(--panel);
  box-shadow: -12px 0 28px rgba(0,0,0,0.25);
  padding: 18px 14px 18px 18px;
  transition: right 220ms ease;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drawer h2 {
  margin: 0 0 8px 0;
  font: 600 16px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: white;
  max-height: calc(100vh - 100px);
}
.strip-list a {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  color: #111;
  border-bottom: 1px solid #eee;
  font: 500 14px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.strip-list li:last-child a { border-bottom: none; }
.strip-list a:hover { background: #f6f6f6; }

/* Toggle behavior */
#menu-toggle:checked ~ .drawer { right: 0; }
#menu-toggle:checked ~ .drawer-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* Close drawer by clicking scrim */
.drawer-scrim-label {
  position: absolute;
  inset: 0;
  display: block;
}

/* Small screens: shrink arrow hitbox padding */
@media (max-width: 640px) {
  .comic-wrap { padding: 1.5rem 3.5rem; }
  .nav-arrow { width: 56px; height: 56px; }
}
