:root {
  color-scheme: light;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  color: #18352c;
  background: #f6f8f5;
  --muted: #526960;
  --edge: #dbe5dc;
  --green: #176849;
  --light: #e9f3e9;
  --main: #153d2f;
  --paper: #fff;
  --radius: 1.375rem;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
:focus-visible {
  outline: 3px solid #209477;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.35;
}
svg {
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: middle;
  flex: 0 0 auto;
}
.wrap {
  max-width: 78rem;
  width: calc(100% - 5rem);
  margin-inline: auto;
}
.skip {
  position: fixed;
  z-index: 10;
  top: 1rem;
  left: 1rem;
  transform: translateY(-200%);
  background: white;
  padding: 0.8rem;
}
.skip:focus {
  transform: translateY(0);
}
.site-header {
  background: white;
  border-bottom: 1px solid var(--edge);
}
.masthead {
  min-height: 4.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
}
#about-trigger {
  grid-column: 3;
  grid-row: 1;
  color: var(--green);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand-mark {
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 auto;
}
.brand-title {
  display: block;
  font-weight: 800;
  letter-spacing: -0.025em;
  font-size: 1.02rem;
}
#main {
  padding-block: 2rem 3.5rem;
}
.current-district {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 0.56rem 0.65rem;
  border: 1px solid var(--edge);
  border-radius: 0.65rem;
  background: #fbfcfa;
  text-decoration: none;
  font-size: 0.885rem;
  line-height: 1.4;
}
.current-district:hover {
  background: var(--light);
  border-color: #b7d8bf;
}
.current-district svg {
  width: 1rem;
  height: 1rem;
  color: var(--green);
}
.current-district span {
  font-size: 0.77rem;
  color: var(--green);
  white-space: nowrap;
  padding-left: 0.5rem;
  border-left: 1px solid var(--edge);
}
.action {
  width: max-content;
  border: 1px solid var(--edge);
  background: var(--paper);
  color: var(--main);
  padding: 0.72rem 0.95rem;
  border-radius: 0.65rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.875rem;
  font-weight: 700;
}
.action:hover {
  background: #eaf4e9;
  border-color: #b7d8bf;
}
.action svg {
  width: 1.05rem;
  height: 1.05rem;
}
.dashboard-calendar {
  max-width: 55rem;
  margin-top: 2rem;
}
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 0.8rem;
  margin: 0 0 0.95rem;
}
.section-header h1,
.section-header h2 {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}
.section-date {
  color: var(--muted);
  font-size: 0.875rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}
.card {
  padding: 0.95rem 1rem;
  color: #000;
  background: var(--tint);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, var(--tint));
  border-radius: 1rem;
  min-width: 0;
  min-height: 9.1rem;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}
.type-icon {
  display: inline-grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 0.65rem;
  color: var(--icon-ink);
  background: var(--icon-fill);
  flex: 0 0 auto;
}
.type-icon svg {
  width: 1.12rem;
  height: 1.12rem;
}
.card .type-icon {
  color: var(--card-icon-ink);
  background: var(--marker);
}
.card :focus-visible {
  outline-color: var(--accent);
}
.card h3 {
  font-size: 0.94rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.guide-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  padding: 0.42rem 0.4rem;
  border: 0;
  border-radius: 0.48rem;
  color: inherit;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 650;
}
.guide-btn:hover {
  background: color-mix(in srgb, var(--accent) 9%, #fff);
}
.guide-btn svg {
  width: 0.86rem;
  height: 0.86rem;
}
.date-row {
  margin-top: 0.7rem;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.42rem;
}
.date-row time {
  font-size: 2rem;
  line-height: 1.16;
  font-weight: 780;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}
.date-row span {
  font-size: 0.88rem;
  font-weight: 700;
}
.date-row .relative {
  font-size: 0.76rem;
  padding: 0.2rem 0.42rem;
  border-radius: 0.4rem;
  background: #fff;
}
.date-row .relative-today {
  color: #fff;
  background: #000;
  font-size: 0.85rem;
  font-weight: 800;
}
.card-note {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.84rem;
  line-height: 1.5;
}
.card-note a {
  color: inherit;
  text-underline-offset: 0.2em;
}
.calendar {
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 1.05rem;
  padding: 1.05rem;
}
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}
.month-nav h3 {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.square {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--edge);
  border-radius: 0.55rem;
  width: 2rem;
  height: 2rem;
  background: white;
  color: var(--main);
}
.square:hover:not(:disabled) {
  background: var(--light);
}
.square svg {
  width: 1rem;
  height: 1rem;
}
.days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.19rem;
  text-align: center;
}
.weekday {
  padding-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 650;
}
.sunday {
  color: #9b3d49;
}
.saturday {
  color: #315f8a;
}
.day {
  position: relative;
  border: 0;
  border-radius: 0.58rem;
  background: transparent;
  color: inherit;
  align-content: start;
  justify-items: center;
  display: grid;
  gap: 0.25rem;
  padding: 0.44rem 0.12rem 0.22rem;
  min-height: 2.55rem;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.day:hover {
  background: #f0f6ef;
}
.day[aria-pressed="true"] {
  background: #e0f1e3;
  box-shadow: inset 0 0 0 1px #badac0;
  font-weight: 750;
}
.day[aria-current="date"] .day-number {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: 1.9rem;
  min-height: 0.35rem;
}
.dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--marker);
  flex: none;
}
.day-events {
  margin-top: 0.8rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--edge);
  min-height: 5.1rem;
}
dialog p,
dialog li {
  font-size: 0.95rem;
  line-height: 1.75;
}
dialog p + p {
  margin-top: 0.65rem;
}
dialog ol {
  padding-left: 1.35rem;
}
dialog li + li {
  margin-top: 0.3rem;
}
.day-events strong {
  font-size: 0.88rem;
}
.day-events p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  line-height: 1.5;
}
.event-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  padding: 0;
  margin: 0.55rem 0 0;
  list-style: none;
}
.event-list li {
  background: var(--tint);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border-radius: 0.35rem;
  padding: 0.24rem 0.45rem;
  font-size: 0.79rem;
  font-weight: 700;
}
.calendar-paper {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.65rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.65rem;
  background: #f8f4e8;
  line-height: 1.55;
  font-size: 0.88rem;
}
.calendar-paper p {
  margin-block: 0.22rem 0.3rem;
  color: var(--muted);
}
.association-panel {
  padding: 1.05rem;
  border: 1px solid var(--edge);
  border-radius: 1.05rem;
  background: var(--paper);
}
.association-panel p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}
.association-field {
  display: grid;
  gap: 0.4rem;
  margin-block: 1rem;
}
.association-field label {
  font-size: 0.88rem;
  font-weight: 700;
}
.association-field select,
.association-field input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #bdcec0;
  border-radius: 0.55rem;
  background: var(--paper);
  color: inherit;
  font: inherit;
}
.association-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
#association-select {
  scroll-margin-top: 14rem;
}
.association-save {
  background: var(--main);
  color: white;
}
.association-save:hover {
  background: var(--green);
}
#association-status:not(:empty) {
  margin-top: 0.7rem;
}
.settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 1.4rem;
  align-items: start;
}
.association-panel .association-field:first-child {
  margin-top: 0;
}
.association-help {
  padding: 1.05rem;
  border: 1px solid var(--edge);
  border-radius: 1.05rem;
  background: #eff4ec;
  line-height: 1.65;
}
.association-help h2 {
  font-size: 1.05rem;
}
.association-help p {
  margin-block: 0.55rem;
  color: var(--muted);
  font-size: 0.91rem;
}
.settings-finder {
  margin-top: 2rem;
}
.calendar-actions {
  display: flex;
  border-top: 1px solid var(--edge);
  margin-top: 0.75rem;
  padding-top: 0.85rem;
}
.source-link {
  color: var(--green);
  font-size: 0.84rem;
  text-underline-offset: 0.2em;
}
.notice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: #eff4ec;
  color: #435d51;
  border: 1px solid var(--edge);
  border-radius: 0.82rem;
  margin-top: 1.1rem;
  padding: 0.8rem 0.9rem;
  line-height: 1.65;
  font-size: 0.88rem;
}
.notice svg {
  margin-top: 0.12rem;
}
.site-footer {
  padding-block: 1.25rem;
  border-top: 1px solid var(--edge);
  color: var(--muted);
  font-size: 0.82rem;
}
.about-links {
  padding-left: 1.25rem;
}
.about-links a {
  color: var(--green);
  text-underline-offset: 0.2em;
}
dialog {
  color: var(--main);
  border: 1px solid var(--edge);
  border-radius: 1.25rem;
  padding: 1.45rem;
  width: min(35rem, calc(100% - 2rem));
  box-shadow: 0 18px 70px #092b2240;
  max-height: calc(100% - 2rem);
}
dialog::backdrop {
  background: #11312878;
}
.dialog-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.dialog-head h2 {
  font-size: 1.2rem;
}
.dialog-head button {
  margin-left: auto;
  flex: 0 0 auto;
}
.find-heading {
  margin: 0.35rem 0 1.55rem;
}
.find-heading h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.52rem;
  letter-spacing: -0.04em;
}
.finder {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.24fr);
  align-items: start;
  gap: 1.4rem;
}
.finder-list,
.map-panel {
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 1rem;
  min-width: 0;
  overflow: hidden;
}
.find-search {
  display: grid;
  gap: 0.5rem;
  padding: 1.1rem;
  border-bottom: 1px solid var(--edge);
}
.find-search label {
  font-size: 0.9rem;
  font-weight: 750;
}
.search-field {
  display: flex;
  align-items: center;
  padding-inline: 0.65rem;
  gap: 0.4rem;
  border: 1px solid #bdcec0;
  border-radius: 0.55rem;
}
.search-field:focus-within {
  outline: 2px solid #209477;
}
.search-field input {
  border: 0;
  outline: none;
  padding: 0.68rem 0.2rem;
  color: var(--main);
  background: none;
  width: 100%;
}
#district-list {
  list-style: none;
  padding: 0.45rem 1.07rem;
  margin: 0;
}
.find-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  padding: 0.81rem 0.25rem;
  line-height: 1.4;
}
.find-row:hover {
  background: #f3f7f1;
}
#district-list li + li {
  border-top: 1px solid #e7ede7;
}
.find-row small {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.find-row svg {
  margin-left: auto;
  color: #557269;
  width: 1rem;
  height: 1rem;
}
.swatch {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 0.2rem;
  background: var(--accent);
  flex: 0 0 auto;
}
.no-results {
  padding: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
#locator-map {
  min-height: 31rem;
  background: #edf3ec;
  color: var(--muted);
}
#locator-map > p {
  padding: 1rem;
}
.map-panel figcaption {
  margin: 0;
  padding: 0.65rem 0.95rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.6;
}
.map-panel {
  margin: 0;
}
.maplibregl-popup-content a {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--green);
  font-weight: 700;
  text-underline-offset: 0.15em;
}
@media (max-width: 68rem) {
  .wrap {
    width: calc(100% - 3rem);
  }
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.62rem;
  }
  .card {
    padding-inline: 0.72rem;
  }
  .card-head {
    gap: 0.38rem;
  }
  .guide-btn svg {
    display: none;
  }
}
@media (max-width: 49rem) {
  .settings,
  .finder {
    grid-template-columns: minmax(0, 1fr);
  }
  .wrap {
    width: calc(100% - 2rem);
  }
  #main {
    padding-block: 1rem 2.4rem;
  }
  .masthead {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    padding-block: 0.8rem;
  }
  .brand-title {
    display: none;
  }
  .current-district {
    justify-self: end;
    max-width: 100%;
  }
  .current-district strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calendar {
    max-width: 39rem;
  }
  #locator-map {
    min-height: 23rem;
  }
}
@media (max-width: 31rem) {
  .masthead {
    min-height: 4.2rem;
    gap: 0.25rem;
  }
  .brand-mark {
    width: 2rem;
    height: 2rem;
  }
  .section-header h1,
  .section-header h2 {
    font-size: 1.35rem;
  }
  .card {
    padding: 0.65rem;
    min-height: 8.45rem;
  }
  .card-head {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: 2.1rem;
  }
  .card h3 {
    flex: 1;
    font-size: 0.84rem;
    margin-top: 0.22rem;
  }
  .type-icon {
    width: 1.68rem;
    height: 1.68rem;
    border-radius: 0.5rem;
  }
  .type-icon svg {
    width: 0.92rem;
    height: 0.92rem;
  }
  .guide-btn {
    display: block;
    margin-left: 0;
    text-align: left;
    padding: 0.3rem 0.38rem;
    font-size: 0.71rem;
  }
  .date-row {
    margin-top: 0.48rem;
    gap: 0.3rem;
  }
  .date-row time {
    font-size: 1.62rem;
  }
}

:root [hidden] {
  display: none;
}
