:root {
  --bg: #fdfcf8;
  --fg: #222;
  --muted: #777;
  --accent: #d6453d;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --fg: #eee;
    --muted: #999;
    --accent: #ff6b5e;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Sono", ui-monospace, monospace;
  line-height: 1.6;
}

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

.site-header,
main,
.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  margin: 0;
  font-size: 2rem;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

nav a {
  margin-left: 1rem;
}

.site-header nav a {
  color: inherit;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--accent);
}

.site-footer {
  color: var(--muted);
  font-size: 0.875rem;
}

.comic-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comic-list a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.comic-list img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid var(--muted);
}

.comic-list span {
  display: block;
  margin-top: 0.25rem;
}

.comic-list a:hover span {
  color: var(--accent);
}

.comic {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.comic img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.comic-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

.comic-nav a {
  margin-left: 0;
}

.comic-nav a[rel="next"] {
  margin-left: auto;
}

.tarot-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tarot-cards img {
  display: block;
  width: 100%;
  height: auto;
}

.tarot-cards span {
  display: block;
  margin-top: 0.25rem;
  text-align: center;
}
