:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --text: #111111;
  --muted: #5f6368;
  --subtle: #8b8f94;
  --line: #d9d9d9;
  --soft-line: #ececec;
  --badge: #f1f1f1;
  --ok-bg: #f4f7f4;
  --ok-border: #2f5d3a;
  --ok-text: #17351f;
  --none-bg: #f2f2f2;
  --none-text: #6f7377;
  --unknown-bg: #ffffff;
  --unknown-text: #4d5358;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.list-header {
  padding: 14px 0 24px;
  border-bottom: 1px solid var(--line);
}

.project-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.header-description {
  max-width: 42rem;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.filter-section {
  margin-top: 22px;
}

.filter-toggle {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 9px 13px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
}

.filter-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--text);
  flex: 0 0 auto;
}

.count-text {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.festival-list {
  display: grid;
  gap: 14px;
}

.festival-card {
  display: flex;
  align-items: stretch;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.festival-card:hover,
.festival-card:focus-visible {
  border-color: var(--text);
  box-shadow: 0 8px 24px rgb(17 17 17 / 8%);
  transform: translateY(-1px);
  outline: 0;
}

.card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.card-media {
  flex: none;
  width: 84px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card-media img {
  width: 100%;
  height: auto;
  max-height: 140px;
  object-fit: contain;
  display: block;
  opacity: 0.92;
}

.media-tag {
  display: inline-flex;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: var(--badge);
  color: var(--muted);
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.card-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.prefecture {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.status-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  border: 1px solid #111111;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.status-scheduled_pending_official,
.status-unconfirmed {
  background: var(--unknown-bg);
  color: var(--unknown-text);
  border-color: var(--line);
}

.status-ended {
  background: var(--none-bg);
  color: var(--none-text);
  border-color: var(--line);
}

.status-cancelled,
.status-postponed {
  background: var(--badge);
  color: var(--text);
  border-color: var(--subtle);
}

.festival-name {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.date-range {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 700;
}

.feature-line {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.meta-item,
.media-label {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  background: var(--badge);
  padding: 5px 10px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.meta-label {
  color: var(--muted);
}

.meta-value {
  font-weight: 700;
}

.highlight-comment,
.media-label {
  margin: 12px 0 0;
}

.highlight-comment {
  color: var(--muted);
  font-size: 0.92rem;
}

.detail-link-text {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.disclaimer {
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  .page-shell {
    padding: 48px 28px 72px;
  }

  .list-header {
    padding-bottom: 32px;
  }

  .filter-section {
    margin-top: 26px;
  }

  .festival-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .festival-card {
    padding: 22px;
  }
}
