:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --ink: #3d3229;
  --muted: #8a7d6f;
  --line: #e8dfd2;
  --primary: #7a8c4f;
  --primary-dark: #5f6f3b;
  --accent: #c47a3d;
  --premium: #b8860b;
  --radius: 12px;
}

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

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.main { min-height: 70vh; padding: 32px 20px 64px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sp-only { display: none; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; gap: 12px; flex-wrap: wrap; }
.logo { font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); font-size: .95rem; }

.flash { background: #eef3e2; border-bottom: 1px solid var(--line); padding: 10px 0; color: var(--primary-dark); }

/* buttons */
.btn {
  display: inline-block; border: none; cursor: pointer; border-radius: 999px;
  padding: 10px 22px; font-size: .95rem; font-weight: 600; font-family: inherit;
  background: var(--surface); color: var(--ink); transition: opacity .15s;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary-dark); }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: .85rem; }
.inline { display: inline-block; margin-right: 8px; }

/* hero */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: 2.6rem; line-height: 1.3; margin-bottom: 20px; letter-spacing: .04em; }
.hero-lead { max-width: 640px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.hero-stats { color: var(--muted); font-size: .9rem; }

/* sections & cards */
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; }
h2 { font-size: 1.35rem; margin-bottom: 16px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: block; color: var(--ink);
}
a.card:hover { text-decoration: none; border-color: var(--primary); box-shadow: 0 4px 14px rgba(122,140,79,.12); }

.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.type-emoji { font-size: 1.6rem; }
.type-emoji.big { font-size: 2.2rem; }
.card-title { font-size: 1.05rem; line-height: 1.5; margin-bottom: 6px; }
.pet-name { color: var(--accent); font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.pet-name.big { font-size: 1.2rem; }
.card-story { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.price { color: var(--accent); font-weight: 700; }

.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: var(--line); color: var(--ink);
}
.badge-satooya { background: #f3e0d3; color: #9c5720; }
.badge-kabuwake { background: #e4ecce; color: #5f6f3b; }
.badge-azukari { background: #dbe7ee; color: #33667f; }
.badge-premium { background: #f5e6c4; color: var(--premium); }
.badge-sample, .badge-closed { background: #eee; color: #888; }
.badge-matched, .badge-accepted { background: #e4ecce; color: #5f6f3b; }
.badge-pending { background: #fdf3d7; color: #9c7c20; }
.badge-declined { background: #eee; color: #888; }
.badge-open { background: #e4ecce; color: #5f6f3b; }

.kind-card p { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.steps .card p { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.how p { max-width: 720px; }

/* filter */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.filter-bar select, .filter-bar input { flex: 1; min-width: 130px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 16px; max-width: 640px; margin-top: 18px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 160px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
input, select, textarea {
  font-family: inherit; font-size: 1rem; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.req { color: var(--accent); font-size: .75rem; }

.auth-box { max-width: 440px; margin: 32px auto; }

/* detail */
.detail h1 { font-size: 1.7rem; line-height: 1.4; margin-bottom: 8px; }
.detail-meta { margin: 12px 0 20px; }
.story-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; white-space: pre-wrap; margin-bottom: 20px;
}
.share-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apply-box { background: #f4f0e6; border-radius: var(--radius); padding: 24px; }
.app-card { margin-bottom: 12px; }
.app-card p { margin-bottom: 8px; }

/* thread */
.thread { margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 75%; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-meta { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.msg-body {
  display: inline-block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 16px; text-align: left; white-space: pre-wrap;
}
.msg.mine .msg-body { background: #e4ecce; }

/* lists */
.list { list-style: none; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* pricing */
.pricing-grid { max-width: 760px; }
.plan { text-align: center; padding: 28px; }
.plan-featured { border: 2px solid var(--premium); }
.plan-price { font-size: 2.2rem; font-weight: 700; margin: 10px 0 16px; }
.plan-features { list-style: none; text-align: left; margin-bottom: 20px; }
.plan-features li { padding: 6px 0; font-size: .92rem; }

/* prose */
.prose { max-width: 720px; }
.prose h1 { font-size: 1.8rem; margin-bottom: 20px; line-height: 1.4; }
.prose h2 { margin-top: 32px; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; }
.prose ul, .prose ol { padding-left: 24px; }

/* area */
.pref-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.pref-cloud a {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 14px; font-size: .85rem;
}
.pref-cloud a.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 36px 0 20px; margin-top: 40px; }
.footer-inner { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.copyright { color: var(--muted); font-size: .8rem; margin-top: 24px; }

@media (max-width: 720px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .sp-only { display: inline; }
  .msg { max-width: 90%; }
}
