:root {
  --ink: #1b3a57;
  --accent: #ffd166;
  --muted: #f5f7fa;
  --ring: #143a52;
  --radius: 16px;
}

/* Reset/Base */
html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #111;
  background: #f0f2f5; /* ほんのり背景色追加してカードを浮かせる */
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Header */
header {
  padding: 20px 16px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
}

/* Layout */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}

footer {
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 16px;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.chip,
.tag {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #d0d7de;
  border-radius: 9999px;
  background: #fff;
  font-size: 0.95rem;
}

.chip.is-active {
  background: #e6f0ff;
  border-color: #a5c4ff;
}

/* Cards */
.cards {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--muted);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.card:focus-within {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

.cards .card > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.card h3 {
  margin: 8px 0 4px;
  padding: 0.5rem 0.75rem;
  border-top: 3px solid var(--ink);
}

.card p {
  margin: 0 0 10px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 12px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 12px;
  border: 2px solid currentColor;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 700;
}

.btn.primary {
  background: var(--accent);
  color: var(--ring);
  border-color: transparent;
}

.btn:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 500px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

