:root {
  --ink: #2c2c2c;
  --muted: #6b6b6b;
  --gold: #c9a227;
  --rule: #e4e0d8;
  --paper: #f7f4ee;
  --card: #fffcf7;
  --link: #365f91;
  --cite: #2b6cff;
  --link-hover: #1557e0;
  --prompt-bg: #efe8d6;
  --prompt-ink: #3d4a63;
  --hero-bg: #ece7dc;
  --float-bg: #1f1f1f;
  --float-ink: #f4f0e6;
  --quote: #3a3a3a;
  --summary: #444;
  --notes: #555;
}

html[data-theme="dark"] {
  --ink: #e8eaed;
  --muted: #9aa0a6;
  --gold: #8fd0dc;
  --rule: #3a3f44;
  --paper: #121416;
  --card: #1c1e21;
  --link: #8fd0dc;
  --cite: #8fd0dc;
  --link-hover: #b7e4eb;
  --prompt-bg: #2a2f33;
  --prompt-ink: #d5d7db;
  --hero-bg: #2a2f33;
  --float-bg: #8fd0dc;
  --float-ink: #121416;
  --quote: #cfd3d6;
  --summary: #cfd3d6;
  --notes: #9aa0a6;
  color-scheme: dark;
}

html { color-scheme: light; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Georgia", "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 1.25rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.85rem;
}

.crumbs {
  min-width: 0;
}

.topbar a {
  color: var(--link);
  text-decoration: none;
}

.topbar a:hover {
  text-decoration: underline;
}

.theme-toggle {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: var(--gold);
}

.theme-icon::before {
  content: "☽";
  font-size: 1rem;
  line-height: 1;
}

html[data-theme="dark"] .theme-icon::before {
  content: "☼";
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.4rem 1.4rem 5rem;
}

.hero {
  margin: 0 0 1.8rem;
}

.hero-frame,
.hero.full .hero-frame {
  width: 100%;
  height: 575px;
  max-height: 575px;
  aspect-ratio: auto;
  background: var(--hero-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-frame img,
.hero.full .hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.hero-placeholder {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero figcaption {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.45rem;
  line-height: 1.45;
}

.hero figcaption a {
  color: var(--link);
  text-decoration: none;
}

.hero figcaption a:hover {
  text-decoration: underline;
}

h1 {
  font-weight: 400;
  font-size: 2.15rem;
  line-height: 1.25;
  margin-bottom: 0.55rem;
}

.byline {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 1.02rem;
  margin-bottom: 0.35rem;
}

.kicker {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.summary {
  font-style: italic;
  color: var(--summary);
  font-size: 1.12rem;
  margin: 0 0 1.5rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--rule);
}

.talk p {
  margin-bottom: 1rem;
  font-size: 1.08rem;
}

.talk h2 {
  font-weight: 400;
  font-size: 1.35rem;
  margin: 2rem 0 0.8rem;
}

.talk blockquote {
  margin: 1.2rem 0 1.2rem 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--gold);
  color: var(--quote);
  font-style: italic;
}

.talk ol {
  margin: 0.8rem 0 1.2rem 1.3rem;
}

.talk ol li {
  margin-bottom: 0.55rem;
}

.talk ul {
  margin: 1rem 0 1.2rem 1.6rem;
  padding-left: 1.1rem;
}

.talk li {
  margin: 0.35rem 0;
  padding-left: 0.2rem;
}

.talk sup.cite {
  font-size: 0.7em;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.talk sup.cite a {
  color: var(--cite);
  text-decoration: none;
  padding: 0 0.12em;
}

.talk sup.cite a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.notes {
  margin-top: 2.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--notes);
}

.notes h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--ink);
  margin-bottom: 0.8rem;
}

.notes ol {
  padding-left: 1.2rem;
}

.notes li {
  margin-bottom: 0.45rem;
}

.notes li:target {
  background: var(--prompt-bg);
  outline: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
}

.notes a {
  color: var(--link);
  text-decoration: none;
}

.notes a:hover {
  text-decoration: underline;
}

.home-link {
  display: inline-block;
  margin-top: 2.4rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--link);
  text-decoration: none;
}

.home-link:hover {
  text-decoration: underline;
}

.return-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: var(--float-bg);
  color: var(--float-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 50;
}

.return-float.visible {
  display: inline-flex;
}

.return-float:hover {
  opacity: 0.9;
}

.index-title {
  font-weight: 400;
  font-size: 2.15rem;
  margin-bottom: 0.4rem;
}

.index-lead {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2.2rem;
}

.index-disclaimer {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
  margin: -1.4rem 0 2.2rem;
  line-height: 1.5;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.4rem;
  margin: 1.6rem 0 2.4rem;
}

.collection-card {
  text-decoration: none;
  color: inherit;
}

.collection-card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--rule);
  border-radius: 6px;
  display: block;
  background: var(--hero-bg);
  transition: opacity 0.2s ease;
}

.collection-card:hover .thumb {
  opacity: 0.88;
}

.collection-card .caption {
  margin-top: 0.55rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.collection-card .caption-meta {
  margin-top: 0.2rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.prompt {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.98rem;
  font-style: italic;
  color: var(--prompt-ink);
  background: var(--prompt-bg);
  border-left: 3px solid var(--gold);
  padding: 0.7rem 0.9rem;
  margin: 1.1rem 0;
}

.note-inline {
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 700px) {
  .collection-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.7rem;
  }

  .talk p {
    font-size: 1.02rem;
  }

  .hero-frame,
  .hero.full .hero-frame {
    height: 320px;
    max-height: 320px;
  }
}

.invite-card {
  display: block;
  width: min(280px, 70%);
  margin: 2.6rem auto 0;
  text-decoration: none;
}

.invite-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--rule);
}

.invite-card:hover img {
  opacity: 0.92;
}