:root {
  --line-green: #06c755;
  --line-green-dark: #05a648;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #2b2b2b;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --chip-bg: #d7f0dd;
  --chip-border: #a9dfb6;
  --chip-text: #146c34;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--line-green-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ヘッダー */

.site-header {
  background: var(--line-green);
  padding: 14px 0;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.site-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  flex-shrink: 0;
}

.site-title a {
  color: #fff;
}

.site-title a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.search-form {
  display: flex;
  flex: 1;
  min-width: 180px;
  gap: 6px;
}

.search-form input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
}

.search-form button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background: #fff;
  color: var(--line-green-dark);
  font-weight: 700;
  cursor: pointer;
}

.search-form button:hover {
  background: #eafff2;
}

/* パンくず */

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 10px 0 0;
}

.breadcrumb a {
  color: var(--text-muted);
}

/* メインコンテンツ */

main {
  padding: 20px 0 48px;
}

h1 {
  font-size: 1.35rem;
  margin: 8px 0 16px;
}

h2 {
  font-size: 1.1rem;
  margin: 32px 0 12px;
}

.lead {
  color: var(--text-muted);
}

/* トップページ */

.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero .search-form {
  max-width: 420px;
  margin: 20px auto 0;
}

.hero .search-form input[type="text"] {
  border: 1px solid var(--border);
  color: var(--text);
}

.hero .search-form button {
  background: var(--line-green);
  color: #fff;
}

.hero .search-form button:hover {
  background: var(--line-green-dark);
}

.stat {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* スタンプ一覧グリッド */

.stamp-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 480px) {
  .stamp-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 700px) {
  .stamp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stamp-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.stamp-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.stamp-card a {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.stamp-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fafafa;
  display: block;
}

.stamp-card__label {
  display: block;
  padding: 8px 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--line-green-dark);
}

/* チップ(関連名前・50音一覧) */

.chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-list li {
  margin: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-text);
  border-radius: 999px;
  padding: 9px 15px;
  min-height: 44px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.chip:hover {
  background: #c3e9cd;
  text-decoration: none;
}

.chip .chip__count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ページング */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.pagination a,
.pagination strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  text-align: center;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
}

.pagination strong {
  background: var(--line-green);
  color: #fff;
  border-color: var(--line-green);
}

.pagination a {
  color: var(--text);
}

.pagination a:hover {
  background: var(--chip-bg);
  text-decoration: none;
}

/* フッター */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 40px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
