:root {
  --fg: #3a2e2a;
  --muted: #8a7d75;
  --bg: #fff7ea;
  --card: #ffffff;
  --brand: #ff7a3c;
  --radius: 28px;
  --maxw: 860px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro",
    -apple-system, BlinkMacSystemFont, "Rounded Mplus 1c", "Noto Sans JP", sans-serif;
  color: var(--fg);
  background:
    radial-gradient(900px 400px at 10% -10%, #ffe1cf, transparent 60%),
    radial-gradient(900px 400px at 100% 0%, #d6ecff, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 32px 18px 8px; }
.hero-chars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
}
.hero-char {
  height: 80px;
  width: auto;
  display: block;
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.12));
}
.hero-char.girl { animation: bob 2.6s ease-in-out infinite; }
.hero-char.boy { animation: bob 2.6s ease-in-out infinite 0.5s; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero-char { animation: none; } }
.hero h1 {
  margin: 8px 0 6px;
  font-size: clamp(26px, 6vw, 38px);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.hero p { margin: 0 auto; max-width: 460px; color: var(--muted); font-size: 15px; }
/* タイトル内の改行はスマホ幅でのみ有効化（PCでは半角スペースのまま1行） */
.sp-br { display: none; }

/* ---------- category cards (landing) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 28px 0 8px;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 18px 22px;
  text-decoration: none;
  color: var(--fg);
  border: 3px solid #fff;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
.cat-card:hover, .cat-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 12px 0 rgba(0, 0, 0, 0.08);
}
.cat-card:active { transform: translateY(2px); box-shadow: 0 4px 0 rgba(0,0,0,0.06); }
.cat-card .cat-emoji {
  font-size: 44px;
  width: 92px; height: 92px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cat-card h3 { margin: 4px 0 0; font-size: 20px; font-weight: 800; }
.cat-card .cat-short { color: var(--muted); font-size: 13px; margin: 0; }
.cat-card .cat-count {
  margin-top: 6px;
  font-size: 13px; font-weight: 800; color: #fff;
  border-radius: 999px; padding: 4px 16px;
}

/* ---------- section (category page) ---------- */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 22px 0 4px;
  background: #fff; color: var(--fg); text-decoration: none;
  font-weight: 800; font-size: 15px;
  border-radius: 999px; padding: 8px 18px;
  border: 3px solid #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.06);
}
.back:hover { transform: translateY(-2px); }
.section-head { text-align: center; padding: 10px 0 4px; }
.section-head .big-emoji {
  font-size: 56px; display: block; margin-bottom: 4px;
}
.section-head h2 { margin: 0 0 6px; font-size: 27px; font-weight: 800; }
.section-head p { margin: 0 auto; color: var(--muted); max-width: 500px; font-size: 14px; }

.toolbar { margin: 18px auto 4px; max-width: 460px; }
.toolbar input {
  width: 100%;
  padding: 14px 20px;
  border: 3px solid #fff;
  border-radius: 999px;
  font-size: 16px;
  background: #fff;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.05);
  font-family: inherit;
}
.toolbar input:focus { outline: 3px solid var(--brand); }

/* ---------- project cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 16px 0 8px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
a.card { text-decoration: none; color: var(--fg); }
a.card:hover { transform: translateY(-4px); box-shadow: 0 12px 0 rgba(0, 0, 0, 0.08); }
a.card:active { transform: translateY(2px); box-shadow: 0 4px 0 rgba(0,0,0,0.06); }
.card .thumb {
  aspect-ratio: 16 / 10;
  background-size: cover; background-position: center;
  background-color: #fdeede;
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
}
.card .body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card h4 { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.4; }
.card .loc { font-size: 13px; color: var(--brand); font-weight: 800; }
.card .desc { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.card .tag {
  font-size: 11px; background: #fff3e8; color: #b5623a;
  border-radius: 999px; padding: 3px 10px; font-weight: 700;
}
.card.coming { opacity: 0.9; }
.card.coming .thumb { background: repeating-linear-gradient(45deg, #fdeede, #fdeede 12px, #f7e2cc 12px, #f7e2cc 24px); }
.badge-soon {
  align-self: flex-start;
  font-size: 12px; font-weight: 800; color: #fff;
  background: #ffb03a; border-radius: 999px; padding: 3px 12px;
}

.empty {
  text-align: center; color: var(--muted); padding: 40px 16px;
  font-size: 16px; font-weight: 700;
}

/* ---------- ad slots ---------- */
.ad-slot { margin: 24px auto; text-align: center; min-height: 90px; display: flex; align-items: center; justify-content: center; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; padding: 26px 18px 34px; text-align: center; }
.site-footer p { margin: 0; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--brand); font-weight: 700; }

@media (max-width: 520px) {
  .sp-br { display: inline; }
  .cat-grid, .grid { grid-template-columns: 1fr; }
  .cat-card { flex-direction: row; text-align: left; align-items: center; }
  .cat-card .cat-emoji { width: 64px; height: 64px; font-size: 34px; flex: none; }
  .cat-card .card-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
}
