:root {
  color-scheme:light;
  --ink:#18372f;
  --muted:#63736b;
  --line:#dbe3da;
  --paper:#fbfcf8;
  --today:#bb441d;
  --soon:#097c69;
  --later:#485fa0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif;
  color:var(--ink);
  background:var(--paper);
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  height:100vh;
  height:100dvh;
  display:flex;
  flex-direction:column;
}
a {
  color:var(--soon);
}
button,input {
  font:inherit;
}
button,a,input {
  touch-action:manipulation;
}
button {
  cursor:pointer;
}
button:focus-visible,a:focus-visible,input:focus-visible {
  outline:3px solid #c17720;
  outline-offset:3px;
}
button:disabled {
  cursor:default;
  opacity:.5;
}
[hidden] {
  display:none!important;
}
.visually-hidden {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}
.site-header {
  display:flex;
  align-items:center;
  gap:40px;
  padding:20px 28px;
  border-bottom:1px solid var(--line);
  flex-shrink:0;
  background:#fff;
}
.brand {
  text-decoration:none;
  font-size:27px;
  font-weight:850;
  letter-spacing:.04em;
  line-height:1.15;
  color:var(--ink);
}
.brand span {
  display:block;
  font-size:10px;
  font-weight:500;
  letter-spacing:.07em;
  margin-top:6px;
}
.page-title {
  border-left:1px solid var(--line);
  padding-left:30px;
}
.page-title h1 {
  font-size:21px;
  margin:0 0 3px;
}
.page-title p {
  font-size:12px;
  margin:0;
  color:var(--muted);
}
.schedule-link {
  margin-left:auto;
  font-size:13px;
  text-decoration:none;
  font-weight:650;
}
.schedule-link span {
  margin-left:10px;
}
main {
  min-height:0;
  flex:1;
  display:flex;
  flex-direction:column;
}
.toolbar {
  display:flex;
  gap:20px;
  align-items:center;
  justify-content:space-between;
  padding:15px 28px;
  border-bottom:1px solid var(--line);
}
.periods {
  border:0;
  padding:0;
  margin:0;
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}
.periods label {
  position:relative;
  cursor:pointer;
}
.periods input {
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
}
.periods span {
  display:flex;
  align-items:center;
  gap:7px;
  border:1px solid transparent;
  border-radius:7px;
  padding:10px 12px;
  font-size:13px;
  white-space:nowrap;
}
.periods b {
  font-size:11px;
  min-width:18px;
  text-align:center;
  opacity:.75;
}
.periods input:checked+span {
  background:var(--ink);
  color:white;
}
.periods input:focus-visible+span {
  outline:3px solid #c17720;
  outline-offset:2px;
}
.periods span:hover {
  border-color:#a1b4a7;
}
.dot {
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
  flex-shrink:0;
}
.today {
  background:var(--today);
}
.soon {
  background:var(--soon);
}
.later {
  background:var(--later);
}
.periods input:checked+span .dot {
  box-shadow:0 0 0 1px #fff8;
}
.search {
  width:310px;
  max-width:100%;
}
.search input {
  width:100%;
  padding:11px 13px;
  border:1px solid #bccbc0;
  border-radius:7px;
  background:white;
  font-size:13px;
  color:var(--ink);
}
.workspace {
  display:grid;
  grid-template-columns:350px minmax(0,1fr);
  flex:1;
  min-height:0;
}
.results {
  display:flex;
  flex-direction:column;
  min-height:0;
  background:var(--paper);
  border-right:1px solid var(--line);
}
.results-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:19px 20px 0;
  gap:12px;
}
.results-heading h2 {
  font-size:16px;
  margin:0;
}
.results-heading>span {
  font-size:12px;
  color:var(--muted);
}
.date-note {
  font-size:11px;
  line-height:1.7;
  color:var(--muted);
  margin:9px 20px 15px;
}
#event-list {
  overflow:auto;
  min-height:0;
  overscroll-behavior:contain;
  padding:0 12px 12px;
}
.event-card {
  border:1px solid var(--line);
  background:white;
  border-radius:9px;
  margin-bottom:9px;
  overflow:hidden;
  transition:border-color .15s;
}
.event-card.selected {
  border-color:var(--soon);
  box-shadow:0 0 0 1px var(--soon);
}
.event-button {
  display:block;
  text-align:left;
  width:100%;
  border:0;
  background:transparent;
  color:inherit;
  padding:15px 14px 10px;
}
.event-button:hover {
  background:#f1f5ee;
}
.event-meta {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color:var(--muted);
  margin-bottom:10px;
}
.badge {
  font-size:10px;
  line-height:1.5;
  padding:2px 6px;
  border-radius:4px;
  color:#fff;
  white-space:nowrap;
}
.event-place {
  font-size:14px;
  font-weight:700;
  display:block;
  line-height:1.6;
  margin-bottom:5px;
  overflow-wrap:anywhere;
}
.event-title {
  font-size:12px;
  line-height:1.7;
  display:block;
  overflow-wrap:anywhere;
  color:#485d53;
}
.event-address {
  display:block;
  font-size:11px;
  line-height:1.6;
  color:var(--muted);
  margin-top:7px;
  overflow-wrap:anywhere;
}
.event-link {
  display:block;
  text-align:right;
  font-size:11px;
  font-weight:650;
  text-decoration:none;
  padding:2px 14px 12px;
}
.empty {
  padding:25px 14px;
  font-size:13px;
  line-height:1.9;
  color:var(--muted);
}
.retry {
  display:block;
  margin-top:14px;
  border:1px solid #91a899;
  border-radius:6px;
  padding:8px 15px;
  background:white;
  color:var(--ink);
}
.map-section {
  position:relative;
  min-width:0;
  min-height:0;
  background:#e4e9e0;
}
#map_canvas {
  height:100%;
  width:100%;
  z-index:0;
}
.fit-button {
  position:absolute;
  z-index:500;
  right:14px;
  top:14px;
  background:#fff;
  border:1px solid #c3cfc5;
  box-shadow:0 2px 8px #18372f15;
  color:var(--ink);
  border-radius:6px;
  padding:11px 14px;
  font-size:12px;
}
.map-notice {
  position:absolute;
  bottom:32px;
  left:12px;
  right:12px;
  z-index:500;
  font-size:12px;
  line-height:1.6;
  background:#fff7e8;
  border:1px solid #dfc58e;
  padding:10px 13px;
  border-radius:6px;
  margin:0;
}
.map-footer {
  display:flex;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  padding:9px 20px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:10px;
}
.event-marker {
  background:transparent;
  border:0;
}
.pin {
  display:flex;
  align-items:center;
  justify-content:center;
  width:31px;
  height:31px;
  border:2px solid #fff;
  border-radius:50% 50% 50% 3px;
  transform:rotate(-45deg);
  box-shadow:0 2px 6px #152f4055;
  color:white;
}
.pin>span {
  transform:rotate(45deg);
  font-size:12px;
  font-weight:800;
}
.pin-count {
  position:absolute;
  right:-6px;
  top:-6px;
  border-radius:10px;
  background:#fff;
  color:var(--ink);
  border:1px solid #adbaaf;
  font-size:10px;
  padding:1px 4px;
  font-weight:700;
}
.leaflet-container {
  font-family:inherit;
}
.leaflet-control-attribution {
  font-size:10px!important;
}
.leaflet-popup-content {
  margin:14px 17px;
  line-height:1.7;
  min-width:180px;
}
.popup-event+.popup-event {
  border-top:1px solid var(--line);
  margin-top:12px;
  padding-top:12px;
}
.popup-event h3 {
  font-size:14px;
  margin:8px 0 4px;
  overflow-wrap:anywhere;
}
.popup-event p {
  font-size:12px;
  margin:5px 0;
  overflow-wrap:anywhere;
}
.popup-event time {
  font-size:11px;
  color:var(--muted);
}
.popup-event a {
  display:inline-block;
  font-size:12px;
  font-weight:700;
  margin-top:7px;
}
.noscript {
  padding:12px;
  background:#fff7e8;
}
@media(min-width:1500px) {
  .workspace {
    grid-template-columns:390px minmax(0,1fr);
  }
}
@media(max-width:900px) {
  .site-header {
    gap:20px;
    padding:15px 18px;
  }
  .page-title {
    padding-left:20px;
  }
  .toolbar {
    padding:12px 16px;
    gap:12px;
    flex-wrap:wrap;
  }
  .search {
    width:100%;
  }
  .workspace {
    grid-template-columns:300px minmax(0,1fr);
  }
  .periods span {
    padding:8px 11px;
  }
}
@media(max-width:600px) {
  body {
    height:auto;
    min-height:100dvh;
  }
  .site-header {
    gap:15px;
    padding:14px 16px;
    flex-wrap:wrap;
  }
  .brand {
    font-size:23px;
  }
  .brand span {
    font-size:9px;
  }
  .page-title {
    padding-left:15px;
  }
  .page-title h1 {
    font-size:17px;
  }
  .page-title p {
    font-size:10px;
  }
  .schedule-link {
    font-size:11px;
    margin-left:0;
    width:100%;
    text-align:right;
    margin-top:-1px;
  }
  .toolbar {
    padding:10px 12px;
    gap:10px;
  }
  .periods {
    width:100%;
    gap:2px;
    justify-content:space-between;
  }
  .periods span {
    font-size:11px;
    padding:9px 7px;
    gap:4px;
  }
  .periods b {
    min-width:12px;
    font-size:10px;
  }
  .dot {
    width:7px;
    height:7px;
  }
  .search input {
    font-size:16px;
    padding:10px 12px;
  }
  .workspace {
    display:flex;
    flex-direction:column;
  }
  .map-section {
    order:-1;
    height:49vh;
    height:49svh;
    min-height:280px;
  }
  .results {
    border-right:0;
    min-height:200px;
  }
  .results-heading {
    padding:17px 16px 0;
  }
  .date-note {
    margin-left:16px;
    margin-right:16px;
  }
  #event-list {
    overflow:visible;
    padding:0 12px 12px;
  }
  .fit-button {
    font-size:11px;
    padding:10px;
    top:10px;
    right:10px;
  }
  .map-footer {
    padding:10px 16px;
    line-height:1.8;
  }
  .event-card {
    margin-bottom:10px;
  }
  .leaflet-popup-content {
    max-width:230px;
  }
  .leaflet-control-attribution {
    font-size:9px!important;
  }
}

/* 一覧と地図ポップアップで、都道府県・開始日時・曜日の見た目を統一する。 */
.event-meta {
  flex-wrap: wrap;
}
.prefecture-tag {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid #bdccc3;
  border-radius: 4px;
  background: #f1f5ef;
  color: #344d41;
  font-size: 10px;
  line-height: 1.5;
}
.event-meta .event-start {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.event-meta .event-start.day-saturday { background: #1753a6; }
.event-meta .event-start.day-sunday { background: #b12828; }
.event-card > .event-address {
  padding: 0 14px 10px;
  margin: 0;
}
.address-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.address-link::after { content: ' ↗'; }
.address-link:hover { color: #075f50; }
.popup-event .address-link {
  display: block;
  font-size: 11px;
  font-weight: 400;
}
