/* 新見市高校史  スタイル
   すべての文字は濃い黒(#000)。色は背景・枠・イラストで表現し、系統ごとに色分けする。 */

:root {
  --ink: #000;
  --paper: #F6FAFF;
  --rose: #F0608F;   --rose-m: #FFB8CF;   --rose-l: #FFE8F0;   --rose-d: #C7255F;
  --blue: #3D8BE8;   --blue-m: #A9CFFA;   --blue-l: #E3F0FF;   --blue-d: #1B5FB8;
  --green: #45B36B;  --green-m: #A8E2B7;  --green-l: #E1F6E6;  --green-d: #1F8244;
  --orange: #F5A31A; --orange-m: #FFD68A; --orange-l: #FFF0D2; --orange-d: #C46F00;
  --purple: #8A63D2; --purple-m: #CDB9F5; --purple-l: #EFE7FF; --purple-d: #5C36A8;
  --h: 'Zen Maru Gothic', 'Noto Sans JP', 'Hiragino Maru Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  --b: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
}

.t-rose   { --main: var(--rose);   --mid: var(--rose-m);   --light: var(--rose-l);   --dark: var(--rose-d); }
.t-blue   { --main: var(--blue);   --mid: var(--blue-m);   --light: var(--blue-l);   --dark: var(--blue-d); }
.t-green  { --main: var(--green);  --mid: var(--green-m);  --light: var(--green-l);  --dark: var(--green-d); }
.t-orange { --main: var(--orange); --mid: var(--orange-m); --light: var(--orange-l); --dark: var(--orange-d); }
.t-purple { --main: var(--purple); --mid: var(--purple-m); --light: var(--purple-l); --dark: var(--purple-d); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: var(--b); font-weight: 500; font-size: 1rem; line-height: 1.95;
  letter-spacing: .02em; overflow-wrap: anywhere;
}
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
p + p { margin-top: 1em; }
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--dark, #000); }
a:hover { text-decoration-color: #000; }
:focus-visible { outline: 3px solid #000; outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; border: 2px solid #000; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- ヘッダー ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 3px solid #000; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--h); font-weight: 900; font-size: 1.35rem; letter-spacing: .04em; }
.brand img { border: 2.5px solid #000; border-radius: 10px; }
.stripe { height: 8px; background: linear-gradient(90deg, var(--rose) 0 20%, var(--blue) 20% 40%, var(--green) 40% 60%, var(--orange) 60% 80%, var(--purple) 80% 100%); }
.site-header > .stripe { border-top: 3px solid #000; }
.gnav { display: flex; align-items: center; gap: 4px; font-family: var(--h); font-weight: 700; }
.gnav > a, .dd-btn { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 2.5px solid transparent; text-decoration: none; background: none; color: #000; font: inherit; cursor: pointer; line-height: 1.4; }
.gnav > a:hover, .dd-btn:hover, .dd-btn[aria-expanded="true"] { border-color: #000; background: var(--blue-l); }
.dd { position: relative; }
.dd-panel {
  position: absolute; right: 0; top: calc(100% + 12px); width: min(820px, 92vw);
  background: #fff; border: 3px solid #000; border-radius: 20px; padding: 16px;
  box-shadow: 6px 6px 0 #000; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  max-height: 78vh; overflow: auto; align-items: start;
}
.dd-panel[hidden] { display: none; }
.dd-group { background: var(--light); border: 2.5px solid #000; border-radius: 14px; padding: 10px 12px; }
.dd-title { font-family: var(--h); font-weight: 900; font-size: .95rem; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 3px solid var(--main); line-height: 1.5; }
.dd-group ul { list-style: none; padding: 0; }
.dd-group a { display: block; padding: 6px 4px; text-decoration: none; font-weight: 700; font-size: .92rem; line-height: 1.5; border-radius: 8px; }
.dd-group a:hover { background: var(--mid); }
.dd-group small { display: block; font-weight: 500; font-size: .78rem; }

/* ---------- ヒーロー ---------- */
.hero { background: var(--light); border-bottom: 3px solid #000; padding: 34px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.hero-text { padding-bottom: 34px; align-self: center; }
.crumb { font-size: .85rem; line-height: 1.7; margin-bottom: 14px; }
.badge { display: inline-block; background: var(--mid); border: 2.5px solid #000; border-radius: 999px; padding: 2px 16px; font-family: var(--h); font-weight: 700; font-size: .9rem; margin-bottom: 12px; }
.hero h1 { font-family: var(--h); font-weight: 900; font-size: clamp(1.9rem, 5.2vw, 3rem); line-height: 1.3; letter-spacing: .03em; }
.hero .lead { margin-top: 14px; font-size: 1.08rem; font-weight: 700; line-height: 1.85; }
.hero-art { margin-bottom: -3px; }
.hero-art .ill { display: block; width: 100%; height: auto; border: 3px solid #000; border-bottom: 0; border-radius: 22px 22px 0 0; background: #fff; }
.home-hero h1 { font-size: clamp(2.3rem, 7vw, 3.8rem); }
.legend { list-style: none; padding: 0; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.lg { display: inline-flex; align-items: center; gap: 8px; padding: 3px 14px 3px 10px; background: #fff; border: 2.5px solid #000; border-radius: 999px; font-size: .85rem; font-weight: 700; line-height: 1.6; }
.lg .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--main); border: 2.5px solid #000; }

/* ---------- セクション ---------- */
.sec { padding: 52px 0; }
.sec.alt { background: var(--light); border-block: 3px solid #000; }
.sec.band { background: var(--light); border-block: 3px solid #000; }
.sec.band + .sec.band { border-top: 0; }
.sec.now { background: var(--mid); border-block: 3px solid #000; }
.h2 { display: flex; align-items: center; gap: 12px; font-family: var(--h); font-weight: 900; font-size: clamp(1.35rem, 3.6vw, 1.85rem); line-height: 1.5; margin-bottom: 20px; }
.h2-ico { flex: none; width: 46px; height: 46px; }
.h2-ico svg { width: 100%; height: 100%; display: block; }
.h3 { font-family: var(--h); font-weight: 900; font-size: 1.15rem; margin: 22px 0 10px; padding-left: 12px; border-left: 8px solid var(--main); line-height: 1.5; }
.small-h { font-size: 1.3rem; margin-bottom: 8px; }
.intro, .lede { font-size: 1.05rem; margin-bottom: 18px; font-weight: 700; }
.small { font-size: .88rem; margin-top: 8px; }
.ext { margin-top: 14px; }
.none { font-weight: 700; padding: 12px 16px; background: #fff; border: 2.5px dashed #000; border-radius: 14px; }

/* ---------- カード類 ---------- */
.card { background: #fff; border: 3px solid #000; border-radius: 20px; padding: 22px 24px; box-shadow: 6px 6px 0 var(--main); }
.info { display: grid; gap: 0; }
.info .row { display: grid; grid-template-columns: 9.5em 1fr; gap: 6px 18px; padding: 12px 0; border-bottom: 2px dotted #000; }
.info .row:first-child { padding-top: 0; }
.info .row:last-child { border-bottom: 0; padding-bottom: 0; }
.info dt { font-family: var(--h); font-weight: 900; }
.callout { margin-top: 18px; background: #fff; border: 2.5px solid #000; border-left: 12px solid var(--main); border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 2.5px solid #000; border-radius: 14px; padding: 8px 14px; box-shadow: 3px 3px 0 var(--main); line-height: 1.6; max-width: 100%; }
.chip b { font-family: var(--h); font-weight: 900; }
.chip small { font-size: .82rem; font-weight: 500; max-width: 26em; }
.chip.s { padding: 2px 12px; box-shadow: 2px 2px 0 var(--main); }
.chip.q { min-width: 8em; align-items: flex-start; }
.chip .big { font-family: var(--h); font-weight: 900; font-size: 1.6rem; line-height: 1.3; }

/* 校名リンク */
a.sl { text-decoration: none; font-weight: 700; background: linear-gradient(transparent 58%, var(--mid) 58%); border-bottom: 2px solid var(--main); padding: 0 2px; }
a.sl:hover { background: var(--mid); }

/* ---------- 年表 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters button { font: inherit; font-family: var(--h); font-weight: 700; color: #000; background: #fff; border: 2.5px solid #000; border-radius: 999px; padding: 4px 16px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--mid); box-shadow: 3px 3px 0 #000; }
.tl { list-style: none; padding: 0; position: relative; }
.tl::before { content: ""; position: absolute; left: 24px; top: 8px; bottom: 8px; width: 10px; background: var(--mid); border-inline: 2.5px solid #000; border-radius: 6px; }
.ev { display: grid; grid-template-columns: 58px 1fr; gap: 14px; margin-bottom: 20px; position: relative; }
.ev[hidden] { display: none; }
.ev-ico svg { width: 58px; height: 58px; display: block; position: relative; }
.ico-bg { fill: var(--light); }
.ev-body { background: #fff; border: 3px solid #000; border-radius: 16px; padding: 12px 18px 14px; box-shadow: 5px 5px 0 var(--mid); }
.ev-year { display: inline-block; font-family: var(--h); font-weight: 900; font-size: 1.05rem; background: var(--mid); border: 2.5px solid #000; border-radius: 999px; padding: 0 14px; margin-bottom: 6px; line-height: 1.7; }
.ev-text { line-height: 1.9; }
.tag { display: inline-block; font-family: var(--h); font-weight: 700; font-size: .74rem; border: 2px solid #000; border-radius: 6px; padding: 0 8px; margin-right: 8px; vertical-align: 2px; line-height: 1.6; }
.tag-name .tag { background: #FFF1A8; }
.tag-dept .tag { background: #C6ECFF; }
.tag-fac .tag { background: #FFD3B8; }
.tag-event .tag { background: #E6D6FF; }

.now-box { background: #fff; border: 3px solid #000; border-radius: 22px; padding: 26px 28px; box-shadow: 7px 7px 0 #000; font-size: 1.04rem; }
.now-box p { font-weight: 500; }

/* ---------- つながり ---------- */
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.flows { display: grid; gap: 14px; }
.flow { display: grid; gap: 2px; text-decoration: none; background: #fff; border: 3px solid #000; border-left: 14px solid var(--main); border-radius: 16px; padding: 12px 18px; box-shadow: 5px 5px 0 var(--mid); transition: transform .12s, box-shadow .12s; }
.flow:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--main); }
.flow strong { font-family: var(--h); font-weight: 900; font-size: 1.15rem; line-height: 1.5; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--main); text-underline-offset: 4px; }
.flow-period { font-family: var(--h); font-weight: 700; font-size: .85rem; }
.flow-one { font-size: .92rem; font-weight: 500; line-height: 1.7; }
.flows.v { max-width: 640px; }
.arrow { text-align: center; font-family: var(--h); font-weight: 700; line-height: 1.5; }
.arrow span { display: block; font-size: 1.4rem; line-height: 1; }
.arrow em { font-style: normal; display: inline-block; background: #fff; border: 2.5px solid #000; border-radius: 999px; padding: 0 14px; font-size: .88rem; margin-top: 2px; }
.merge-row { position: relative; margin-left: 28px; }
.merge-row::before { content: "1977年 県へ移管 ▶ 北高校の商業科に"; display: block; font-family: var(--h); font-weight: 700; font-size: .85rem; margin-bottom: 4px; }
.back { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; font-family: var(--h); font-weight: 900; text-decoration: none; background: var(--mid); border: 3px solid #000; border-radius: 999px; padding: 6px 24px; box-shadow: 4px 4px 0 #000; }
.btn:hover { background: var(--main); }

/* ---------- ホーム ---------- */
.stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--light); border: 3px solid #000; border-radius: 20px; padding: 14px 16px; box-shadow: 5px 5px 0 var(--main); display: grid; gap: 0; line-height: 1.6; font-weight: 700; }
.stat .num { font-family: var(--h); font-weight: 900; font-size: 2.8rem; line-height: 1.25; }
.jump { margin-top: 26px; display: grid; gap: 8px; box-shadow: 6px 6px 0 var(--blue); }
.jump label { font-family: var(--h); font-weight: 900; }
.jump select { font: inherit; font-weight: 700; color: #000; background: var(--blue-l); border: 3px solid #000; border-radius: 12px; padding: 10px 12px; width: 100%; }
.chart-wrap { overflow-x: auto; background: #fff; border: 3px solid #000; border-radius: 18px; padding: 10px; box-shadow: 6px 6px 0 var(--blue); }
.chart { display: block; min-width: 830px; height: auto; }
.chart-a { cursor: pointer; }
.chart-a:hover text { text-decoration: underline; }
.dept-list { display: grid; gap: 14px; margin-top: 18px; }
.dept-row { display: grid; grid-template-columns: 17em 1fr; gap: 10px 18px; align-items: center; background: #fff; border: 3px solid #000; border-left: 14px solid var(--main); border-radius: 16px; padding: 10px 16px; }
.dept-name { font-family: var(--h); font-weight: 900; text-decoration: none; line-height: 1.5; }
.dept-name small { display: block; font-weight: 700; font-size: .8rem; }
.dept-name:hover { text-decoration: underline; }
.teaser { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center; margin-bottom: 44px; }
.teaser-art svg { width: 96px; height: 96px; }
.src { margin-top: 16px; background: #fff; border: 2.5px solid #000; border-radius: 12px; padding: 10px 16px; }
.src summary { cursor: pointer; font-family: var(--h); font-weight: 700; }
.src ul { margin: 10px 0 4px; padding-left: 1.3em; }
.src li { margin: 4px 0; font-size: .92rem; line-height: 1.7; }

/* ---------- 同窓会・運営者 ---------- */
.table-wrap { overflow-x: auto; }
.amap { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 3px solid #000; border-radius: 16px; overflow: hidden; }
.amap th, .amap td { padding: 12px 16px; text-align: left; border-bottom: 2px solid #000; vertical-align: top; line-height: 1.8; }
.amap thead th { background: var(--blue-m); font-family: var(--h); }
.amap tbody tr:last-child th, .amap tbody tr:last-child td { border-bottom: 0; }
.amap tbody th { background: var(--light); font-weight: 700; }
.fill { display: inline-block; background: #FFF59D; border: 2px dashed #000; border-radius: 8px; padding: 0 10px; font-weight: 700; }
.contact { margin-top: 18px; padding: 14px 18px; background: var(--blue-l); border: 2.5px solid #000; border-radius: 14px; }
.contact-title { font-family: var(--h); font-weight: 900; margin-bottom: 4px; }

/* ---------- フッター ---------- */
.site-footer { background: #fff; border-top: 3px solid #000; }
.site-footer .wrap { padding: 28px 0 34px; }
.foot-title { font-family: var(--h); font-weight: 900; font-size: 1.3rem; margin-bottom: 12px; }
.foot-chips, .foot-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-block; text-decoration: none; background: var(--mid); border: 2.5px solid #000; border-radius: 999px; padding: 0 14px; font-size: .84rem; font-weight: 700; line-height: 1.8; }
.fchip:hover { background: var(--main); }
.foot-links { margin-top: 18px; gap: 20px; font-weight: 700; }
.copy { margin-top: 14px; font-size: .85rem; }

/* ---------- スマホ ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 6px; }
  .hero-text { padding-bottom: 8px; }
  .dd { position: static; }
  .dd-panel { position: absolute; left: 8px; right: 8px; width: auto; top: 100%; margin-top: 8px; grid-template-columns: 1fr; max-height: 70vh; }
  .cols2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .dept-row { grid-template-columns: 1fr; }
  .info .row { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 560px) {
  body { font-size: .98rem; line-height: 1.9; }
  .bar { min-height: 56px; }
  .brand { font-size: 1.05rem; }
  .brand img { width: 30px; height: 30px; }
  .gnav > a, .dd-btn { padding: 6px 8px; font-size: .84rem; }
  .sec { padding: 38px 0; }
  .card { padding: 16px 16px; }
  .now-box { padding: 18px 16px; }
  .ev { grid-template-columns: 44px 1fr; gap: 10px; }
  .ev-ico svg { width: 44px; height: 44px; }
  .tl::before { left: 17px; width: 8px; }
  .ev-body { padding: 10px 12px 12px; }
  .teaser { grid-template-columns: 1fr; }
  .h2-ico { width: 38px; height: 38px; }
  .stat .num { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow { transition: none; }
}

/* ---------- ホーム：系統ブロックの2カラム ---------- */
.band-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px; align-items: start; }
.band-grid .flows.v { max-width: none; }
.band-art { position: sticky; top: 96px; }
.band-art .ill { display: block; width: 100%; height: auto; background: #fff; border: 3px solid #000; border-radius: 20px; box-shadow: 7px 7px 0 var(--main); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-m { display: none; }

@media (max-width: 820px) {
  .band-grid { grid-template-columns: 1fr; gap: 20px; }
  .band-art { position: static; order: -1; }
  .pair { grid-template-columns: 1fr; }
  .chart-d { display: none; }
  .chart-m { display: block; width: 100%; min-width: 0; }
  .chart-wrap { overflow-x: visible; padding: 6px; }
}
@media (max-width: 560px) {
  .site-header { position: relative; }
  .bar { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0 6px; }
  .brand { white-space: nowrap; }
  .gnav { width: 100%; justify-content: flex-start; gap: 10px; }
  .gnav > a, .dd-btn { white-space: nowrap; font-size: .88rem; padding: 6px 10px; }
  .dd-panel { top: calc(100% - 6px); }
}

.prose p { font-size: 1.04rem; }
.prose .wish { font-family: var(--h); font-weight: 700; background: #fff; border: 3px solid #000; border-left: 12px solid var(--main); border-radius: 14px; padding: 12px 16px; margin-top: 1.2em; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.fact { background: #fff; border: 3px solid #000; border-radius: 16px; padding: 14px 18px 16px; box-shadow: 5px 5px 0 var(--main); }
.fact h3 { font-family: var(--h); font-weight: 900; font-size: 1.08rem; line-height: 1.5; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 3px solid var(--mid); }
.fact p { font-size: .98rem; }
@media (max-width: 820px) { .facts { grid-template-columns: 1fr; } }

/* ---------- フォーム・ポリシー ---------- */
.cform { display: grid; gap: 14px; margin-top: 12px; }
.field { display: grid; gap: 4px; }
.field label { font-family: var(--h); font-weight: 900; }
.cform input[type="text"], .cform input[type="email"], .cform textarea {
  font: inherit; color: #000; background: #fff; width: 100%;
  border: 3px solid #000; border-radius: 12px; padding: 10px 12px; line-height: 1.7;
}
.cform textarea { resize: vertical; min-height: 9em; }
.cform input:focus-visible, .cform textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.agree input { width: 22px; height: 22px; margin-top: 6px; accent-color: var(--blue); flex: none; }
.cform .btn { font: inherit; font-family: var(--h); font-weight: 900; color: #000; cursor: pointer; }
.cform .btn:disabled { opacity: .6; cursor: wait; }
.form-msg { font-weight: 700; min-height: 1.6em; }
.policy .h3 { margin-top: 30px; }
.policy ul { padding-left: 1.4em; margin: 8px 0; }
.policy li { margin: 4px 0; }

.notice { margin-top: 22px; background: #fff; border: 2.5px dashed #000; border-radius: 12px; padding: 10px 16px; font-weight: 700; font-size: .95rem; line-height: 1.8; }

/* ---------- 人口のグラフ ---------- */
.pop-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; margin-top: 20px; }
.pop-fig { background: #fff; border: 3px solid #000; border-radius: 18px; padding: 10px; box-shadow: 6px 6px 0 var(--blue); }
.popchart { display: block; width: 100%; height: auto; }
.pop-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.pop-list li { background: #fff; border: 3px solid #000; border-radius: 14px; padding: 10px 14px; line-height: 1.8; }
.poptable th, .poptable td { text-align: right; white-space: nowrap; padding: 8px 12px; }
.poptable thead th { text-align: right; }
.poptable thead th:first-child, .poptable tbody th { text-align: left; }
.poptable tr.proj td, .poptable tr.proj th { background: #EDEDED; }
.small-notes { margin-top: 18px; }
@media (max-width: 820px) { .pop-grid { grid-template-columns: 1fr; } }

.poptable thead th:first-child, .poptable tbody th { width: 8.5em; }
@media (max-width: 560px) { .poptable th, .poptable td { padding: 6px 7px; font-size: .88rem; } .poptable thead th:first-child, .poptable tbody th { width: auto; } }
