/* 入試情報（/exams/・tools/build_exams.py が書き出す）。learn.css の上に重ねる。
   色と書体は style.css の変数だけを使う。
   受験生はスマホで見る前提で、390px 幅で撮って確かめてから直す（2026-11-20）。 */

.exam-meta {
  font-size: 13px;
  color: var(--slate);
  margin: -12px 0 24px;
}

.gap {
  margin-top: 40px;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

h2 small,
h1 small {
  display: block;
  font-size: 12px;
  color: var(--slate);
  font-weight: 400;
}

/* ── 学校の一覧（楽器のページと入口で共通） ──────────── */
.sch-cap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--slate);
  margin: -8px 0 4px;
}

ol.sch {
  list-style: none;
  padding: 0;
  margin: 0;
}

ol.sch li {
  border-bottom: 1px solid var(--line);
}

ol.sch a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px;
  color: var(--ink);
  text-decoration: none;
}

ol.sch a:hover b {
  color: var(--brass);
}

.sch-name {
  min-width: 0;
}

.sch-name b {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  font-size: 16px;
}

.sch-name small {
  display: block;
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.6;
}

.sch-date {
  font-size: 14px;
  color: var(--ink);
}

/* ── 学校ごとのまとまり（楽器のページ） ─────────────── */
h2 + .school {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}

.school {
  border-top: 2px solid var(--line);
  padding-top: 24px;
  margin-top: 40px;
}

.school h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 22px;
}

.school h2 a {
  color: var(--ink);
  text-decoration: none;
}

.school .exam-meta {
  margin: 4px 0 8px;
}

.school h3 {
  font-size: 15px;
  margin: 24px 0 4px;
}

.eyebrow {
  font-size: 12px;
  color: var(--brass);
  letter-spacing: 0.08em;
  margin: 0;
}

.back {
  margin-top: 16px;
  font-size: 13px;
  text-align: right;
}

.back a::before {
  content: "↑ ";
}

/* ── 1つの課題（区分・段階・曲・条件） ─────────────── */
.exam {
  margin: 12px 0 0;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.exam-head {
  font-size: 12.5px;
  color: var(--slate);
  margin: 0 0 8px;
  line-height: 1.6;
}

.stage {
  margin-left: 8px;
  color: var(--brass);
  font-weight: 600;
}

.pieces {
  margin: 0 0 12px;
  padding-left: 1.3em;
}

.pieces li {
  line-height: 1.6;
}

.pieces li + li {
  margin-top: 8px;
}

.pieces li::marker {
  color: var(--slate);
  font-size: 13px;
}

.comp {
  display: block;
  color: var(--slate);
  font-size: 13px;
}

.work {
  font-weight: 600;
  font-size: 15.5px;
}

.part {
  display: block;
  font-size: 13px;
  color: var(--slate);
}

.group {
  display: inline-block;
  font-size: 11.5px;
  color: var(--brass);
  border: 1px solid var(--brass);
  border-radius: 4px;
  padding: 0 6px;
  margin: 0 0 2px;
  line-height: 1.6;
}

.group + .comp {
  margin-top: 2px;
}

/* 条件（選び方・暗譜・伴奏…）は、スマホでも見出しと中身を横に並べる */
.facts {
  display: grid;
  grid-template-columns: 6.6em 1fr;
  gap: 6px 10px;
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pieces:empty + .facts,
.exam-head + .facts {
  border-top: none;
  padding-top: 0;
}

.facts dt {
  color: var(--brass);
  font-size: 12.5px;
}

.facts dd {
  margin: 0;
  min-width: 0;
}

/* ── 区分と日程（学校のページ） ──────────────────── */
.sel {
  margin-top: 16px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.sel h3 {
  font-size: 16px;
  margin: 0 0 10px;
}

.type {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--ivory);
  background: var(--slate);
  border-radius: 4px;
  padding: 2px 7px;
  margin-right: 8px;
  vertical-align: 2px;
}

.dates {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 6px 12px;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.dates dt {
  color: var(--slate);
  font-size: 12.5px;
  padding-top: 1px;
}

.dates dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.dates small {
  display: block;
  font-size: 12.5px;
  color: var(--slate);
}

.subs {
  font-size: 14px;
  margin: 12px 0 0;
}

.subs b {
  color: var(--brass);
  font-weight: 600;
  margin-right: 6px;
  font-size: 12.5px;
}

.sel .muted {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
}

/* ── 専攻ごとの課題（学校のページ・開閉） ─────────────── */
.major {
  border-bottom: 1px solid var(--line);
}

.major:first-of-type {
  border-top: 1px solid var(--line);
}

.major > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 2px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.major > summary::-webkit-details-marker {
  display: none;
}

.major > summary::after {
  content: "＋";
  color: var(--brass);
  font-weight: 400;
}

.major[open] > summary::after {
  content: "－";
}

.major[open] {
  padding-bottom: 16px;
}

.to-inst {
  font-size: 13px;
}

.sources {
  font-size: 14px;
  overflow-wrap: anywhere;
}

details > summary {
  cursor: pointer;
}

.school details:not(.major):not(.more) {
  margin-top: 12px;
  font-size: 13px;
  color: var(--slate);
}

.course {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--slate);
}

/* ── 楽器のページの要約（2026-11-20 作り直し: 条件の羅列をやめ、弾く曲だけを先に） ── */
.sch-head h2 {
  margin: 0;
}

.sch-when {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 2px 0 12px;
  font-size: 13px;
  color: var(--slate);
}

.sch-when b {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

.digest {
  padding: 12px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.digest h4 {
  margin: 10px 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--brass);
}

.digest h4:first-child,
.dg-major + h4 {
  margin-top: 0;
}

.digest ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.digest li {
  font-size: 15px;
  line-height: 1.55;
  padding: 3px 0;
}

.digest .sur {
  font-weight: 600;
  margin-right: 0.45em;
}

.dg-major {
  margin: 12px 0 4px;
  font-size: 12.5px;
  color: var(--slate);
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.dg-major:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.dg-note {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--slate);
}

details.more {
  margin-top: 10px;
}

details.more > summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--brass);
  padding: 8px 2px;
}

details.more > summary::-webkit-details-marker {
  display: none;
}

details.more > summary::after {
  content: "＋";
}

details.more[open] > summary::after {
  content: "－";
}

details.more h3:first-of-type {
  margin-top: 8px;
}

.src-h {
  margin: 20px 0 4px;
  font-size: 12.5px;
  color: var(--slate);
}

.dg-how {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--slate);
}

/* ── 試験日のカレンダー（名前と日付を文字で・その下に帯） ───── */
.tl {
  margin: 8px 0 0;
}

.tl-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 6px;
  padding: 10px 0 12px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.tl-name {
  font-size: 15px;
  font-weight: 600;
}

a.tl-row:hover .tl-name {
  color: var(--brass);
}

.tl-dates {
  font-size: 14px;
  white-space: normal;
  text-align: right;
}

.tl-track {
  grid-column: 1 / -1;
  position: relative;
  height: 8px;
  background: color-mix(in srgb, var(--line) 45%, transparent);
  border-radius: 4px;
}

.tl-track i {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--brass);
  border-radius: 4px;
  min-width: 5px;
}

.tl-track b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  border-left: 1px solid var(--line);
}

.tl-axis .tl-track {
  display: block;
  height: 16px;
  background: none;
  border-radius: 0;
}

.tl-tick {
  position: absolute;
  top: 0;
  font-size: 11px;
  color: var(--slate);
  border-left: 1px solid var(--slate);
  padding-left: 3px;
  line-height: 16px;
  white-space: nowrap;
}

.tl-cap {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--slate);
}

/* ── 手稿譜の五線（学校の区切り・アプリと同じ薄い罫） ───── */
.school {
  border-top: none;
  position: relative;
  padding-top: 40px;
}

.school::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 17px;
  background: repeating-linear-gradient(180deg, var(--line) 0, var(--line) 1px, transparent 1px, transparent 4px);
  opacity: 0.9;
}

h2 + .school::before {
  display: none;
}

h2 + .school {
  padding-top: 4px;
}

/* ── 見出しの写真（紙の色になじませる。写真の彩度を落として温かく） ── */
.ex-hero {
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.ex-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 630;
  object-fit: cover;
  filter: saturate(0.72) sepia(0.18) contrast(1.02);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ex-hero img {
    filter: saturate(0.7) sepia(0.15) brightness(0.82);
  }
}

:root[data-theme="dark"] .ex-hero img {
  filter: saturate(0.7) sepia(0.15) brightness(0.82);
}

/* ── 学校のページの日程（区分ごとに1行・試験の早い順） ───── */
ol.sched {
  list-style: none;
  padding: 0;
  margin: 0;
}

ol.sched li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.sc-label {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
}

.sc-dates {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.sc-dates dd small {
  display: block;
  font-size: 11.5px;
  color: var(--slate);
}

.sc-proc {
  margin: 4px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--slate);
}

.sc-dates dt {
  font-size: 11.5px;
  color: var(--slate);
}

.sc-dates dd {
  margin: 0;
  font-size: 14px;
}

h3.fam {
  margin: 28px 0 6px;
  font-size: 13px;
  color: var(--brass);
  letter-spacing: 0.08em;
}

.major .digest {
  margin-top: 2px;
}

.major .to-inst {
  margin: 10px 0 0;
}

.major[open] > summary {
  color: var(--brass);
}

.scope {
  margin-top: 24px;
  font-size: 12.5px;
}

/* ── 入口の楽器のグループ（開閉） ─────────────────── */
.inst-group {
  border-bottom: 1px solid var(--line);
}

.inst-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 2px;
}

.inst-group > summary::-webkit-details-marker {
  display: none;
}

.inst-group > summary b {
  display: block;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 17px;
  font-weight: 600;
}

.inst-group > summary small {
  display: block;
  font-size: 12.5px;
  color: var(--slate);
  line-height: 1.6;
}

.inst-group > summary::after {
  content: "＋";
  color: var(--brass);
}

.inst-group[open] > summary::after {
  content: "－";
}

.inst-group[open] > summary b {
  color: var(--brass);
}

.inst-group .toc {
  margin: 0 0 14px;
}

/* ── 注意書き（全ページの冒頭・小さく一段で） ─────────── */
.ex-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--slate);
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 2px solid var(--brass);
}

.ex-note b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

/* ── ほかの楽器（楽器のページの下） ─────────────────── */
ul.chips {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

ul.chips a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

ul.chips a.near {
  border-color: var(--brass);
}

ul.chips a:hover {
  color: var(--brass);
}

.toc.schools small {
  display: block;
  font-size: 11.5px;
  color: var(--slate);
}

.toc.schools a {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.dg-rest > summary {
  list-style: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--brass);
  padding: 4px 0;
}

.dg-rest > summary::-webkit-details-marker {
  display: none;
}

.dg-rest > summary::after {
  content: " ＋";
}

.dg-rest[open] > summary::after {
  content: " －";
}

/* ── 比べる（/exams/compare/<楽器>）──────────────── */
.cmp-link a {
  display: inline-block;
  margin: 4px 0 0;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ivory);
  background: var(--ink);
  border-radius: 999px;
  text-decoration: none;
}

.cmp-pick {
  margin: 20px 0 12px;
}

.cmp-pick-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
}

.cmp-tools button {
  padding: 0;
  font: inherit;
  font-weight: 400;
  color: var(--brass);
  background: none;
  border: 0;
  cursor: pointer;
}

.cmp-regions {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.cmp-regions li {
  flex: 1 1 auto;
}

.cmp-regions li + li button {
  border-left: 1px solid var(--line);
}

.cmp-regions button {
  width: 100%;
  padding: 9px 4px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.cmp-regions button[aria-pressed="true"] {
  color: var(--ivory);
  background: var(--ink);
}

.cmp-grp {
  display: grid;
  grid-template-columns: 3.5em 1fr;
  align-items: start;
  gap: 8px;
  margin: 0 0 8px;
}

.cmp-sels {
  margin: 0 0 4px;
}

.cmp-selrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
}

.cmp-selrow span {
  width: 5.5em;
  font-size: 13px;
  color: var(--ink);
}

.cmp-selrow button {
  padding: 4px 10px;
  font: inherit;
  font-size: 12.5px;
  color: var(--slate);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.cmp-selrow button[aria-pressed="true"] {
  color: var(--ivory);
  background: var(--slate);
  border-color: var(--slate);
}

.cmp-selrow[hidden], .cmp-selb[hidden],
.cmp-grp[hidden], .cmp-more[hidden], .tl-row[hidden], .school[hidden], .reg-grp[hidden], .schools li[hidden] {
  display: none;
}

.cmp-more {
  padding: 2px 0;
  font: inherit;
  font-size: 13px;
  color: var(--brass);
  background: none;
  border: 0;
  cursor: pointer;
}

.cmp-reg {
  padding-top: 7px;
  font-size: 12px;
  color: var(--slate);
}

.cmp-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cmp-chips button {
  padding: 6px 11px;
  font: inherit;
  font-size: 13px;
  color: var(--slate);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.cmp-chips button[aria-pressed="true"] {
  color: var(--ivory);
  background: var(--ink);
  border-color: var(--ink);
}

.cmp-clash {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  border-left: 3px solid var(--brass);
}

.cmp-clash b {
  display: block;
  font-size: 12px;
  color: var(--brass);
}

.cmp-clash .proc-warn {
  margin-top: 8px;
}

.cmp-clash small {
  display: block;
  font-size: 11.5px;
  color: var(--slate);
}

.cmp-float {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 5;
  transform: translateX(-50%);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ivory);
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  text-decoration: none;
}

.cmp-float[hidden] {
  display: none;
}

.cmp-clash .proc-tl {
  list-style: none;
  margin: 2px 0 4px;
  padding: 0;
}

.cmp-clash .proc-tl li {
  color: var(--slate);
}

.cmp-clash .proc-tl li span {
  display: inline-block;
  min-width: 3.2em;
  font-variant-numeric: tabular-nums;
}

.cmp-clash .proc-tl li.warn {
  color: var(--ink);
  font-weight: 600;
}

.cmp-clash .proc-tl em {
  margin-left: 6px;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  color: var(--brass);
}

.cmp-empty {
  margin: 16px 0 0;
  padding: 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--slate);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.cmp-empty a {
  display: block;
  margin-top: 6px;
  font-weight: 600;
  color: var(--brass);
}

.cmp-empty[hidden] {
  display: none;
}

.cmp-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 16px -16px 0;
  padding: 8px 16px;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.cmp-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

.cmp-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
}

.cmp-item {
  scroll-margin-top: 48px;
}

.cmp-item h2 {
  margin: 28px 0 4px;
  font-size: 18px;
}

.cmp-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.6;
}

.cmp-name {
  margin: 0;
  font-weight: 700;
}

.cmp-name a {
  color: var(--ink);
  text-decoration: none;
}

.cmp-body p {
  margin: 0 0 4px;
}

.cmp-body .sc-dates {
  margin: 0 0 6px;
}

.cmp-sel {
  font-size: 11.5px;
  color: var(--slate);
}

.cmp .digest {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.cmp .digest ul {
  margin: 0;
  padding-left: 0;
}

.cmp .digest h4,
.cmp .dg-major {
  margin: 6px 0 2px;
  font-size: 11.5px;
}

.cmp .dg-how,
.cmp .dg-note {
  font-size: 11.5px;
}

.cmp[hidden], .cmp-nav[hidden], .cmp-clear[hidden], .cmp-selwrap[hidden], .cmp-cap[hidden] {
  display: none;
}

.cmp-row[hidden] {
  display: none;
}

/* 出願・試験 ／ 発表・手続 の2段（スマホで4つ横に並べると日付が折れる） */
.cmp-body .sc-dates {
  grid-auto-flow: row;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 6px;
}

.cmp-body .sc-dates dd {
  white-space: normal;
}

.to-inst a + a {
  margin-left: 14px;
}

/* ほかの科目の格子（○ 必須・選 選択・－ なし） */
.sj {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  margin: 0 0 4px;
  text-align: center;
}

.sj dt {
  font-size: 10px;
  line-height: 1.3;
  color: var(--slate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.sj dd {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.sj-need dd {
  color: var(--ink);
}

.sj-pick dd {
  color: var(--brass);
}

.sj-none dd,
.sj-unk dd {
  color: var(--slate);
  font-weight: 400;
}

.sj-note {
  font-size: 11.5px;
  color: var(--slate);
}

.sj-legend {
  margin: 0 0 4px;
  font-size: 11.5px;
  color: var(--slate);
}

.sj-more {
  margin: 0 0 4px;
  font-size: 11.5px;
  color: var(--slate);
}

.sj-more summary {
  cursor: pointer;
  color: var(--brass);
}

.sj-more p {
  margin: 2px 0 0;
}

.subs-grid {
  margin: 12px 0 0;
}

/* 学校のページの「専攻から探す」 */
.maj-jump {
  margin: 16px 0 20px;
}

.maj-jump ul.chips {
  margin: 0;
}

details.major {
  scroll-margin-top: 16px;
}
