:root {
  --paper: #fffaf1;
  --paper-deep: #f3eadb;
  --ink: #292521;
  --muted: #746b62;
  --accent: #7a536f;
  --accent-dark: #5e3d55;
  --line: #d8cbbc;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(73, 58, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(122, 83, 111, 0.08), transparent 28rem),
    var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 250, 241, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(73, 58, 45, 0.06);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  font-size: 2rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand small {
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  margin-top: -2px;
}

nav {
  display: flex;
  gap: 8px;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
}

nav a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
}

nav a:hover,
nav a.active {
  background: var(--paper-deep);
}

.page-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 72px auto;
}

.hero {
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2 {
  line-height: 1.15;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.9rem);
  font-weight: 500;
}

.comic-date {
  margin: 16px 0 32px;
  color: var(--muted);
  font-family: system-ui, sans-serif;
}

.comic-frame {
  width: min(820px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.comic-frame img {
  width: 100%;
  height: auto;
}

.empty-state {
  min-height: 560px;
  display: grid;
  place-items: center;
  padding: 48px 28px;
  border-style: dashed;
  box-shadow: none;
  color: var(--muted);
}

.empty-state h2 {
  color: var(--ink);
}

.empty-paws {
  font-size: 3.5rem;
}

.comic-nav {
  width: min(820px, 100%);
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.comic-nav > :last-child {
  justify-self: end;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-dark);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button.disabled {
  visibility: hidden;
}

.intro-card {
  margin-top: 72px;
  padding: 36px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  background: var(--paper-deep);
  border-radius: 22px;
}

.intro-card h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 500;
}

.intro-card p:last-child {
  margin: 0;
  font-size: 1.08rem;
}

.archive-heading {
  max-width: 760px;
  margin-bottom: 42px;
}

.archive-heading h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
}

.archive-heading > p:last-child {
  color: var(--muted);
  font-family: system-ui, sans-serif;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.archive-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(73, 58, 45, 0.08);
}

.archive-card a {
  text-decoration: none;
}

.archive-thumbnail {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-deep);
}

.archive-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 180ms ease;
}

.archive-card:hover img {
  transform: scale(1.02);
}

.archive-copy {
  padding: 18px;
}

.archive-copy time {
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
}

.archive-copy h2 {
  margin: 5px 0 0;
  font-size: 1.28rem;
  font-weight: 500;
}

.archive-empty {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}

.archive-empty h2 {
  color: var(--ink);
}

.character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.character-card {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(73, 58, 45, 0.07);
}

.character-card h2 {
  margin: 12px 0 8px;
  font-size: 1.6rem;
}

.character-card p {
  margin: 0;
  color: var(--muted);
}

.character-icon {
  font-size: 2.5rem;
}

footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .page-shell {
    margin-top: 48px;
  }

  .comic-frame {
    border-radius: 10px;
  }

  .empty-state {
    min-height: 420px;
  }

  .comic-nav {
    grid-template-columns: 1fr 1fr;
  }

  .comic-nav .button:nth-child(2) {
    display: none;
  }

  .intro-card,
  .character-grid {
    grid-template-columns: 1fr;
  }

  .intro-card {
    gap: 18px;
  }

  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    width: min(100% - 20px, 1180px);
    margin-top: 10px;
  }

  .page-shell {
    width: min(100% - 20px, 1040px);
  }
}