@font-face {
  font-family: "Snower Huninn";
  src: url("/fonts/huninn-yuzawa-pop.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

.school-directory-page {
  --school-ink: #24545a;
  --school-muted: #5b7479;
  --school-line: #bdd4d1;
  --school-paper: #fffaf0;
  --school-coral: #d95540;
  --school-yellow: #ffdb70;
  margin: 0;
  color: var(--school-ink);
  background-color: var(--school-paper);
  background-image: radial-gradient(#d9cdb652 .75px, transparent .75px);
  background-size: 20px 20px;
}

.school-directory-page :is(h1, h2, h3, p) { overflow-wrap: anywhere; }
.school-directory-page :is(a, button, input, select, summary):focus-visible {
  outline: 3px solid #146f7b;
  outline-offset: 4px;
}
.school-directory-page a { color: inherit; text-decoration: none; }
.school-directory-page button,
.school-directory-page input,
.school-directory-page select { font: inherit; }

.school-directory-page .diary-header {
  background: #fffdf5;
  border-bottom-color: #538e92;
}
.school-directory-page .diary-brand > .diary-icon {
  width: 35px;
  height: 35px;
  padding: 5px;
  color: #2c737b;
  background: var(--school-yellow);
  border-radius: 12px;
  transform: rotate(-10deg);
}
.school-directory-page .diary-icon-button { background: #fffef8; border-radius: 12px; }
.school-directory-page .diary-menu > nav {
  background: #fffdf5;
  border: 2px solid #80afb3;
  border-radius: 15px;
  box-shadow: 5px 5px #eedca7;
}
.school-directory-page .diary-language { position: relative; font-size: 12px; color: #2d6971; }
.school-directory-page .diary-language summary {
  padding: 7px 10px;
  list-style: none;
  cursor: pointer;
  background: #fffef9;
  border: 1px solid #c5deda;
  border-radius: 999px;
  font-weight: 700;
}
.school-directory-page .diary-language summary::-webkit-details-marker { display: none; }
.school-directory-page .diary-language div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  gap: 4px;
  min-width: 94px;
  padding: 7px;
  background: #fffef9;
  border: 1px solid #c5deda;
  border-radius: 12px;
  box-shadow: 0 5px 16px #174e5a20;
}
.school-directory-page .diary-language a { padding: 5px 7px; border-radius: 7px; }
.school-directory-page .diary-language a:hover { background: #e4f1ef; }

.school-main { min-height: 70vh; }
.school-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(120deg, #e8f7fa 0 62%, #fff6d5 62% 100%);
  border-bottom: 1px solid #9fc8cb;
}
.school-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, #fffaf0b8 100%);
}
.school-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(270px, .6fr);
  align-items: center;
  gap: 46px;
  width: min(1180px, calc(100% - 48px));
  min-height: 350px;
  margin: 0 auto;
  padding: 48px 0;
}
.school-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: #2b7881;
  font-size: 13px;
  font-weight: 750;
}
.school-eyebrow {
  margin: 0;
  color: #087e93;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
}
.school-hero h1 {
  max-width: 720px;
  margin: 9px 0 16px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.18;
  letter-spacing: .015em;
}
.school-hero h1 span {
  position: relative;
  display: inline-block;
  z-index: 0;
}
.school-hero h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -5px;
  bottom: .03em;
  left: -5px;
  height: .2em;
  background: var(--school-yellow);
  transform: rotate(-1.3deg);
}
.school-hero-lead {
  max-width: 620px;
  margin: 0;
  color: #3f6972;
  font-size: 16px;
  line-height: 1.9;
}
.school-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.school-hero-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  background: #fffef9dc;
  border: 1px solid #a7cdd4;
  border-radius: 999px;
  color: #346873;
  font-size: 11px;
  font-weight: 700;
}
.school-hero-art {
  width: min(340px, 100%);
  justify-self: end;
  filter: drop-shadow(5px 7px 0 #e1cca0);
  transform: rotate(2deg);
}

.school-directory {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 70px;
}
.school-source-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0 0 28px;
  padding: 16px 18px;
  color: #665f78;
  background: #f7f1fb;
  border: 1px solid #ddd4e9;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.85;
}
.school-source-note svg { width: 21px; height: 21px; color: #856a9e; }

.school-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}
.school-guide article {
  position: relative;
  min-width: 0;
  padding: 21px 20px 19px;
  background: #fffef9;
  border: 1px solid var(--school-line);
  border-radius: 16px;
  box-shadow: 3px 4px #eadfc5;
}
.school-guide article:nth-child(2) { background: #f3efff; transform: rotate(-.5deg); }
.school-guide article:nth-child(3) { background: #eef7ed; transform: rotate(.5deg); }
.school-guide small { color: #188296; font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.school-guide h2 { margin: 8px 0 6px; font-size: 19px; }
.school-guide p { margin: 0; color: var(--school-muted); font-size: 12px; line-height: 1.8; }

.school-browser {
  position: sticky;
  z-index: 10;
  top: 10px;
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) repeat(2, minmax(150px, .65fr));
  gap: 11px;
  padding: 16px;
  background: #fffdf6ed;
  border: 1px solid #b7d2d0;
  border-radius: 18px;
  box-shadow: 4px 5px #e5d6b9;
  backdrop-filter: blur(10px);
}
.school-search { position: relative; }
.school-search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #598087;
  transform: translateY(-50%);
}
.school-browser input,
.school-browser select {
  width: 100%;
  min-height: 48px;
  color: #27545c;
  background: #fff;
  border: 1px solid #b7cecc;
  border-radius: 12px;
}
.school-browser input { padding: 11px 14px 11px 43px; }
.school-browser select { padding: 10px 34px 10px 13px; }

.school-lesson-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 15px 0 0;
}
.school-lesson-filters button {
  min-height: 39px;
  padding: 8px 13px;
  color: #355f67;
  cursor: pointer;
  background: #fffef9;
  border: 1px solid #afc9c6;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.school-lesson-filters button[aria-pressed="true"] {
  color: #214e55;
  background: #d9efeb;
  border-color: #548d8c;
  box-shadow: 0 3px #b5d5d0;
}
.school-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 19px;
}
.school-results-head h2 { margin: 5px 0 0; font-size: 28px; }
.school-results-head p { margin: 0; color: var(--school-muted); font-size: 12px; }
.school-result-status {
  padding: 6px 10px;
  color: #28646c !important;
  background: #e6f4f1;
  border-radius: 7px;
  font-weight: 750;
}

.school-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.school-card {
  --card-accent: #6bb5a8;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 405px;
  flex-direction: column;
  padding: 25px;
  background: #fffef9;
  border: 1px solid #bcd2ce;
  border-top: 5px solid var(--card-accent);
  border-radius: 18px 14px 20px 15px;
  box-shadow: 5px 6px #e4d8bd;
  transition: transform .18s ease, box-shadow .18s ease;
}
.school-card:nth-child(2n) { --card-accent: #efa18d; }
.school-card:nth-child(3n) { --card-accent: #86aebd; }
.school-card:hover { transform: translateY(-3px) rotate(-.15deg); box-shadow: 7px 9px #e4d8bd; }
.school-card::before {
  content: "";
  position: absolute;
  top: -15px;
  right: 28px;
  width: 76px;
  height: 28px;
  background: #ffe39a;
  opacity: .88;
  clip-path: polygon(4% 3%, 97% 8%, 100% 87%, 3% 100%, 0 15%);
  transform: rotate(4deg);
}
.school-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}
.school-area {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #267985;
  font-size: 11px;
  font-weight: 750;
}
.school-season {
  padding: 4px 8px;
  color: #6c5b2f;
  background: #fff2c4;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.school-card h3 { margin: 17px 0 4px; font-size: 24px; line-height: 1.45; }
.school-original { margin: 0 0 17px; color: #72868a; font-size: 12px; }
.school-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 17px; }
.school-tags span {
  padding: 4px 8px;
  color: #38636b;
  background: #edf6f4;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
}
.school-facts {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 14px 0;
  border-block: 1px dashed #c9d8d3;
}
.school-facts > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
.school-facts dt { color: #718589; font-size: 11px; }
.school-facts dd { margin: 0; color: #315a61; font-size: 12px; line-height: 1.75; }
.school-detail { flex: 1; margin: 15px 0; color: #587177; font-size: 12px; line-height: 1.9; }
.school-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 15px; margin-top: auto; }
.school-official {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 9px 13px;
  color: #fff;
  background: var(--school-coral);
  border: 2px solid #28535a;
  border-radius: 13px 9px 14px 10px;
  box-shadow: 3px 4px var(--school-yellow);
  font-size: 12px;
  font-weight: 750;
}
.school-official:hover { transform: translateY(-1px); box-shadow: 4px 6px var(--school-yellow); }
.school-save {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 11px;
  color: #2f6e75;
  cursor: pointer;
  background: #eef8f6;
  border: 1px solid #9fc5c1;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 700;
}
.school-save[aria-pressed="true"] { color: #705716; background: #fff2bf; border-color: #c4a954; }
.school-source { width: 100%; color: #778886; font-size: 9px; }

.school-empty {
  margin: 20px 0 0;
  padding: 30px 18px;
  text-align: center;
  color: #526f73;
  background: #fffef9;
  border: 1px dashed #acc8c4;
  border-radius: 16px;
}
.school-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 38px;
  padding: 27px;
  background: #eef7e9;
  border: 1px solid #cbdcbe;
  border-radius: 18px;
  box-shadow: 4px 5px #e4d7bb;
}
.school-next h2 { margin: 0 0 7px; font-size: 24px; }
.school-next p { margin: 0; color: #5b735d; font-size: 13px; line-height: 1.8; }
.school-next-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.school-next-links a {
  min-height: 41px;
  padding: 9px 12px;
  color: #2b6670;
  background: #fffef9;
  border: 1px solid #afc9c0;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 750;
}

.school-toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 11px 14px;
  color: #fff;
  background: #285a62;
  border-radius: 11px;
  box-shadow: 0 8px 24px #18394035;
  font-size: 12px;
}

.school-directory-page .diary-footer { margin-top: 0; }

@media (max-width: 900px) {
  .school-hero-inner { grid-template-columns: minmax(0, 1fr) 230px; gap: 22px; }
  .school-guide { grid-template-columns: 1fr; }
  .school-guide article:nth-child(n) { transform: none; }
  .school-browser { grid-template-columns: 1fr 1fr; }
  .school-search { grid-column: 1 / -1; }
  .school-next { grid-template-columns: 1fr; }
  .school-next-links { justify-content: flex-start; }
}

@media (max-width: 680px) {
  .school-directory-page .diary-language { display: none; }
  .school-hero-inner {
    grid-template-columns: minmax(0, 1fr) 104px;
    width: calc(100% - 32px);
    min-height: 0;
    gap: 10px;
    padding: 30px 0 34px;
  }
  .school-back { margin-bottom: 17px; font-size: 11px; }
  .school-hero h1 { margin-top: 7px; font-size: 34px; }
  .school-hero-lead { font-size: 13px; }
  .school-hero-art { align-self: start; margin-top: 66px; }
  .school-hero-stats { gap: 7px; margin-top: 18px; }
  .school-hero-stats span { min-height: 31px; padding: 6px 8px; font-size: 9px; }
  .school-directory { width: calc(100% - 32px); padding-top: 27px; }
  .school-source-note { grid-template-columns: 1fr; gap: 7px; padding: 14px; font-size: 11px; }
  .school-guide article { padding: 18px; }
  .school-browser { position: static; grid-template-columns: 1fr; padding: 13px; }
  .school-search { grid-column: auto; }
  .school-lesson-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .school-results-head { display: grid; gap: 10px; margin-top: 28px; }
  .school-results-head h2 { font-size: 25px; }
  .school-result-status { justify-self: start; }
  .school-grid { grid-template-columns: 1fr; gap: 22px; }
  .school-card { min-height: 0; padding: 21px 18px; }
  .school-card h3 { font-size: 21px; }
  .school-facts > div { grid-template-columns: 62px minmax(0, 1fr); gap: 10px; }
  .school-actions { align-items: stretch; }
  .school-actions :is(.school-official, .school-save) { justify-content: center; width: 100%; }
  .school-next { padding: 22px 18px; }
  .school-next h2 { font-size: 21px; }
  .school-next-links { display: grid; grid-template-columns: 1fr; }
  .school-next-links a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .school-card,
  .school-official { transition: none; }
  .school-card:hover,
  .school-official:hover { transform: none; }
}
