:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #1f1d1a;
  --muted: #6b6560;
  --line: #e7e2db;
  --accent: #e0562b;
  --accent-ink: #ffffff;
  --accent-soft: #fbe6de;
  --radius: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main, .hero, .footer { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.hero { padding-top: 56px; padding-bottom: 24px; }
.eyebrow { margin: 0; font-size: 12px; letter-spacing: .2em; color: var(--accent); font-weight: 700; }
.hero h1 { margin: 8px 0 12px; font-size: clamp(28px, 6vw, 44px); line-height: 1.25; }
.lead { margin: 0; color: var(--muted); max-width: 40em; }

.stats {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 8px 0 40px;
}
.stats-label { margin: 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.stats-total {
  margin: 4px 0 16px;
  font-size: clamp(36px, 10vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.progress-bar { height: 10px; background: var(--accent-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .8s ease; }
.progress-text { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.stats-backers { margin: 12px 0 0; font-size: 15px; }
.stats-backers strong { font-size: 20px; font-variant-numeric: tabular-nums; }

.notice {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px 16px;
  margin: -24px 0 32px;
  font-size: 14px;
}

.section-title { font-size: 20px; margin: 0 0 16px; }

.rewards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.reward {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.reward:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); border-color: var(--accent); }
.reward:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.reward-image { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--line); }
.reward-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.reward-price { margin: 0; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.reward-name { margin: 2px 0 6px; font-size: 16px; }
.reward-desc { margin: 0 0 12px; font-size: 14px; color: var(--muted); white-space: pre-line; }
.reward-cta { margin-top: auto; font-size: 14px; font-weight: 700; color: var(--accent); }
.reward-skeleton { height: 280px; border-radius: var(--radius); background: linear-gradient(90deg, var(--line), #f1ede8, var(--line)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { color: var(--muted); }

.footer { padding-top: 48px; padding-bottom: 40px; font-size: 12px; color: var(--muted); }

.cta {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 20px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.cta:disabled { opacity: .6; cursor: default; }

/* 数量選択シート: スマホは下から、PC は中央 */
.sheet {
  border: 0;
  padding: 0;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  border-radius: 20px 20px 0 0;
  margin: auto auto 0;
  background: var(--surface);
  color: var(--text);
}
.sheet::backdrop { background: rgba(20, 16, 12, .5); }
.sheet[open] { animation: slide-up .2s ease-out; }
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } }
@media (min-width: 640px) {
  .sheet { border-radius: 20px; margin: auto; }
}
.sheet-inner { position: relative; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); }
.sheet-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); font-size: 20px; cursor: pointer; color: var(--text); }
.sheet-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.sheet h3 { margin: 0 44px 4px 0; font-size: 18px; }
.sheet-desc { margin: 0 0 8px; font-size: 14px; color: var(--muted); white-space: pre-line; }
.sheet-price { margin: 0 0 16px; font-size: 22px; font-weight: 800; }
.sheet-price small { font-size: 13px; font-weight: 400; color: var(--muted); }

.qty { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 8px 0 16px; }
.qty-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 22px; cursor: pointer; color: var(--text); }
.qty-btn:disabled { opacity: .35; cursor: default; }
.qty-value { min-width: 2ch; text-align: center; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sheet-subtotal { text-align: center; margin: 0 0 16px; color: var(--muted); }
.sheet-subtotal strong { color: var(--text); font-size: 20px; }
.sheet-error { color: #b42318; font-size: 14px; margin: 12px 0 0; text-align: center; }

.thanks { text-align: center; padding-top: 96px; max-width: 480px; }
.thanks-mark { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 32px; line-height: 64px; }
.thanks h1 { font-size: 24px; }
.thanks p { color: var(--muted); margin-bottom: 32px; }

.reward-desc, .sheet-desc, .reward-name, .sheet h3 { overflow-wrap: anywhere; }
.reward-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* CMS で編集するメイン画像と本文 */
.hero-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; background: var(--line); }
.project-body-section { margin: 0 0 48px; }
.prose { font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.prose h3 { font-size: 18px; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 16px; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 8px 0; }
.prose a { color: var(--accent); }
.prose blockquote { border-left: 4px solid var(--line); padding-left: 16px; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* スマホ: リターン一覧が見えていない間だけ下部に出す */
.sticky-cta {
  position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 10; display: block; padding: 14px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center; text-decoration: none;
  box-shadow: 0 8px 24px rgba(224, 86, 43, .35);
  transition: opacity .2s ease, transform .2s ease;
}
.sticky-cta.is-hidden { opacity: 0; transform: translateY(12px); pointer-events: none; }
@media (min-width: 720px) { .sticky-cta { display: none; } }
.footer { padding-bottom: 96px; }
html { scroll-behavior: smooth; }
