@font-face {
  font-family: "Noto Serif";
  src: url("fonts/noto-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("fonts/noto-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("fonts/noto-serif-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --ink: #2a1814;
  --muted: #5c463f;
  --line: #e3d0c2;
  --paper: #fffaf4;
  --bg: #f4e7dc;
  --accent: #8d3d52;
  --accent-ink: #fffaf6;
  --soft: #f8e4e2;
  --gold: #a68448;
  --ok: #1f6b4a;
  --serif: "Noto Serif", "Iowan Old Style", Palatino, Georgia, "Liberation Serif", serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --shadow: 0 18px 40px rgba(72, 28, 36, 0.12);
}
body[data-theme="library"] { --accent: #243044; --soft: #e7ebf2; }
body[data-theme="valentine"] { --accent: #b32848; --soft: #fde8ec; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  line-height: 1.5;
  font-size: 18px;
  font-family: var(--serif);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 42% at 8% -8%, rgba(255, 214, 170, 0.7), transparent 55%),
    radial-gradient(ellipse 50% 36% at 100% 0%, rgba(141, 61, 82, 0.12), transparent 50%),
    linear-gradient(180deg, #f8f1e8 0%, #f3e6da 38%, #efe0d4 100%);
}
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 30; }
#maker, #themes, #inside, #about, #download { scroll-margin-top: 84px; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 250, 244, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.wordmark, .brand .sitetitle a { color: inherit; text-decoration: none; }
.wordmark { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.01em; min-height: 44px; }
.logo { width: 40px; height: 40px; border-radius: 50%; background: var(--accent) url("favicon.svg") center / cover; flex: none; box-shadow: inset 0 0 0 2px rgba(255, 250, 244, 0.35); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--sans); font-size: 15px; }
.top nav a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.top nav a:hover { color: var(--accent); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1, .brand .sitetitle { font-size: 22px; margin: 0; line-height: 1.2; font-weight: 650; }
.brand > div > p { margin: 2px 0 0; color: var(--muted); font-size: 15px; font-family: var(--sans); }

.hero { padding: 28px 0 12px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero .brand { display: block; max-width: 36rem; }
.eyebrow {
  margin: 0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 10px 0 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.hero .brand > p:not([class]) {
  margin: 16px 0 0;
  font-family: var(--serif);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.35;
  color: var(--ink);
  max-width: 34rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.fine { margin: 14px 0 0; color: var(--muted); font-family: var(--sans); font-size: 14px; }

.stage { position: relative; width: min(100%, 640px); aspect-ratio: 5 / 4.4; margin: 0 auto; }
.sheet {
  position: absolute;
  background: var(--paper);
  border: 1px solid #e5d3c6;
  box-shadow: var(--shadow);
  border-radius: 4px;
}
.sheet-kicker {
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.sheet-title { margin: 6px 0 0; font-size: 18px; line-height: 1.15; }
.sheet-note { margin: 4px 0 0; font-family: var(--sans); font-size: 12px; color: var(--muted); }
.script { margin: 6px 0 0; font-style: italic; font-size: 22px; line-height: 1.1; }
.dash { margin: 12px 0 0; border-top: 1.5px dashed var(--accent); }
.cover { width: 54%; height: 84%; left: 23%; top: 8%; z-index: 3; transform: rotate(-2deg); overflow: hidden; background: #f6efe6; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 12px 12px;
  background: linear-gradient(transparent, rgba(42, 24, 20, 0.78));
  color: #fffaf6;
}
.cover-cap .sheet-kicker { color: #f0d7b0; }
.cover-name { margin: 2px 0 0; font-size: clamp(16px, 2vw, 22px); line-height: 1.1; }
.cert { width: 40%; min-height: 26%; right: 0; top: 0; z-index: 2; transform: rotate(6deg); padding: 12px 14px 14px; }
.clue { width: 34%; padding: 12px 12px 16px; z-index: 2; }
.clue-a { left: 0; top: 10%; transform: rotate(-8deg); }
.clue-b { right: 0; bottom: 6%; transform: rotate(7deg); }
.finale { width: 32%; left: 4%; bottom: 0; z-index: 2; transform: rotate(-4deg); padding: 12px 12px 16px; }

.includes { padding: 36px 20px 8px; }
.section-head { margin-bottom: 14px; }
.section-head h2, .step h2 { margin: 4px 0 0; font-size: clamp(28px, 3vw, 36px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.get-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.get-list li {
  flex: 1 1 210px;
  display: grid;
  grid-template-columns: 36px 1fr;
  column-gap: 10px;
  align-content: center;
  background: rgba(255, 250, 244, 0.76);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  min-height: 72px;
}
.get-list strong { grid-column: 2; font-size: 17px; font-weight: 500; }
.get-list li span:last-child { grid-column: 2; color: var(--muted); font-family: var(--sans); font-size: 14px; }
.glyph { width: 36px; height: 36px; color: var(--accent); grid-row: 1 / span 2; align-self: center; }
.glyph svg { width: 36px; height: 36px; display: block; }

.note {
  margin-top: 22px;
  margin-bottom: 8px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.note summary, details summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 650;
  color: var(--muted);
}
.note p { margin: 0 0 12px; color: var(--muted); font-family: var(--sans); font-size: 15px; max-width: 68ch; }

.maker { padding: 12px 0 8px; display: grid; gap: 18px; }
.step, .card, .offer, .preview {
  background: rgba(255, 250, 244, 0.9);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 18px 20px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
.themes, .options, .names, .offers { display: grid; gap: 12px; }
.theme, .choice {
  position: relative;
  display: grid;
  gap: 8px;
  border: 1px solid #d9c4b6;
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
  min-height: 44px;
  overflow: hidden;
}
.choice { padding: 12px 14px; }
.theme { padding: 0; grid-template-rows: auto 1fr; }
.theme input, .choice input[type="radio"] { position: absolute; opacity: 0; inset: 0; margin: 0; }
.theme:has(input:checked), .choice:has(input:checked), .offer.on {
  outline: 3px solid var(--accent);
  background: var(--soft);
}
.theme:has(input:focus-visible), .choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: #f6efe6; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picked {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--accent);
  color: var(--accent-ink);
  display: none;
}
.theme:has(input:checked) .picked { display: inline-flex; }
.badge {
  justify-self: start;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fde8ec;
  color: #7c243c;
}
.meta { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 16px; height: 100%; }
.blurb { flex: 1; }
.meta strong, .choice strong { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.blurb, .choice span, .offer p { color: var(--muted); font-family: var(--sans); font-size: 15px; }
.price { font-family: var(--sans); font-weight: 700; color: var(--ink); }

label { display: block; font-weight: 650; margin: 12px 0 6px; font-size: 16px; font-family: var(--sans); }
input[type="text"], input[type="email"], input[type="number"], textarea {
  width: 100%;
  font: inherit;
  font-family: var(--sans);
  font-size: 17px;
  padding: 10px 12px;
  border: 1.5px solid #7a655c;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
.headrow { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.headrow h2 { margin: 0; font-size: 28px; font-weight: 500; }
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.check { display: flex; align-items: center; gap: 10px; font-weight: 650; margin: 8px 0; min-height: 44px; font-family: var(--sans); }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.privacy, .hint { color: var(--muted); font-size: 15px; margin: 8px 0 0; font-family: var(--sans); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 650;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid #7a655c;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.error { color: #8a2d2d; min-height: 1.2em; font-family: var(--sans); }
.preview { margin-top: 16px; background:
  radial-gradient(circle at 100% 0%, rgba(198, 165, 106, 0.25), transparent 42%),
  var(--paper);
}
.preview h3 { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 500; }
.kicker { margin: 0 0 6px; letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; color: var(--accent); font-family: var(--sans); font-weight: 700; }
.offer .kicker { font-weight: 750; }
.offer h3 { margin: 0; font-size: 36px; font-weight: 500; letter-spacing: -0.03em; }
.offer.bundle { background: var(--soft); }
.seo { padding: 8px 0 28px; display: grid; gap: 16px; }
.seo h2 { margin-top: 0; font-weight: 500; font-size: 32px; }
.seo h3 { margin: 18px 0 4px; font-size: 20px; font-weight: 500; }
.foot { color: var(--muted); font-size: 14px; padding-bottom: 36px; font-family: var(--sans); }
.hub-link { margin-top: 8px; }
[hidden] { display: none !important; }

@media (max-width: 719px) {
  .clue-b, .finale { display: none; }
  .stage { aspect-ratio: 5 / 3.6; }
  .cover { width: 70%; left: 15%; top: 14%; height: 80%; }
  .clue-a { width: 44%; top: 0; }
  .cert { width: 48%; top: 2%; }
  .sheet-title { font-size: 16px; }
  .script { font-size: 18px; }
}
@media (min-width: 800px) {
  .themes { grid-template-columns: 1fr 1fr 1fr; }
  .names { grid-template-columns: 1fr 1fr; }
  .offers { grid-template-columns: 1fr 1fr 1fr; }
  .options { grid-template-columns: 1fr 1fr; }
  .hero-grid { align-items: center; }
  .thumb { aspect-ratio: 3 / 3.7; }
}
@media (min-width: 980px) {
  .hero { padding: 36px 0 20px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
