: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-thickness: 1px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

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

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

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

.back-link a {
  text-decoration: none;
}

.back-link a:hover,
.back-link a:focus-visible {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0;
}

p {
  margin: 0;
}

.prefecture {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
}

.primary-info,
.info-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  padding: 18px;
}

.primary-info {
  display: grid;
  gap: 14px;
}

.date-list {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.4;
}

.section-label-note {
  margin: -4px 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.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: 7px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feature-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--badge);
}

.feature-badge strong,
.detail-term {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.feature-badge span,
.detail-value {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  font-weight: 700;
}

.feature-icon {
  flex: none;
  width: 26px;
  height: 26px;
  color: inherit;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.feature-badge.is-yes {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok-text);
}

.feature-badge.is-no {
  background: var(--none-bg);
  color: var(--none-text);
}

.feature-badge.is-na {
  background: #ffffff;
  border: 3px double #8b8f94;
  color: #4d5358;
  font-style: italic;
}

.feature-badge.is-na span::before {
  content: "— ";
  font-style: normal;
}

.feature-badge.is-unknown {
  background: var(--unknown-bg);
  border-style: dashed;
  color: var(--unknown-text);
}

.feature-badge.is-neutral {
  background: #ffffff;
  color: var(--text);
}

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

.detail-item {
  border-top: 1px solid var(--soft-line);
  padding-top: 14px;
}

.detail-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.media-section {
  background: transparent;
  border: 0;
  padding: 0;
}

.media-frame {
  aspect-ratio: 16 / 9;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--badge);
}

.media-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.media-gallery-item {
  min-width: 0;
}

.media-gallery-thumb,
.media-gallery-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.media-gallery-thumb {
  position: relative;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

.media-gallery-thumb:focus-visible {
  outline: 3px solid #111111;
  outline-offset: 3px;
}

.media-gallery-thumb img,
.media-gallery-embed {
  width: 100%;
  height: 100%;
}

.media-gallery-thumb img {
  display: block;
  object-fit: cover;
}

.media-gallery-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.media-gallery-play-icon::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid rgba(17, 17, 17, 0.78);
}

.media-gallery-embed {
  border: 0;
  background: var(--badge);
}

.media-gallery-caption,
.media-gallery-meta {
  margin-top: 6px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.media-gallery-caption {
  color: var(--text);
  font-weight: 700;
}

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

.media-gallery-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.86rem;
}

.map-frame {
  aspect-ratio: 4 / 3;
}

#map-section {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px;
}

.source-block {
  border-top: 1px solid var(--soft-line);
  padding-top: 16px;
  margin-top: 16px;
}

.source-block:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.source-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.source-meta,
.source-note {
  margin-top: 8px;
  color: var(--muted);
}

.source-list {
  margin: 10px 0 0;
  padding-left: 1.2em;
}

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

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

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

  .primary-info,
  .info-section {
    padding: 24px;
    margin-top: 22px;
  }

  .media-section {
    padding: 0;
  }

  #map-section {
    padding: 24px;
  }

  .primary-info {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .feature-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
