/* ============================================================
   持ち寄りれもん 専用ページ 共通スタイル
   ・ページの骨格（タイトル・リード文）は STUDIO サイトと同じ Zen Old Mincho
   ・カードの中身は現行の埋め込み（持ち寄りれもん）と同じゴシック・色・線
   ============================================================ */

:root {
  --ink: #261F1C;          /* 文字色（サイトの Lemon Black） */
  --sub: #4A4A4A;          /* 補足の文字 */
  --muted: #8A8580;        /* さらに薄い注記（日付など） */
  --line: #E5DFD0;         /* 枠線・区切り線（薄いベージュ） */
  --paper: #F7F4EC;        /* コメントの箱、バーの地色 */
  --yellow: #E0A81E;       /* 進捗バー、見出しの左線 */
  --yellow-2: #EBC04A;     /* 進捗バーのグラデーションの明るい側 */
  --link: #67B16A;         /* リンク（サイトの Lemon Dark Green） */
  --green: #7FB069;        /* 叶いました */
  --brand-blue: #4090B4;   /* 持ち寄るボタン（れもんハウスのロゴの水色） */
  --brand-blue-dark: #367C9C; /* ボタンのホバー */
  --orange: #C77A0E;       /* 締切が近い・必要額に届いた文言 */
  --serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
          "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  --gutter: 20px;          /* SP の横マージン */
}
@media (min-width: 900px) { :root { --gutter: 80px; } } /* PC の横マージン */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink); background: #fff;
  font-size: 14px; line-height: 1.8; -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* --- ページ全体の枠 --- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

/* --- 上部のナビ（サイトへ戻る） --- */
.topbar { height: 56px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.topbar a { font-family: var(--serif); font-weight: 600; letter-spacing: .05em; color: var(--ink); text-decoration: none; font-size: 14px; }
.topbar a:hover { color: var(--link); }

/* --- 見出し・リード文（サイトと同じ明朝） --- */
.h-page  { font-family: var(--serif); font-weight: 600; letter-spacing: .05em; font-size: 40px; line-height: 1.4; margin: 0; }
.h-large { font-family: var(--serif); font-weight: 600; letter-spacing: .05em; font-size: 32px; line-height: 1.4; margin: 0; }
.lead { font-family: var(--serif); font-weight: 600; letter-spacing: .05em; font-size: 14px; line-height: 2.2; margin: 20px 0 0; max-width: 640px; }
.section-head a { font-family: var(--serif); font-weight: 600; letter-spacing: .05em; font-size: 14px; }
.note { font-size: 11px; color: var(--muted); }
@media (max-width: 899px) { .h-page { font-size: 26px; } .h-large { font-size: 26px; } }

/* --- セクションの縦の余白 --- */
.section { padding-top: 60px; padding-bottom: 100px; }
@media (min-width: 900px) { .section { padding-top: 80px; padding-bottom: 120px; } }
.section-head { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) { .section-head { flex-direction: row; justify-content: space-between; align-items: flex-end; } }

/* --- ボタン --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  min-height: 52px; padding: 14px 20px; border-radius: 12px; border: 0;
  background: var(--brand-blue); color: #fff;
  font-size: 16px; font-weight: 800; letter-spacing: .04em;
  text-decoration: none; cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: var(--brand-blue-dark); color: #fff; }
.btn-line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { background: var(--paper); color: var(--ink); }

/* --- カードのグリッド --- */
.grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* --- カード --- */
.card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  color: inherit; text-decoration: none;
}
a.card:hover .card-title { color: var(--link); }
.card-thumb {
  position: relative; aspect-ratio: 16 / 9; background: var(--paper) center / cover no-repeat;
  display: flex; align-items: center; justify-content: center; font-size: 46px;
}
.card-thumb { background-color: #E4EFD9; }  /* 写真がないときの地色（薄い緑） */
.card-thumb[style] { background-color: var(--paper); }
.pill {
  position: absolute; top: 12px; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .04em;
  padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.88); color: var(--sub);
}
.pill-kind { left: 12px; }
.pill-date { right: 12px; }
.pill-done { left: 12px; background: var(--green); color: #fff; box-shadow: 0 2px 6px rgba(127,176,105,.32); }
.pill-ended { left: 12px; background: rgba(255,255,255,.88); color: var(--muted); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title {
  font-size: 17px; font-weight: 800; line-height: 1.5; margin: 0; min-height: 3em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.card-meta { font-size: 12.5px; color: var(--muted); }
.card-body .btn { margin-top: auto; }

/* 1件だけのときは横長にして幅いっぱいに */
@media (min-width: 900px) {
  .grid.is-single { grid-template-columns: 1fr; }
  .grid.is-single .card { flex-direction: row; }
  .grid.is-single .card-thumb { width: 50%; aspect-ratio: auto; }
  .grid.is-single .card-body { padding: 32px 40px; justify-content: center; gap: 14px; }
  .grid.is-single .card-title { font-size: 26px; }
  .grid.is-single .btn { width: auto; align-self: flex-start; padding: 13px 48px; margin-top: 20px; }
}

/* --- 金額と進捗バー（現行の埋め込みと同じ） --- */
.amount-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.amount { font-size: 24px; font-weight: 800; line-height: 1.1; }
.amount-label { font-size: 13px; color: var(--sub); display: block; margin-bottom: 2px; }
.amount-label .note { margin-left: 4px; }
.goal { font-size: 13px; color: var(--sub); white-space: nowrap; padding-bottom: 2px; }
.goal b { font-size: 14.5px; font-weight: 700; margin-left: 4px; }
.track { height: 22px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); overflow: hidden; }
.fill {
  height: 100%; min-width: 34px; border-radius: 999px;
  background: linear-gradient(90deg, var(--yellow), var(--yellow-2));
  display: flex; align-items: center; justify-content: flex-end; transition: width .6s ease;
}
.pct { color: #fff; font-size: 12px; font-weight: 800; padding-right: 9px; white-space: nowrap; text-shadow: 0 1px 1px rgba(0,0,0,.12); }
.remain { font-size: 14px; color: var(--sub); margin: 0; }
.done-text { color: var(--orange); font-weight: 700; }
.ended-text { color: var(--muted); }
.stats { display: flex; gap: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.stats > span { display: flex; flex-direction: column; font-size: 12px; color: var(--sub); white-space: nowrap; }
.stats b { font-size: 17px; font-weight: 800; color: var(--ink); line-height: 1.2; margin-top: 2px; }
.card .stats { border-top: 0; padding-top: 0; }
.stats .when b { font-size: 14px; margin-top: 5px; }
.card .track { height: 20px; }
.stats b small { font-size: 13px; font-weight: 700; margin-left: 1px; }
.stats .soon b { color: var(--orange); }
.stats .ended b { color: var(--muted); font-size: 14px; font-weight: 700; }

/* --- 空のとき・読み込み中 --- */
.empty { padding: 40px 0; color: var(--muted); font-size: 14px; }

/* ============================================================
   願いの詳細ページ
   ============================================================ */
.detail { display: grid; grid-template-columns: 1fr; gap: 40px; padding-top: 28px; padding-bottom: 140px; }
@media (min-width: 900px) {
  .detail { grid-template-columns: 7fr 5fr; gap: 40px; padding-top: 40px; padding-bottom: 120px; align-items: start; }
}
.detail-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero {
  position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  background: var(--paper) center / cover no-repeat; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 64px;
}
.hero { background-color: #E4EFD9; }
.hero[style] { background-color: var(--paper); }
.detail-title { font-size: 24px; font-weight: 800; line-height: 1.4; margin: 0; }
@media (min-width: 900px) { .detail-title { font-size: 30px; } }
.body-text { font-size: 14.5px; color: var(--sub); line-height: 1.8; margin: 0; white-space: pre-line; }
.subhead {
  font-size: 13.5px; font-weight: 800; color: var(--ink); margin: 14px 0 0; padding-left: 9px;
  border-left: 3px solid var(--yellow); line-height: 1.5;
}

/* 金額の箱（PC では右に固定、SP では本文の中） */
.panel {
  border: 1px solid var(--line); border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; background: #fff;
}
@media (min-width: 900px) { .panel { position: sticky; top: 24px; padding: 24px; } }
.panel .amount { font-size: 30px; }
.panel .note { margin: 0; }
.panel .done-pill {
  display: inline-block; align-self: flex-start; background: var(--green); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 5px 14px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(127,176,105,.32);
}

/* コメント */
.comment-head { font-size: 13px; font-weight: 800; color: var(--sub); margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--line); letter-spacing: .02em; }
.comments { display: flex; flex-direction: column; gap: 8px; }
.comment { background: var(--paper); border-radius: 10px; padding: 10px 13px; font-size: 14px; line-height: 1.6; }
.comment-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 3px; }
.comment-top b { font-size: 13.5px; color: var(--ink); }
.comment.anon .comment-top b { color: var(--sub); }
.comment-date { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* SP と PC で、金額の箱を出す場所を切り替える */
.only-pc { display: none; }
@media (min-width: 900px) { .only-pc { display: block; } .only-sp { display: none; } }

/* SP：スクロール後に上に貼りつく要約 */
.compact {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; background: #fff;
  border-bottom: 1px solid var(--line); padding: 10px var(--gutter) 12px;
  transform: translateY(-110%); transition: transform .2s ease; box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.compact.is-on { transform: translateY(0); }
.compact-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12px; color: var(--sub); }
.compact-title { font-weight: 800; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-row b { color: var(--ink); }
.compact .track { height: 8px; margin-top: 8px; border: 0; }
.compact .fill { min-width: 0; }
.compact .pct { display: none; }
@media (min-width: 900px) { .compact { display: none; } }

/* SP：画面下に固定する「持ち寄る」 */
.footbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff;
  border-top: 1px solid var(--line); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; box-shadow: 0 -2px 8px rgba(0,0,0,.05);
  transform: translateY(110%); transition: transform .2s ease;
}
.footbar.is-on { transform: translateY(0); }
.footbar-info { display: flex; flex-direction: column; font-size: 11.5px; color: var(--sub); flex-shrink: 0; line-height: 1.4; }
.footbar-info b { font-size: 12.5px; color: var(--ink); }
.footbar .btn { flex: 1; font-size: 15px; padding: 14px 12px; }
@media (min-width: 900px) { .footbar { display: none; } }

/* ============================================================
   アーカイブ
   ============================================================ */
.totals { display: flex; gap: 32px; }
.totals div { display: flex; flex-direction: column; }
.totals > div > span { font-size: 12px; color: var(--sub); }
.totals b { font-size: 28px; line-height: 1.2; font-weight: 800; }
.totals b span { font-size: inherit; color: inherit; }
.card.is-ended { opacity: .9; }
.card.is-ended .card-thumb { filter: grayscale(.3); }
.card-after {
  font-size: 13px; color: var(--sub); line-height: 1.7; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); min-height: calc(2 * 1.7 * 13px + 11px);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* ============================================================
   サイト共通のヘッダー・フッター（本体サイトの軽い版）
   ============================================================ */
.site-header {
  background: #F1F0EC url("https://storage.googleapis.com/studio-design-asset-files/projects/8dO8jk7Jan/s-2400x1350_v-frms_webp_36807244-b1f4-439c-8260-608ba6af0ac9.webp") center / cover no-repeat;
}
.site-header-in {
  max-width: 1280px; margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 24px; min-height: 76px;
}
@media (min-width: 900px) { .site-header-in { padding: 20px 30px; gap: 40px; min-height: 100px; } }
.site-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.site-logo img { width: 62px; height: 50px; object-fit: contain; }
.site-logo span { font-family: var(--serif); font-weight: 700; font-size: 13px; letter-spacing: .1em; white-space: nowrap; }
@media (min-width: 900px) { .site-logo img { width: 80px; height: 64px; } .site-logo span { font-size: 16px; } }
.site-nav { display: none; }
@media (min-width: 1000px) {
  .site-nav { display: flex; align-items: center; gap: 30px; margin-left: auto; }
  .site-nav a { font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: .05em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
  .site-nav a:hover { color: var(--green); }
}
.site-cta { display: none; }
@media (min-width: 1000px) {
  .site-cta {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; border-radius: 12px;
    background: linear-gradient(45deg, #88DD7D 0%, #DAF2B1 85%, #EEF2B1 99.5%);
    font-family: var(--serif); font-weight: 700; font-size: 16px; letter-spacing: .05em; color: var(--ink); text-decoration: none;
  }
  .site-cta:hover { opacity: .85; color: var(--ink); }
}
.site-back-sp { margin-left: auto; font-family: var(--serif); font-weight: 700; font-size: 13px; letter-spacing: .05em; color: var(--ink); text-decoration: none; white-space: nowrap; }
@media (min-width: 1000px) { .site-back-sp { display: none; } }

.site-footer {
  margin-top: 40px;
  background: #F1F0EC url("https://storage.googleapis.com/studio-design-asset-files/projects/8dO8jk7Jan/s-2400x1350_v-frms_webp_36807244-b1f4-439c-8260-608ba6af0ac9.webp") center / cover no-repeat;
}
.site-footer-in { max-width: 1280px; margin: 0 auto; padding: 48px var(--gutter) 32px; display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 900px) { .site-footer-in { padding: 64px 48px 40px; } }
.site-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer-row img { width: 120px; height: auto; }
@media (min-width: 900px) { .site-footer-row img { width: 150px; } }
.site-sns { display: flex; gap: 16px; }
.site-sns a { display: inline-flex; padding: 6px; }
.site-sns img { width: 24px; height: 23px; }
.site-footer-links { display: flex; justify-content: space-between; gap: 20px; }
.site-footer-links a { font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .05em; color: var(--ink); text-decoration: none; }
.site-footer-links a:hover { color: var(--green); }
.site-footer-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid rgba(38,31,28,.12); }
.site-footer-bottom span, .site-footer-bottom a { font-family: var(--serif); font-weight: 600; font-size: 12px; letter-spacing: .05em; color: var(--ink); }
.site-footer-bottom a { text-decoration: underline; }

/* 詳細ページの固定ヘッダーは、サイトヘッダーより手前に */
.compact, .footbar { z-index: 30; }

/* ============================================================
   詳細ページの下：ほかの募集中の願い
   ============================================================ */
.others { padding: 40px 0 60px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .others { padding: 60px 0 80px; } }
.others-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.h-small { font-family: var(--serif); font-weight: 600; letter-spacing: .05em; font-size: 20px; margin: 0; }
@media (min-width: 900px) { .h-small { font-size: 26px; } }
.others-hint { font-size: 11px; color: var(--muted); white-space: nowrap; }
@media (min-width: 900px) { .others-hint { display: none; } }
.others-row {
  display: flex; gap: 12px; margin: 20px 0 0; padding: 2px 0 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.others-row::-webkit-scrollbar { display: none; }
.others-row .card { flex: 0 0 280px; scroll-snap-align: start; }
@media (min-width: 900px) {
  .others-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 24px 0 0; padding: 0; overflow: visible; }
  .others-row .card { flex: none; }
  .others-row .card:nth-child(n+4) { display: none; }
}
/* 追従ボタンの分だけ、ページの最後に余白 */
@media (max-width: 899px) { .others { padding-bottom: 100px; } }

/* Stripe から戻ってきたときのお礼 */
.thanks {
  grid-column: 1 / -1; background: #E4EFD9; border-radius: 12px; padding: 14px 18px;
  font-size: 15px; font-weight: 700; color: var(--ink); line-height: 1.6;
}
.thanks span { display: block; font-size: 12px; font-weight: 400; color: var(--sub); }
