:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d7dce4;
  --accent: #0f766e;
  --accent-soft: #e6fffb;
  --tag-bg: #eef2ff;
  --tag-text: #3730a3;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  line-height: 1.6;
}

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

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .container {
  padding: 1rem 0;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
}

h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.lead {
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  padding: 1.2rem 0 2rem;
}

.filters,
.results,
.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.filters {
  margin-bottom: 1rem;
}

.fv {
  margin-bottom: 1rem;
}

.fv-image {
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
}

input,
select,
button {
  font: inherit;
}

input[type="text"],
input[type="date"],
select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.keyword-field {
  grid-column: 1 / -1;
}

.filter-actions {
  display: flex;
  align-items: end;
}

.btn-secondary,
.btn-primary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

.btn-secondary {
  background: #fff;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  text-decoration: none;
  text-align: center;
}

.tags-filter {
  margin: 1rem 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem;
}

.tags-filter legend {
  padding: 0 0.4rem;
  font-size: 0.9rem;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-options label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  white-space: nowrap;
  font-size: 0.84rem;
  max-width: 100%;
}

.tag-options span {
  display: block;
  word-break: keep-all;
}

.tag-options input {
  margin: 0;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  flex: 0 0 auto;
}

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: grid;
}

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e5e7eb;
}

.card-body {
  padding: 0.8rem;
  display: grid;
  gap: 0.45rem;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.summary {
  font-size: 0.92rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  background: var(--tag-bg);
  color: var(--tag-text);
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.detail-thumb {
  width: 100%;
  max-width: 920px;
  height: clamp(180px, 36vw, 420px);
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  margin: 0 auto 1rem;
}

.detail-body {
  display: grid;
  gap: 0.5rem;
}

.detail-row {
  display: grid;
  gap: 0.2rem;
}

.detail-row dt {
  font-weight: 700;
}

.detail-row dd {
  margin: 0;
  color: #111827;
}

.map-embed {
  width: 100%;
  max-width: 920px;
  height: clamp(180px, 34vw, 300px);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 auto 0.45rem;
}

.disclaimer {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.empty-text {
  color: var(--muted);
  font-size: 0.92rem;
}

.empty-with-image {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  background: #fbfdff;
}

.empty-with-image img {
  width: min(100%, 420px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 10px;
  margin: 0 auto 0.8rem;
  border: 1px solid var(--line);
}

@media (max-width: 720px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    position: static;
  }

  .tag-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .tag-options label {
    display: flex;
    align-items: flex-start;
    font-size: 0.8rem;
    white-space: normal;
    line-height: 1.35;
    min-height: 2.2rem;
    padding: 0.42rem 0.5rem;
  }

  .tag-options input {
    margin-top: 0.15rem;
    flex: 0 0 auto;
  }

  .fv-image {
    aspect-ratio: 4 / 3;
  }

  .map-embed {
    height: clamp(180px, 44vw, 240px);
  }

  .detail-thumb {
    height: clamp(180px, 46vw, 280px);
  }
}

.site-footer {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-links {
  min-height: 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1rem;
  padding: 0.8rem 0;
  text-align: center;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  margin: 0;
  padding: 0 0 0.9rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
