:root {
  --bg: #fffcf6;
  --bg-alt: #f1f6f4;
  --bg-alt2: #fff6ec;
  --ink: #2b2620;
  --ink-soft: #6b6357;
  --orange: #f2792d;
  --orange-deep: #d9601a;
  --orange-soft: #fde9d8;
  --teal: #005a4e;
  --teal-deep: #00332b;
  --teal-soft: #e1eeeb;
  --gold: #e8b33d;
  --line: #e7e0d2;
  --white: #ffffff;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.display {
  font-family: "Kaisei Decol", serif;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Bunting garland (万国旗) ===== */
.bunting {
  width: 100%;
  height: 40px;
  overflow: hidden;
  position: relative;
  background: var(--white);
}
.bunting svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 252, 246, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--teal);
}
/* 画面幅が足りず1行に収まらないときだけ、指定位置(<wbr>)で改行させるためのヘルパー。
   flexコンテナの直下に文字列を置くと各テキストが個別のflexアイテムになってしまい
   <wbr>が効かなくなるため、.brk-groupで1つのアイテムにまとめてから
   内部の.brk-segをwhite-space:nowrapにして改行位置を制御する。 */
.brk-group {
  display: inline-block;
}
.brk-group .brk-seg {
  white-space: nowrap;
}
.brand .crest {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  font-family: "Kaisei Decol", serif;
  flex-shrink: 0;
}
.header-date {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ===== Global menu grid (site navigation) ===== */
.menu-section {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  max-width: 1080px;
  margin: 0 auto;
}
.menu-item {
  position: relative;
  padding: 18px 8px 16px;
  text-align: center;
  border-right: 1px solid var(--line);
  cursor: pointer;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
}
.menu-grid .menu-item:last-child {
  border-right: none;
}
.menu-item:hover {
  background: var(--orange-soft);
}
.menu-item.active {
  background: var(--teal-soft);
}
.menu-item .icon-badge {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  transition: transform 0.3s ease;
}
.menu-item:hover .icon-badge {
  transform: scale(1.12) rotate(-4deg);
}
.menu-item.active .icon-badge {
  color: var(--teal);
}
.menu-item .icon-badge svg {
  width: 22px;
  height: 22px;
}
.menu-item .label {
  font-weight: 700;
  font-size: 12px;
  color: var(--teal);
}
.menu-item .grade {
  margin-top: 2px;
  font-size: 9px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}
.menu-item.mystery .label {
  color: var(--orange-deep);
}
.menu-item.mystery .icon-badge {
  color: var(--gold);
}
.menu-item.mystery .grade {
  color: var(--orange-deep);
  font-weight: 700;
  animation: flicker 2.4s ease-in-out infinite;
}
@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@media (max-width: 900px) {
  .menu-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .menu-item:nth-child(4n) {
    border-right: none;
  }
  .menu-item {
    border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 480px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .menu-item:nth-child(4n) {
    border-right: 1px solid var(--line);
  }
  .menu-item:nth-child(2n) {
    border-right: none;
  }
}

/* ===== Hamburger menu (smartphone only) ===== */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}
.hamburger-btn.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn.is-active span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .hamburger-btn {
    display: flex;
  }
  .menu-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .menu-section.is-open {
    max-height: 1200px;
  }
  .menu-grid {
    grid-template-columns: 1fr;
  }
  .menu-item {
    border-right: none !important;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 14px 20px;
  }
  .menu-item:last-child {
    border-bottom: none;
  }
  .menu-item .icon-badge {
    margin: 0;
  }
  .menu-item .grade {
    margin-top: 0;
  }
}

/* ===== Hero (home page only) ===== */
.hero {
  position: relative;
  padding: 64px 24px 56px;
  text-align: center;
  background: radial-gradient(ellipse at 15% 0%, var(--orange-soft) 0%, transparent 45%), radial-gradient(ellipse at 85% 10%, var(--teal-soft) 0%, transparent 50%), var(--bg);
  overflow: hidden;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--orange-deep);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero .eyebrow::before,
.hero .eyebrow::after {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--orange-deep);
  opacity: 0.5;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.35;
  color: var(--teal);
  font-weight: 700;
}
.hero h1 .accent {
  color: var(--orange);
}
.hero .sub {
  margin-top: 20px;
  font-size: min(18px, calc((100vw - 96px) / 27));
  color: var(--ink-soft);
  white-space: nowrap;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.hero .datepill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--teal);
  box-shadow: 0 6px 18px rgba(43, 38, 32, 0.05);
}
.hero .datepill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

/* ===== Page header (sub pages) ===== */
.page-hero {
  padding: 56px 24px 40px;
  text-align: center;
  background: radial-gradient(ellipse at 20% 0%, var(--teal-soft) 0%, transparent 50%), var(--bg);
}
.page-hero .num {
  display: inline-block;
  font-family: "Kaisei Decol", serif;
  font-size: 13px;
  color: var(--orange);
  border: 1px solid var(--orange);
  border-radius: 999px;
  padding: 3px 14px;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  color: var(--teal);
  font-weight: 700;
}
.page-hero .en {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.page-hero .lead {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Content panels ===== */
section.panel {
  padding: 56px 24px 80px;
}
section.panel.alt {
  background: var(--bg-alt);
}
.panel-body {
  max-width: 1080px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 15px;
}

/* schedule table */
.schedule {
  width: 100%;
  border-collapse: collapse;
}
.schedule th,
.schedule td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.schedule th {
  color: var(--teal);
  font-weight: 700;
  width: 160px;
  vertical-align: top;
  line-height: 1.5;
}
.schedule td {
  color: var(--ink);
}
.schedule th .daytag {
  display: table;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.schedule th .daydate {
  display: block;
  font-size: 15px;
}
.schedule th .ticketnote {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--orange-deep);
}
.schedule .day-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.schedule .day-list > li {
  position: relative;
  padding-left: 16px;
  margin: 7px 0;
}
.schedule .day-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}
.schedule .sub-list {
  margin: 8px 0 8px 4px;
  padding-left: 14px;
  list-style: none;
  border-left: 2px solid var(--line);
}
.schedule .sub-list li {
  margin: 5px 0;
  color: var(--ink-soft);
  font-size: 13px;
}
@media (max-width: 640px) {
  .schedule th {
    display: block;
    width: auto;
    border-bottom: none;
    padding-bottom: 2px;
  }
  .schedule td {
    display: block;
    padding-top: 0;
    padding-bottom: 24px;
  }
}

/* card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(43, 38, 32, 0.08);
}
.card-desc-inner .card-image {
  height: 200px;
  margin: 18px 22px 6px;
  border-radius: 10px;
  background: var(--bg-alt);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-desc-inner .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.card-head {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 22px;
  position: relative;
  font: inherit;
  color: inherit;
}
.card .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.card h3 {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
  padding-right: 24px;
}
.card p {
  font-size: 13px;
  color: var(--ink-soft);
}
.card-meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.card-meta .time {
  font-size: 12px;
  font-weight: 700;
  color: var(--orange-deep);
}
.card-meta .place {
  font-size: 12px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chevron {
  position: absolute;
  top: 24px;
  right: 20px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.card.is-open .chevron {
  transform: rotate(-135deg);
}
.card-desc-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.card-desc-inner {
  overflow: hidden;
}
.card-desc-inner .description {
  padding: 0 22px 22px;
}
.card.is-open .card-desc-wrap {
  grid-template-rows: 1fr;
}
@media (max-width: 760px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

/* live list */
.live-list {
  display: flex;
  flex-direction: column;
}
.live-row {
  display: block;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
  transition: background 0.2s ease;
}
.live-row-head {
  display: grid;
  grid-template-columns: 100px 1fr 110px;
  grid-template-areas: "time name meta";
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 16px 34px 16px 10px;
  position: relative;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.live-row .time {
  grid-area: time;
  color: var(--orange-deep);
  font-weight: 700;
  font-size: 14px;
}
.live-row .time .end {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 11px;
  display: block;
}
.live-row .name {
  grid-area: name;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}
.live-row .meta-col {
  grid-area: meta;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 3px;
  min-width: 0;
  justify-items: start;
}
.live-row .place,
.live-row .coordinator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}
.live-row .coordinator {
  font-weight: 600;
}
.live-row .coordinator:empty {
  display: none;
}
.live-row.is-current {
  background: var(--orange-soft);
}
.live-row .chevron {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}
.live-row.is-open .chevron {
  transform: rotate(-135deg);
}
.live-row .card-desc-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}
.live-row .card-desc-inner {
  overflow: hidden;
}
.live-row .card-desc-inner .description {
  padding: 0 10px 16px;
  font-size: 13px;
  color: var(--ink-soft);
}
.live-row .card-desc-inner .card-image {
  margin-left: 10px;
  margin-right: 10px;
}
.live-row.is-open .card-desc-wrap {
  grid-template-rows: 1fr;
}
.badge-live {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
@media (max-width: 760px) {
  .live-row-head {
    grid-template-columns: 90px 1fr 90px;
  }
  .live-row .place,
  .live-row .coordinator {
    font-size: 11px;
  }
}
@media (max-width: 600px) {
  .live-row-head {
    grid-template-columns: 92px 1fr;
    grid-template-areas:
      "time name"
      "meta name";
    row-gap: 6px;
    padding-right: 28px;
  }
  .live-row .name {
    align-self: center;
  }
  .live-row .place,
  .live-row .coordinator {
    font-size: 11px;
  }
}
@media (max-width: 400px) {
  .live-row .place,
  .live-row .coordinator {
    font-size: 10px;
  }
  .live-row .meta-col {
    gap: 6px;
  }
}

/* now / next widget (home page) — 有志発表・野外劇をひとつのタイムラインとして表示 */
.now-single {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.now-block-link {
  display: block;
  transition: background 0.2s ease;
}
.now-block-link:hover {
  background: var(--orange-soft);
}
.now-block {
  padding: 24px 28px;
}
.kind-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 8px;
  letter-spacing: 0.02em;
}
.kind-tag.alt {
  color: var(--orange-deep);
  background: var(--orange-soft);
}
.now-block .status {
  display: flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  font-weight: 700;
  margin-bottom: 10px;
}
.now-block .status.on-air {
  color: var(--orange-deep);
}
.now-block .title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}
.now-block .meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 4px;
}
.now-divider {
  height: 1px;
  background: var(--line);
}
.now-empty {
  padding: 24px 28px;
  font-size: 13px;
  color: var(--ink-soft);
}
@media (max-width: 600px) {
  .now-block {
    padding: 20px 22px;
  }
}

/* お知らせ欄 */
.notice-list {
  max-width: 1080px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.notice-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}
.notice-item:last-child {
  border-bottom: none;
}
.notice-date {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding-top: 2px;
}
.notice-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 4px;
}
.notice-body {
  font-size: 13px;
  color: var(--ink-soft);
}
@media (max-width: 600px) {
  .notice-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 20px;
  }
}

/* 有志発表ページ：日程タブ */
.day-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 32px;
}
.day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 120px;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.day-tab .sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.day-tab:hover {
  border-color: var(--teal);
}
.day-tab.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.day-tab.is-active .sub {
  color: #cfe6e1;
}

/* map */
.map-lead {
  max-width: 1080px;
  margin: 0 auto 20px;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}
.map-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 20px;
  flex-wrap: wrap;
}
.map-tab {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.map-tab.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.map-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  line-height: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--white);
}
.map-frame + .map-frame {
  margin-top: 20px;
}
.map-image {
  display: block;
  width: 100%;
  height: auto;
}
.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.map-overlay [data-file] {
  fill: var(--teal);
  fill-opacity: 0;
  stroke: none;
  cursor: pointer;
  pointer-events: all;
}
/* 色は付けない（fill-opacity: 0 で常に透明）。クリック判定だけは pointer-events: all で確保している。
   キーボード操作時はブラウザ標準のフォーカスリングのみで位置を示す。 */

/* マップなどからのアンカー着地時に、アコーディオンを一瞬だけアニメーション無しで
   開くためのユーティリティ（開いた直後の高さを正しく確定させ、その後のスクロール
   位置がずれないようにする）。通常のクリック開閉には使わない。 */
.no-transition,
.no-transition * {
  transition: none !important;
}

/* マップから直接リンクした企画を自動でハイライトする。
   カードはIndexedDBから非同期に取得してDOMへ挿入しているため、CSSの :target
   （URLのハッシュと一致するidの要素に自動で効く仕組み）だと、ブラウザが
   ページ遷移完了時点のDOMでターゲット要素を確定してしまい、あとから挿入される
   このカードを正しく認識できないことがある。そのため、対象要素が実際にDOMに
   現れた瞬間を検知できる eventTileRenderer.js の focusHashTarget() 側で、
   このクラスを直接付与する形にしている（見た目・アニメーションの中身は
   すべてこちらのCSSで完結しており、JS側はクラス名を付けるだけ）。
   ヘッダーが sticky なので、隠れないように scroll-margin-top で余白も確保している。
   注意1: .card 側に overflow: hidden があるため、box-shadow でリングを描くと
   要素の外側にはみ出す部分がクリップされて見えなくなってしまう。
   outline は overflow: hidden の影響を受けずに描画されるため、こちらを使う。
   注意2: background-color を要素本体に直接アニメーションさせると、終了色を
   固定の色（例: var(--white)）で書く必要が出てしまう。しかし .live-row は
   LIVE NOW中（.is-current）だと地の背景がすでに var(--orange-soft) になって
   おり、終了色を白などに固定するとハイライト終了時にLIVE NOWの配色が
   消えてしまう。そのため ::before で重ねたオーバーレイの「不透明度」だけを
   0まで下げる方式にしている。こうすればオーバーレイの下から、その時点で
   実際に敷かれている地の色（白でもLIVE NOWのorange-softでも）がそのまま
   透けて見えるので、終了色を個別に決め打ちする必要がない。
   ::before は要素中で最初に描画される（＝一番下に敷かれる）ため、
   カードの見出しテキストなどの上に重ならず、背景としてだけ機能する。 */
.map-target-highlight {
  scroll-margin-top: 110px;
  position: relative;
  z-index: 1;
  border-radius: 14px;
}
.map-target-highlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-color: var(--orange-soft);
  pointer-events: none;
  animation: map-target-highlight 2.4s ease-out 1 forwards;
}
@keyframes map-target-highlight {
  0%,
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* アニメーションが無効化される環境（OS側の「視差効果を減らす」設定など）では
   上のキーフレームアニメーション自体が effectively 無効になってしまうため、
   最低限ハイライトだと分かるように、ここだけ静的なスタイルを保険として当てておく。
   通常時のアニメーションと衝突しないよう、このフォールバックは
   prefers-reduced-motion: reduce のときだけに限定している。 */
@media (prefers-reduced-motion: reduce) {
  .map-target-highlight::before {
    opacity: 1 !important;
  }
}





/* 1エリアに複数の企画が紐づく場合の選択ポップアップ */
body.map-chooser-lock {
  overflow: hidden;
}
.map-chooser-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(43, 38, 32, 0.45);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.map-chooser-overlay.is-open {
  display: flex;
}
.map-chooser {
  width: 100%;
  max-width: 380px;
  max-height: min(70vh, 520px);
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(43, 38, 32, 0.25);
}
.map-chooser-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.map-chooser-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.map-chooser-list {
  list-style: none;
  overflow-y: auto;
}
.map-chooser-list li + li {
  border-top: 1px solid var(--line);
}
.map-chooser-list a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px;
  transition: background 0.15s ease;
}
.map-chooser-list a:hover,
.map-chooser-list a:focus-visible {
  background: var(--orange-soft);
  outline: none;
}
.map-chooser-item-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
}
.map-chooser-item-meta {
  font-size: 12px;
  color: var(--ink-soft);
}

/* mystery: ガチャ企画一覧 */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 760px) {
  .game-grid {
    grid-template-columns: 1fr;
  }
}
.game-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(43, 38, 32, 0.08);
}
.game-icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 14px;
}
.game-card h3 {
  font-family: "Kaisei Decol", serif;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 10px;
}
.game-desc {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}
.game-btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.game-btn:hover {
  background: var(--teal-deep);
}


footer {
  background: var(--teal-deep);
  color: #e4efec;
  padding: 48px 24px 28px;
  text-align: center;
}
footer .brand2 {
  font-family: "Kaisei Decol", serif;
  font-size: 20px;
  margin-bottom: 10px;
}
footer p {
  font-size: 12px;
  color: #9bb8b2;
  margin-top: 6px;
}
footer a.backhome {
  display: inline-block;
  margin-top: 16px;
  font-size: 12px;
  color: #e4efec;
  border: 1px solid #3e6b63;
  padding: 6px 16px;
  border-radius: 999px;
}
footer a.backhome:hover {
  background: #0a4a40;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== 場所（.place）の前にマップピンアイコン、主催クラス（.coordinator）の前にクラスアイコンを挿入 ===== */
.card-meta .place::before,
.live-row .place::before {
  content: "";
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  /* SVGマップピンアイコン */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23005a4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.live-row .coordinator::before {
  content: "";
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  /* SVGクラス（人物グループ）アイコン */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23005a4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* 「●」の前の強制改行は eventTileRenderer.js 側で <br> として明示的に挿入している
   （元データの改行をそのまま white-space: pre-wrap で活かすと、入力時に想定していた
   画面幅と実際の閲覧幅が違う場合に文中の変な位置で改行されて見えてしまうため）。
   ここでは通常の折り返し（white-space: normal）にして、文章部分は画面サイズに
   応じてブラウザが自動で改行位置を決めるようにする。 */
.card-desc-inner .description {
  white-space: normal;
}