:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1b1c1e;
  --muted: #6b7280;
  --line: #00c300; /* LINE green */
  --line-dark: #00a300;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171a;
    --card: #212226;
    --text: #eceef1;
    --muted: #9aa0a8;
    --border: #303236;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hero {
  background: linear-gradient(135deg, var(--line) 0%, var(--line-dark) 100%);
  color: #fff;
  padding: 40px 20px 28px;
  text-align: center;
}
.hero h1 { margin: 0 0 4px; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.hero .sub { margin: 0 0 20px; opacity: .92; font-size: .95rem; }

.search-box {
  display: flex;
  max-width: 640px;
  margin: 0 auto;
  gap: 8px;
}
.search-box input {
  flex: 1;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
}
.search-box button {
  padding: 0 22px;
  border: none;
  border-radius: 10px;
  background: #04382a;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.search-box button:hover { background: #022018; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 820px;
  margin: 18px auto 0;
}
.chip {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s;
}
.chip:hover { background: rgba(255, 255, 255, .32); }
.chip.active { background: #fff; color: var(--line-dark); font-weight: 600; }

main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 40px; }
.status { text-align: center; color: var(--muted); min-height: 24px; margin-bottom: 12px; }

/* フィルタバー */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.filters label {
  display: flex;
  flex-direction: column;
  font-size: .72rem;
  color: var(--muted);
  gap: 4px;
  font-weight: 600;
}
.filters select,
.filters input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: .9rem;
  min-width: 130px;
}
.filters input { min-width: 110px; }
.filters .reset {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .85rem;
}
.filters .reset:hover { background: var(--border); color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .12s, box-shadow .12s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }

.card-head { display: flex; gap: 12px; padding: 14px 14px 10px; align-items: flex-start; }
.card-head img {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover;
  background: var(--border); flex-shrink: 0;
}
.card-head-main { min-width: 0; }
.card-title { font-weight: 700; font-size: 1rem; margin: 0 0 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }

.card-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding: 0 14px 10px; font-size: .82rem; color: var(--muted);
}
.card-desc {
  padding: 0 14px 12px; font-size: .85rem; color: var(--muted);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  white-space: pre-wrap; flex: 1;
}
.card-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-top: 1px solid var(--border);
  font-size: .72rem; color: var(--muted);
}
.card-foot .emid {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: ui-monospace, monospace; flex: 1;
}
.card-foot .copy {
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  border-radius: 6px; cursor: pointer; padding: 2px 7px; font-size: .8rem; flex-shrink: 0;
}
.card-foot .copy:hover { background: var(--border); color: var(--text); }

.badge { display: inline-block; font-size: .68rem; padding: 2px 8px; border-radius: 6px; background: var(--border); color: var(--muted); font-weight: 600; }
.badge.join.j1, .badge.join.j2 { background: #fff4d6; color: #8a6d00; }
.badge.join.j0 { background: #e3f5e3; color: #1a7a1a; }
.badge.emblem.e2 { background: #e0efff; color: #0a5fb4; }  /* 公式 */
.badge.emblem.e1 { background: #f3e8ff; color: #7a29c9; }  /* スーパー */
@media (prefers-color-scheme: dark) {
  .badge.join.j1, .badge.join.j2 { background: #4a3d12; color: #f0d580; }
  .badge.join.j0 { background: #14361a; color: #78d67c; }
  .badge.emblem.e2 { background: #103252; color: #7dbcf5; }
  .badge.emblem.e1 { background: #341952; color: #c99cf0; }
}

.more-wrap { text-align: center; margin-top: 26px; }
.more {
  padding: 11px 30px; border: 1px solid var(--line); background: transparent;
  color: var(--line-dark); border-radius: 10px; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.more:hover { background: var(--line); color: #fff; }

footer { text-align: center; padding: 24px 16px 40px; color: var(--muted); font-size: .8rem; }
footer a { color: var(--line-dark); }
footer .note { margin-top: 4px; opacity: .8; }
