*, *::before, *::after {
  box-sizing: border-box;
}

.Canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.InsetCanvas {
  display: block;
  cursor: pointer;
}

.Inset {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 10;
  background: var(--color-panel-background);
  border-radius: 12px;
  box-shadow: 0 6px 24px var(--color-panel-shadow);
  overflow: hidden;
}
.Inset:not([data-open]) {
  display: none;
}

.Attribution {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: calc(100% - 32px);
  padding: 9px 16px;
  color: var(--color-muted);
  font-size: 10px;
  line-height: 16px;
  text-align: right;
  word-break: break-all;
  pointer-events: none;
  z-index: 5;
}

.SchoolType {
  position: fixed;
  top: 56px;
  left: 16px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  max-width: min(360px, 100vw - 32px);
  max-height: calc(100vh - 112px);
  padding-bottom: 16px;
  background: var(--color-panel-background);
  border-radius: 12px;
  box-shadow: 0 6px 24px var(--color-panel-shadow);
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.SchoolType-Group {
  display: flex;
  flex-direction: column;
}
.SchoolType-Group[data-off] .SchoolTypeHead {
  color: var(--color-muted);
}
.SchoolType-Total {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  color: var(--color-font);
}
.SchoolType-Region {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  background: var(--color-region-background);
  border-radius: 16px;
  font-size: 13px;
  white-space: nowrap;
}
.SchoolType-Count {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.SchoolTypeHead {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  flex-shrink: 0;
  padding: 0 16px;
  cursor: pointer;
  color: var(--color-font);
}
.SchoolTypeHead-Square {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 2px;
}
.SchoolTypeHead-Label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 22px;
}
.SchoolTypeHead-Count {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.SchoolTypeItem {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  flex-shrink: 0;
  padding: 0 16px 0 30px;
  cursor: pointer;
  color: var(--color-font);
}
.SchoolTypeItem[data-off] {
  color: var(--color-muted);
}
.SchoolTypeItem-Dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 6px;
}
.SchoolTypeItem-Label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  line-height: 21px;
}
.SchoolTypeItem-Count {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 19px;
  font-variant-numeric: tabular-nums;
}

.Article-Body {
  font-size: 16px;
  line-height: 30px;
  color: var(--color-font);
}
.Article-Body p {
  margin: 0 0 10px;
}
.Article-Body p:last-child {
  margin-bottom: 0;
}
.Article-Address {
  margin: 24px 0 0;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-font);
}
.Article-Address:first-child {
  margin-top: 0;
}
.Article-Address + .Article-Address {
  margin-top: 0;
}

.ArticleTitle {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 33px;
  color: var(--color-font);
}

.Destination {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 24px;
}
.Destination:first-child {
  margin-top: 0;
}
.Destination-Title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 26px;
  color: var(--color-font);
}
.Destination-Link {
  padding: 0;
  appearance: none;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  line-height: 24px;
  color: var(--color-font);
  text-align: left;
  cursor: pointer;
}

.Outcome-Header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}
.Outcome-Title {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 33px;
  color: var(--color-font);
}
.Outcome-Back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  appearance: none;
  border: none;
  background: none;
  color: var(--color-font);
  cursor: pointer;
}
.Outcome-Back svg {
  display: block;
}
.Outcome-Main {
  margin-top: 16px;
}
.Outcome-Lead {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-font);
}
.Outcome-Section + .Outcome-Section {
  margin-top: 24px;
}
.Outcome-Head {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-muted);
}
.Outcome-Table {
  display: grid;
  column-gap: 20px;
  row-gap: 4px;
  font-size: 15px;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
  color: var(--color-font);
}
.Outcome-Table-Head {
  font-size: 13px;
  color: var(--color-muted);
}
.Outcome-Table-Head:first-child {
  text-align: right;
}
.Outcome-Table-Label {
  text-align: right;
}
.Outcome-Table-Label a {
  color: var(--color-font);
  text-decoration: none;
}
.Outcome-Gap {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-muted);
}
.Outcome-Note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 21px;
  color: var(--color-muted);
}
.Outcome-Note p {
  margin: 0;
}
.Outcome-Note p + p {
  margin-top: 6px;
}

.SchoolModal {
  position: fixed;
  top: 56px;
  right: 16px;
  z-index: 20;
  width: 480px;
  max-height: calc(100vh - 112px);
  padding: 20px 24px;
  background: var(--color-panel-background);
  border-radius: 12px;
  box-shadow: 0 6px 24px var(--color-panel-shadow);
  overflow-y: scroll;
  overscroll-behavior-y: none;
  scrollbar-width: none;
}
.SchoolModal:not([data-open]) {
  display: none;
}

.Logo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 24px;
}
.Logo-Link {
  color: var(--color-font);
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-decoration: none;
}

:root {
  --color-background: #eef0f2;
  --color-font: #1f1f1f;
  --color-muted: #b4b4b4;
  --color-panel-background: #ffffff;
  --color-panel-shadow: rgba(0, 0, 0, 0.12);
  --color-region-background: #f2f3f5;
}

:root[data-theme=dark] {
  --color-background: #16181c;
  --color-font: #ededed;
  --color-muted: #9a9a9a;
  --color-panel-background: #24272c;
  --color-panel-shadow: rgba(0, 0, 0, 0.4);
  --color-region-background: #1d2025;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--color-background);
}

body:has(#jp-school) {
  overflow: hidden;
}

#jp-school {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--color-background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#jp-school:empty {
  position: static;
  height: 0;
}

body:has(#jp-school:empty) {
  overflow: auto;
}

.SchoolStatic {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px 96px;
  color: var(--color-font);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
.SchoolStatic-Title {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.35;
}
.SchoolStatic-Lead {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--color-muted);
}

.RegionNav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 32px;
  padding-top: 24px;
}
.RegionNav-Item {
  font-size: 14px;
  color: var(--color-muted);
  text-decoration: none;
}
.RegionNav-Item:hover {
  color: var(--color-font);
}
.RegionNav-Item[aria-current] {
  color: var(--color-font);
}
