:root {
  color-scheme: light;
  --ink: #16384d; --blue: #174c72; --green: #136951; --yellow: #f5d65b;
  --paper: #f3f7fa; --line: #ccdce5;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--ink); background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--blue); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #bd6400; outline-offset: 4px; }
[hidden] { display: none !important; }
header { max-width: 1440px; margin: auto; padding: 20px 32px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.brand { font-weight: 800; font-size: 18px; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { background: var(--blue); color: white; font-size: 30px; line-height: 38px; text-align: center; width: 38px; border-radius: 50%; }
main { max-width: 1440px; margin: auto; padding: 0 32px 64px; }
.intro { display: flex; justify-content: space-between; gap: 24px; padding: 10px 0 24px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--green); margin: 0; }
h1 { font-size: clamp(26px, 3vw, 38px); line-height: 1.5; letter-spacing: .025em; margin: 6px 0 0; }
p { line-height: 1.8; }
.explorer { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: white; }
.finder { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.search-row { display: flex; gap: 10px; }
.search-row input { min-width: 0; }
#clear-search { background: white; border: 1px solid #8facba; border-radius: 5px; color: var(--blue); padding: 0 14px; white-space: nowrap; font-size: 13px; }
.search-label { display: block; font-size: 18px; font-weight: 800; margin-bottom: 12px; }
#keyword { width: 100%; padding: 12px 14px; border: 1px solid #809bab; border-radius: 6px; background: #fbfdff; }
.map-panel { min-width: 0; position: relative; }
.map-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 14px; gap: 10px; }
.map-toolbar strong { font-size: 19px; }
.map-toolbar p { margin: 4px 0 0; font-size: 12px; color: #506979; }
.map-toolbar button { border: 1px solid #8facba; border-radius: 5px; padding: 8px 12px; color: var(--blue); background: white; white-space: nowrap; font-size: 12px; }
.discovery-track { height: 5px; background: #e1e9ef; }
#discovery-bar { width: 100%; height: 100%; background: var(--green); transition: width .25s ease; }
#map { height: clamp(320px, calc(100svh - 330px), 480px); width: 100%; background: #e1edf0; z-index: 0; }
.map-pin { border: 0; background: transparent; }
.pin-badge { display: grid; place-items: center; width: 32px; height: 32px; border: 2px solid white; border-radius: 50% 50% 50% 7px; color: white; box-shadow: 0 2px 5px #16384d50; font-size: 14px; font-weight: bold; }
.pin-badge.is-ended { border-style: dashed; }
.map-pin:hover .pin-badge, .map-pin:focus .pin-badge { outline: 3px solid var(--yellow); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 14px 18px 4px; }
.legend-item { display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 3px 0; background: none; color: var(--ink); font-size: 11px; }
.legend-item span { color: white; width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.map-note { font-size: 10px; padding: 0 18px; color: #506979; margin: 5px 0 12px; }
#map-error { font-size: 12px; padding: 10px 18px; margin: 0; background: #fff3cf; }
.map-popup { font-family: "Yu Gothic", Meiryo, sans-serif; color: var(--ink); }
.map-popup h3 { font-size: 17px; line-height: 1.5; margin: 8px 0; }
.map-popup p { font-size: 12px; margin: 10px 0; }
.map-popup .popup-category { color: var(--green); font-weight: bold; margin: 0; }
.results-heading { margin-top: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h2 { font-size: 24px; margin: 0; }
.results-heading p { margin: 6px 0; font-size: 14px; }
.note { font-size: 12px; color: #506979; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.card { border: 1px solid var(--line); border-top: 5px solid var(--green); background: white; border-radius: 5px; padding: 22px; display: flex; flex-direction: column; min-width: 0; }
.card.is-selected { outline: 3px solid var(--yellow); }
.card-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--green); font-weight: bold; }
.card h3 { font-size: 19px; line-height: 1.6; margin: 16px 0 8px; }
.card p { font-size: 13px; margin: 8px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 16px; }
.tags span { font-size: 11px; padding: 4px 7px; background: #eaf2f6; color: var(--blue); border-radius: 3px; }
.card-links { margin-top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 15px; border-top: 1px solid var(--line); font-size: 12px; }
.locate-button { border: 1px solid var(--blue); padding: 7px 9px; color: var(--blue); border-radius: 4px; background: white; }
.event-status { font-weight: bold; color: #725700; }
.location-note { color: #725700; }
.empty, #error { background: white; padding: 36px; border: 1px solid var(--line); border-radius: 8px; margin-top: 22px; }
footer { padding: 32px; text-align: center; background: #e5eff4; font-size: 12px; }
footer strong { font-size: 16px; }
footer p { margin: 8px 0; }
@media (max-width: 900px) {
  main { padding: 0 20px 48px; }
  .finder { padding: 20px 16px; }
  .map-toolbar { padding: 16px 14px; align-items: flex-start; }
  .map-toolbar strong { font-size: 16px; }
  .map-toolbar p { max-width: 22em; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  header { padding: 16px; }
  .brand { font-size: 15px; }
  header > span { display: none; }
  main { padding: 0 12px 40px; }
  .intro { padding: 8px 4px 16px; }
  h1 { font-size: 27px; }
  .eyebrow { font-size: 11px; }
  #map { height: 420px; }
  .map-toolbar { align-items: center; padding: 14px; }
  .map-toolbar strong { font-size: 15px; }
  .map-toolbar p { font-size: 10px; }
  .map-note { font-size: 10px; }
  .map-legend { gap: 5px 12px; padding: 10px 14px 0; }
  .finder { padding: 16px; }
  .cards { grid-template-columns: 1fr; }
  .results-heading { align-items: flex-start; flex-direction: column; margin-top: 26px; }
  h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { #discovery-bar { transition: none; } }

.eme-signature { font-size: 12px; color: #4b6174; margin-top: 18px; }
