* {
  box-sizing: border-box;
}

:root {
  --bg-1: #f4fcff;
  --bg-2: #e8f8ff;
  --panel: #ffffff;
  --panel-soft: #f7fdff;
  --line: #bfe7f6;
  --line-strong: #8fd2ea;
  --accent: #84cfe9;
  --accent-strong: #62badb;
  --text: #111111;
  --muted: #4d6470;
  --shadow: 0 12px 28px rgba(92, 167, 196, 0.14);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
}

.page-shell {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.site-header {
  margin-bottom: 20px;
}

.top-nav {
  margin-bottom: 14px;
}

.back-link {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.back-link:hover {
  background: #f9feff;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.2;
}

.filter-card,
.section-card,
.site-footer {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.filter-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.filter-card label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

.filter-card select {
  width: min(340px, 100%);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 1rem;
}

.result-count {
  margin: 0;
  color: var(--muted);
}

.content {
  display: grid;
  gap: 14px;
}

.empty-state {
  background: rgba(255,255,255,0.92);
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
}

.section-card {
  overflow: hidden;
}

.section-card summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, #fbfeff, #eefaff);
}

.section-card summary::-webkit-details-marker {
  display: none;
}

.summary-main {
  min-width: 0;
}

.summary-title {
  font-weight: 800;
  font-size: 1.05rem;
  word-break: break-word;
}

.summary-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.chevron {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #dff4fb;
  border: 1px solid var(--line);
  font-size: 0.95rem;
  transition: transform 0.18s ease;
}

.section-card[open] .chevron {
  transform: rotate(180deg);
}

.section-body {
  padding: 0 18px 18px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f3fbff;
  font-size: 0.92rem;
}

.pokemon-list {
  margin: 0;
  padding-left: 1.2em;
}

.pokemon-list li + li {
  margin-top: 6px;
}

.site-footer {
  margin-top: 22px;
}

.footer-inner {
  padding: 20px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-link {
  color: var(--text);
  font-weight: 700;
}

.footer-link:hover {
  text-decoration: none;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100%, calc(100% - 16px));
    padding-top: 12px;
  }

  .filter-card,
  .section-card summary,
  .section-body,
  .footer-inner {
    padding-left: 14px;
    padding-right: 14px;
  }
}
