:root {
  --paper: #fffaf0;
  --ink: #4a3b2c;
  --muted: #8a7a66;
  --gold: #d9a441;
  --night: #2a2320;
  --red: #e0685b;
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background:
    radial-gradient(circle at 10% 10%, #fff3d6 0 80px, transparent 81px),
    radial-gradient(circle at 90% 30%, #ffe6ea 0 60px, transparent 61px),
    var(--paper);
  color: var(--ink);
  font-family: var(--round);
  font-weight: 500;
  line-height: 1.9;
}

a { color: #b46f1c; }

.top {
  padding: 18px 16px 8px;
  display: flex;
  justify-content: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand img { width: 44px; height: auto; }
.brand-sub { display: block; font-size: 12px; letter-spacing: 0.2em; color: var(--muted); }
.brand-title { display: block; font-size: 28px; font-weight: 900; letter-spacing: 0.08em; color: var(--night); }

.page { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.loading { text-align: center; color: var(--muted); }

.hero {
  margin: 12px 0 20px;
  padding: 22px 24px;
  border-radius: 24px;
  background: #fff;
  border: 3px dashed #f1c98a;
  text-align: center;
}

.hero-lead { margin: 0; font-size: 17px; line-height: 2.1; }

.stamp-card {
  margin: 0 0 26px;
  padding: 16px 20px;
  border-radius: 20px;
  background: var(--night);
  color: #f6e9c8;
}

.stamp-card h2 { margin: 0 0 10px; font-size: 15px; letter-spacing: 0.2em; color: var(--gold); }
.stamps { display: flex; flex-wrap: wrap; gap: 8px; }

.stamp {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px dashed #6b5a3a;
  color: #8e7a55;
  font-size: 13px;
}

.stamp.on { border: 2px solid var(--red); color: var(--red); background: #fff3f0; font-weight: 900; transform: rotate(-8deg); }
.stamp-note { margin: 10px 0 0; font-size: 13px; color: #cdbb93; }

.section { font-size: 18px; letter-spacing: 0.15em; margin: 0 0 12px; }

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

.card {
  position: relative;
  display: block;
  height: 100%;
  padding: 16px 18px 18px;
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(74, 59, 44, 0.12);
  transition: transform 120ms ease;
}

.card:hover { transform: translateY(-2px); }
.card-no { display: block; font-size: 12px; letter-spacing: 0.15em; color: var(--muted); }
.card-title { display: block; margin-top: 4px; font-size: 19px; font-weight: 900; color: var(--night); }
.card-summary { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.7; }

.card-done {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 0 8px;
  border: 2px solid var(--red);
  border-radius: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  transform: rotate(6deg);
}

.promise-link { display: inline-block; margin-top: 22px; font-weight: 700; }

.story {
  padding: 28px 26px 26px;
  border-radius: 28px;
  background: var(--card);
  box-shadow: 0 6px 0 rgba(74, 59, 44, 0.12);
}

.story-no { margin: 0; font-size: 13px; letter-spacing: 0.2em; color: var(--muted); }
.story-title { margin: 4px 0 18px; font-size: 26px; font-weight: 900; color: var(--night); }
.story-body p { margin: 0 0 14px; font-size: 20px; line-height: 2.1; }
.promises { margin: 0; padding-left: 1.4em; font-size: 20px; line-height: 2.1; }

.parents {
  margin-top: 22px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  font-family: "Yu Gothic", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.8;
}

.parents h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.parents p { margin: 0 0 6px; }

.stamp-button {
  margin-top: 18px;
  padding: 12px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--night);
  color: #f6e9c8;
  font: inherit;
  font-weight: 900;
  font-size: 17px;
  cursor: pointer;
}

.stamp-button:disabled { opacity: 0.5; cursor: default; }
.stamp-result { margin: 16px 0 0; display: flex; align-items: center; gap: 14px; }

.big-stamp {
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 4px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
  transform: rotate(-10deg);
  animation: stamp 260ms ease-out;
}

.small-print { font-size: 11px; color: var(--muted); }

@keyframes stamp {
  from { transform: rotate(-10deg) scale(1.6); opacity: 0; }
  to { transform: rotate(-10deg) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .big-stamp { animation: none; }
  .card { transition: none; }
}

.story-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 26px; font-weight: 700; }

.foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 40px;
  font-family: "Yu Gothic", system-ui, sans-serif;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 600px) {
  .brand-title { font-size: 22px; }
  .story { padding: 22px 18px; }
  .story-body p, .promises { font-size: 18px; }
}

.story-body p.refrain { padding-left: 1.6em; color: #b46f1c; font-weight: 700; }
