/* INPASS 院試データベース プロトタイプ
   ・部品と色は参考書DB（assets/books.css をそのまま読み込み）と共通にする
   ・このファイルは (1) 既存サイトのヘッダー等の仮置き と (2) 院試DBだけの部品（idb-）
   ・本番では (1) は既存テーマ（Cocoon）が出すので不要 */

/* ===== (1) 既存サイトの外枠（仮置き。本番はCocoonのヘッダー・パンくず・フッター） ===== */
body { margin: 0; background: #fff; color: #333; font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif; }
.mock-header { border-bottom: 1px solid #eee; background: #fff; }
.mock-header .in { max-width: 1240px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 24px; }
.mock-logo { font-size: 22px; letter-spacing: .12em; color: #333; font-weight: 500; white-space: nowrap; }
.mock-nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; font-size: 13.5px; }
.mock-nav a { color: #333; text-decoration: none; }
.mock-nav a.on { color: #123a66; font-weight: 700; border-bottom: 2px solid #2b8fd9; }
.mock-note { background: #fffbe0; color: #7a6400; font-size: 12px; text-align: center; padding: 3px; }
.mock-crumb { text-align: center; font-size: 12px; color: #666; margin: 22px 0 18px; }
.mock-crumb a { color: #666; text-decoration: none; }
.mock-footer { background: #f3f3f3; color: #777; font-size: 12px; text-align: center; padding: 28px; }

/* Cocoon のページ見出し（h1）を、参考書DBと同じ帯にする（books.css の body.ib-page … .entry-title が効く） */
.entry-title { margin: 0; }

/* ===== (2) 院試DBの部品 ===== */
.idb { --up: #d63a2c; --down: #17a08a; }
/* 日付などの差し色は、その分野のテーマ色（差し色と主色の中間＝濃い同系色）にそろえる */
.idb, .idb [class*="ib-g-"], .idb[class*="ib-g-"] { --time: color-mix(in srgb, var(--a) 60%, var(--m)); }

/* 左の検索欄：参考書DBの .ib-side に、院試DB用の絞り込みを足す */
.idb-side-sec { padding: 0 .8em .6em; }
.idb-side-sec .ib-side-label { padding: 0; }
.idb-check { display: flex; align-items: center; gap: .45em; font-size: .82em; padding: .18em 0; cursor: pointer; color: #22272e; }
.idb-check input { accent-color: #123a66; margin: 0; }
.idb-check.is-off { color: #a3abb4; cursor: default; }
.idb-check em { font-style: normal; font-size: .82em; color: #a3abb4; margin-left: auto; }
.idb-side-sec select, .idb-side-sec input[type=range] { width: 100%; box-sizing: border-box; font: inherit; font-size: .82em; border: 2px solid #dfe5ea; border-radius: 6px; padding: .3em .4em; background: #fff; }
.idb-side-sec input[type=range] { border: 0; padding: 0; accent-color: #123a66; }
.idb-range-v { font-size: .74em; color: #6a7480; }
.idb-own { font-size: .66em; font-weight: 700; color: #fff; background: #17a08a; border-radius: 999px; padding: .05em .6em; margin-left: .4em; vertical-align: 1px; }
.ib-side-groups a.ib-g-math { background: #2b8fd9; } .ib-side-groups a.ib-g-physics { background: #17a08a; }
.ib-side-groups a.ib-g-informatics { background: #4a78f0; } .ib-side-groups a.ib-g-engineering { background: #e07b00; }
.ib-side-groups a.ib-g-chemistry { background: #2fa56b; } .ib-side-groups a.ib-g-biology { background: #6fa82e; }
.ib-side-groups a.ib-g-agriculture-environment { background: #8a9a1a; } .ib-side-groups a.ib-g-medical-health { background: #d6457a; }
.ib-side-groups a.ib-g-economics-business { background: #c8811a; } .ib-side-groups a.ib-g-law-society { background: #8e6bd1; }
.ib-side-groups a.ib-g-humanities-psychology { background: #c0569b; } .ib-side-groups a.ib-g-english { background: #f06292; }
.ib-side-groups a.is-on { outline: 3px solid #ffe94d; outline-offset: -3px; }

/* 冒頭の入口札（社会人入試あり・冬入試あり など） */
.idb-entry { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 1.1em 0 0 !important; padding: 0; list-style: none; }
.idb-entry a { display: inline-block; color: #fff !important; font-size: .82em; font-weight: 700; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: .3em 1em; background: rgba(255,255,255,.08); transition: background .15s; }
.idb-entry a:hover { background: rgba(255,255,255,.2); }

/* 検索結果の1行（参考書DBの .ib-row と同じ考え方。系統の色を左の帯とアイコンに使う） */
.idb-table { border: 1px solid var(--l); border-radius: 10px; overflow: hidden; background: #fff; }
.idb-row { display: grid; grid-template-columns: 46px minmax(0,1fr) 190px 150px; gap: 16px; align-items: center; padding: .9em 1em; border-bottom: 1px solid var(--l);
  border-left: 5px solid var(--a); color: var(--t) !important; transition: background .15s; }
.idb-row:last-child { border-bottom: 0; }
.idb-row:hover { background: var(--bg); }
.idb-row .ib-icon { width: 46px; height: 46px; }
.idb-row .ib-icon img { width: 26px; height: 26px; }
.idb-row-main small { display: block; font-size: .78em; color: var(--s); line-height: 1.4; }
.idb-row-main b { display: block; font-size: 1.08em; font-weight: 900; color: var(--m); line-height: 1.45; margin: .1em 0 .35em; }
.idb-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.idb-tag { font-size: .7em; font-weight: 700; border-radius: 999px; padding: .1em .75em; background: color-mix(in srgb, var(--a) 14%, #fff); color: var(--m); white-space: nowrap; }
.idb-tag.is-pend { background: #fff; border: 1px dashed #c3cbd3; color: var(--s); font-weight: 500; }
.idb-ratio small { display: block; font-size: .7em; color: var(--s); }
.idb-ratio b { font-size: 1.55em; font-weight: 900; color: var(--m); font-variant-numeric: tabular-nums; line-height: 1.2; }
.idb-ratio b span { font-size: .5em; margin-left: .1em; }
.idb-ratio .idb-ref { font-size: .62em; font-weight: 700; color: #fff; background: #a3abb4; border-radius: 4px; padding: 0 .4em; margin-left: .4em; vertical-align: 3px; }
.idb-ratio svg { display: block; margin: 2px 0; }
.idb-ratio em { font-style: normal; font-size: .72em; font-weight: 700; display: block; }
.idb-ratio em.dn { color: var(--down); } .idb-ratio em.up { color: var(--up); }
.idb-ratio i { font-style: normal; font-size: .7em; color: var(--s); display: block; }
.idb-next { font-size: .76em; border-left: 3px solid var(--time); padding: .1em 0 .1em .7em; line-height: 1.5; }
.idb-next b { display: block; color: var(--time); font-size: 1.15em; font-weight: 900; }
.idb-next.is-pend { border-left-color: #c3cbd3; color: var(--s); }
.idb-next.is-pend b { color: var(--s); font-size: 1em; }
.idb-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 .8em; }
.idb-bar .ib-results-head { margin: 0 !important; border: 0; padding: 0; flex: 1 1 auto; }
.idb-bar select { font: inherit; font-size: .85em; padding: .35em .6em; border: 2px solid var(--l); border-radius: 6px; background: #fff; }
.idb-note { font-size: .76em; color: var(--s); margin: .8em 0 0 !important; }
@media (max-width: 760px) {
  .idb-row { grid-template-columns: 40px minmax(0,1fr); }
  .idb-ratio, .idb-next { grid-column: 2; }
}

/* 専攻ページ：冒頭カードの右に「倍率カード」を置く（参考書DBの書影の位置） */
.idb-hero-visual { display: flex; justify-content: center; }
.idb-ratio-card { width: 230px; background: #fff; color: var(--t); border-radius: 12px; padding: 16px 16px 12px; box-shadow: 0 16px 32px rgba(0,0,0,.35); text-align: left; animation: ib-pop .7s cubic-bezier(.2,.8,.2,1) both; }
.idb-ratio-card small { display: block; font-size: .72em; font-weight: 700; color: var(--a); letter-spacing: .06em; }
.idb-ratio-card b { display: block; font-size: 2.6em; font-weight: 900; color: var(--m); line-height: 1.15; font-variant-numeric: tabular-nums; }
.idb-ratio-card b span { font-size: .42em; margin-left: .1em; }
.idb-ratio-card p { margin: .2em 0 0 !important; font-size: .74em; color: var(--s); line-height: 1.5; }
.idb-hero-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.idb-hero-btns a { display: inline-block; font-size: .85em; font-weight: 900; padding: .6em 1.3em; border-radius: 999px; background: #fff; color: var(--m) !important; transition: transform .15s; }
.idb-hero-btns a.is-sub { background: transparent; color: #fff !important; border: 1px solid rgba(255,255,255,.6); }
.idb-hero-btns a:hover { transform: translateY(-1px); }

/* 課程の切り替え（修士／博士後期） */
.idb-course { display: flex; gap: 6px; margin: 0 0 1em; }
.idb-course .ib-chip { font-weight: 700; padding: .35em 1.3em; }

/* 選考の流れ：参考書DBの .ib-steps を5段にする */
.idb-flow.ib-steps { grid-template-columns: repeat(5, 1fr); gap: 8px; }
.idb-flow.ib-steps li::before { content: "STEP " counter(ibstep); }
.idb-flow b { font-size: .95em; }
@media (max-width: 760px) { .idb-flow.ib-steps { grid-template-columns: 1fr 1fr; } }

/* 日程：時間の帯（締切は琥珀色、試験日は塗りつぶし） */
.idb-tl { list-style: none; margin: 0 0 .6em !important; padding: 0; border: 1px solid var(--l); border-radius: 10px; overflow: hidden; }
.idb-tl li { display: grid; grid-template-columns: 7.5em 1.4em minmax(0,1fr); align-items: center; gap: 0 .6em; padding: .6em 1em; border-bottom: 1px solid var(--l); position: relative; }
.idb-tl li:nth-child(odd) { background: var(--bg); }
.idb-tl li:last-child { border-bottom: 0; }
.idb-tl .d { font-weight: 900; color: var(--time); text-align: right; font-variant-numeric: tabular-nums; }
.idb-tl .p { width: .85em; height: .85em; border-radius: 50%; border: 3px solid var(--time); background: #fff; justify-self: center; }
.idb-tl li.is-exam .p { background: var(--time); }
.idb-tl li.is-pend .d { color: var(--s); }
.idb-tl li.is-pend .p { border-color: #c3cbd3; border-style: dashed; }
.idb-tl b { display: block; font-weight: 700; line-height: 1.5; }
.idb-tl span { display: block; font-size: .82em; color: var(--s); line-height: 1.55; }
.idb-src { font-size: .76em; color: var(--s); margin: .2em 0 1em !important; }
.idb-src a { color: var(--s) !important; text-decoration: underline !important; }

/* 試験科目→参考書 */
.idb-subj { border: 1px solid var(--l); border-radius: 10px; overflow: hidden; margin: 0 0 1.2em; background: #fff; }
.idb-subj-head { display: flex; align-items: center; gap: .8em; background: var(--m); color: #fff; padding: .75em 1em; flex-wrap: wrap; }
.idb-subj-head b { font-size: 1.08em; font-weight: 900; }
.idb-subj-head span { font-size: .74em; font-weight: 700; background: var(--a); border-radius: 999px; padding: .15em .9em; }
.idb-subj-head small { flex: 1 1 100%; font-size: .8em; opacity: .88; line-height: 1.55; }
.idb-subj .ib-filter { border: 0; border-bottom: 1px solid var(--l); border-radius: 0; margin: 0; }
.idb-subj-body { padding: .2em 1em 1em; }
.idb-subj-body .ib-h3 { margin: 1em 0 .4em; }
.idb-subj-body .ib-table { margin: 0 0 .4em; }
.idb-subj-body .ib-more { margin: .4em 0 0 !important; }

/* 入試実績 */
.idb-stat .ib-facts { grid-template-columns: repeat(3, 1fr); margin: 0 0 1em; }
.idb-stat .ib-fact { background: color-mix(in srgb, var(--a) 10%, #fff); color: var(--m); }
.idb-stat .ib-fact small { color: var(--s); opacity: 1; }
.idb-stat .ib-fact b { font-size: 1.4em; font-weight: 900; }
.idb-chart-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78em; color: var(--s); margin: .2em 0; }
.idb-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.idb-tbl { width: 100%; border-collapse: collapse; font-size: .82em; }
.idb-tbl th, .idb-tbl td { border: 1px solid var(--l); padding: .35em .5em; text-align: right; font-variant-numeric: tabular-nums; }
.idb-tbl th:first-child, .idb-tbl td:first-child { text-align: center; }
.idb-tbl thead th { background: color-mix(in srgb, var(--a) 12%, #fff); color: var(--m); font-weight: 700; }
.idb-tblwrap { overflow-x: auto; }
.idb details summary { cursor: pointer; font-weight: 700; color: var(--m); font-size: .9em; margin: .6em 0; }
.ib-check li.is-q::before { border-color: #c3cbd3; border-style: dashed; }
.ib-check li.is-ok::before { background: var(--a); box-shadow: inset 0 0 0 2px #fff; }
.ib-subject.is-on { outline: 4px solid #ffe94d; outline-offset: -4px; }

/* ===== 冒頭の詳細検索（左の検索欄と同じ条件。どちらで操作しても両方に反映） ===== */
.idb-adv-toggle { display: inline-flex; align-items: center; gap: .5em; margin: 1em 0 0; font: inherit; font-size: .88em; font-weight: 700; color: #fff; cursor: pointer;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.55); border-radius: 999px; padding: .45em 1.4em; transition: background .15s; }
.idb-adv-toggle:hover { background: rgba(255,255,255,.22); }
.idb-adv-toggle::after { content: "▾"; transition: transform .2s; }
.idb-adv-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
.idb-adv-toggle .n { background: #ffe94d; color: #123a66; border-radius: 999px; font-size: .8em; padding: 0 .6em; }
.idb-adv { display: none; text-align: left; color: #22272e; background: #fff; border-radius: 14px; margin: 1em auto 0; max-width: 820px; padding: 1.1em 1.3em 1.2em; box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.idb-adv.is-open { display: block; animation: ib-rise .25s ease-out both; }
.idb-adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9em 1.4em; }
.idb-adv-item > b { display: flex; align-items: center; font-size: .8em; font-weight: 700; color: #123a66; margin-bottom: .3em; }
.idb-adv-item select { width: 100%; font: inherit; font-size: .88em; border: 2px solid #dfe5ea; border-radius: 6px; padding: .35em .5em; background: #fff; }
.idb-adv-item .idb-checks { display: flex; flex-wrap: wrap; gap: .1em 1em; }
.idb-adv-item .idb-check { font-size: .86em; }
.idb-adv-foot { display: flex; flex-wrap: wrap; gap: .6em; align-items: center; justify-content: flex-end; margin-top: 1em; padding-top: .9em; border-top: 1px solid #dfe5ea; }
.idb-adv-foot button { font: inherit; font-weight: 900; font-size: .9em; border-radius: 999px; padding: .6em 1.6em; cursor: pointer; border: 0; }
.idb-adv-go { color: #fff; background: linear-gradient(90deg, #2b8fd9, #17a08a); box-shadow: 0 4px 12px rgba(23,120,160,.3); }
.idb-adv-clear { background: #f3f6f8; color: #6a7480; }
.idb-entry a.is-soon { opacity: .6; }
.idb-entry a.is-soon::after { content: "準備中"; font-size: .7em; margin-left: .4em; opacity: .9; }

/* ===== 幅に合わせた組み替え（ページ幅ではなく本文の幅で判定する） ===== */
.content-in > main { container-type: inline-size; }
.ib-side .ib-search input { text-overflow: ellipsis; }
@container (max-width: 760px) {
  .idb-row { grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; }
  .idb-row .ib-icon { width: 40px; height: 40px; }
  .idb-ratio, .idb-next { grid-column: 2; }
  .idb-ratio { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0 .6em; }
  .idb-ratio small, .idb-ratio em, .idb-ratio i { grid-column: 1 / -1; }
  .idb-flow.ib-steps { grid-template-columns: repeat(2, 1fr); }
  .ib-hero-card { grid-template-columns: 1fr; }
  .idb-hero-visual { justify-content: flex-start; }
  .idb-ratio-card { width: 100%; max-width: 320px; }
  .idb-stat .ib-facts { grid-template-columns: 1fr 1fr; }
  .ib-row { grid-template-columns: 54px 1fr; }
  .ib-row-level, .ib-row-type { display: none; }
  .ib-menu-hero { padding-left: 16px; padding-right: 16px; }
  .ib-menu-stats li { padding: 0 .8em; }
  .ib-menu-stats b { font-size: 1.5em; }
}
@container (max-width: 480px) {
  .ib-menu-title { font-size: 1.6em; }
  .ib-menu-badge { top: 30px; right: -100px; width: 300px; }
  .ib-menu-badge span { font-size: .7em; }
  .idb-adv { padding: .9em; }
  .idb-tl li { grid-template-columns: 5.5em 1.2em minmax(0,1fr); padding: .5em .6em; }
}

/* 専攻ページの冒頭カード：狭い幅では縦に積む（参考書DBのスマホ用の書影レイアウトを打ち消す） */
@container (max-width: 760px) {
  .idb .ib-hero-card { display: block; padding: 18px 16px; }
  .idb .ib-hero-card .ib-hero-body { display: block; }
  .idb .ib-hero-card .ib-hero-label { font-size: .72em; margin-bottom: 8px !important; }
  .idb .ib-hero-card .ib-hero-title { font-size: 1.4em; margin: 0 0 10px !important; }
  .idb .ib-hero-desc { display: block; -webkit-line-clamp: unset; font-size: .85em; margin: 0 0 12px !important; }
  .idb .ib-hero-card .ib-facts { grid-template-columns: repeat(3, 1fr); }
  .idb .idb-hero-visual { margin-top: 14px; }
  .idb .idb-ratio-card { max-width: none; }
}

/* アイコン：丸の中に収める（参考書DBのSVGと同じ比率） */
.ib-icon img { display: block; width: 53%; height: 53%; flex: none; object-fit: contain; }
.idb-row .ib-icon img { width: 56%; height: 56%; }

/* 専攻ページ冒頭のリンクボタン */
.idb-hero-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.idb-hero-links a { display: flex; align-items: center; justify-content: center; gap: .5em; min-height: 2.9em; padding: .5em .9em; border-radius: 999px; font-size: .86em; font-weight: 900; line-height: 1.35; text-align: center;
  color: #fff !important; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.55); transition: background .15s, transform .15s; }
.idb-hero-links a:hover { background: rgba(255,255,255,.22); transform: translateY(-1px); }
.idb-hero-links a.is-main { background: #fff; color: var(--m) !important; border-color: #fff; }
.idb-hero-links a.is-cta { background: #ffe94d; color: #123a66 !important; border-color: #ffe94d; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.idb-hero-links svg { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.idb-hero-add { margin: 0 !important; font-size: .82em; }
.idb-hero-add a { color: #fff !important; text-decoration: underline !important; opacity: .9; }
@container (max-width: 480px) { .idb-hero-links { grid-template-columns: 1fr; } }

/* 冒頭の「条件で探す」：白い箱にまとめ、主な条件は最初から見せる */
.idb-cond { text-align: left; color: #22272e; background: #fff; border-radius: 14px; max-width: 760px; margin: 1.2em auto 0; padding: 1em 1.2em 1.1em; box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.idb-cond-title { display: flex; align-items: center; gap: .5em; font-size: 1em; font-weight: 900; color: #123a66; margin: 0 0 .7em !important; }
.idb-cond-title svg { width: 1.3em; height: 1.3em; fill: none; stroke: #17a08a; stroke-width: 2.2; stroke-linejoin: round; }
.idb-cond-title .n { font-size: .72em; background: #17a08a; color: #fff; border-radius: 999px; padding: .05em .7em; }
.idb-cond-main { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7em; }
@container (max-width: 980px) { .idb-cond-main { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.idb-cond-item b { display: block; font-size: .74em; font-weight: 700; color: #6a7480; margin-bottom: .2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idb-cond-item select { width: 100%; font: inherit; font-size: .88em; font-weight: 700; color: #123a66; border: 2px solid #dfe5ea; border-radius: 8px; padding: .45em .5em; background: #f7f9fb; cursor: pointer; }
.idb-cond-item select:focus { outline: 0; border-color: #2b8fd9; background: #fff; }
.idb-cond-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: .9em 0 0; }
.idb-cond-quick > span { font-size: .74em; font-weight: 700; color: #6a7480; margin-right: .3em; }
.idb-qchip { font: inherit; font-size: .8em; font-weight: 700; color: #123a66; background: #fff; border: 2px solid #dfe5ea; border-radius: 999px; padding: .25em .9em; cursor: pointer; transition: all .15s; }
.idb-qchip::before { content: "＋"; margin-right: .3em; color: #17a08a; }
.idb-qchip:hover { border-color: #17a08a; }
.idb-qchip.is-on { background: #123a66; border-color: #123a66; color: #fff; }
.idb-qchip.is-on::before { content: "✓"; color: #ffe94d; }
.idb-more { display: block; width: 100%; margin: .9em 0 0; font: inherit; font-size: .8em; font-weight: 700; color: #2b8fd9; background: none; border: 0; border-top: 1px dashed #dfe5ea; padding: .7em 0 0; cursor: pointer; text-align: left; }
.idb-more::after { content: " ▾"; }
.idb-more[aria-expanded="true"]::after { content: " ▴"; }
.idb-cond .idb-adv { box-shadow: none; padding: .8em 0 0; margin: 0; max-width: none; border-radius: 0; }
.idb-cond .idb-adv-foot { margin-top: .9em; }
@container (max-width: 760px) { .idb-cond-main { grid-template-columns: 1fr 1fr; } .idb-cond { padding: .9em; } }

/* 一覧の上：選択中の条件（×で外せる） */
.idb-active { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 .8em; font-size: .82em; }
.idb-active:empty { display: none; }
.idb-active > span { color: var(--s); font-weight: 700; }
.idb-active button { font: inherit; font-weight: 700; color: #123a66; background: color-mix(in srgb, #2b8fd9 12%, #fff); border: 0; border-radius: 999px; padding: .2em .5em .2em .9em; cursor: pointer; }
.idb-active button::after { content: "×"; margin-left: .5em; color: #6a7480; }
.idb-active button.is-clear { background: none; color: #2b8fd9; text-decoration: underline; }
.idb-active button.is-clear::after { content: none; }

/* 関連記事（INPASSブログ） */
.idb-articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 0 0 1em; }
.idb-art { display: flex; flex-direction: column; border: 1px solid var(--l); border-radius: 10px; overflow: hidden; background: #fff; color: var(--t) !important; transition: transform .15s, box-shadow .15s; }
.idb-art:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(0,0,0,.1); }
.idb-art-img { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--m), var(--a)); overflow: hidden; }
.idb-art-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idb-art-body { padding: .7em .9em .9em; }
.idb-art-body small { display: inline-block; font-size: .7em; font-weight: 700; color: #fff; background: var(--a); border-radius: 999px; padding: .05em .8em; margin-bottom: .4em; }
.idb-art-body b { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .9em; font-weight: 700; line-height: 1.55; }

/* ===== 専攻ページ 追加分（2026/11/17） ===== */
.idb [id^="sec-"] { scroll-margin-top: 20px; }
html { scroll-behavior: smooth; }

/* 冒頭の情報＝章へ飛ぶボタン */
.idb-jumps.ib-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.idb-jumps a.ib-fact { position: relative; display: block; color: #fff !important; border: 1px solid rgba(255,255,255,.18); transition: background .15s, transform .15s, border-color .15s; }
.idb-jumps a.ib-fact:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.5); transform: translateY(-2px); }

/* 選考の流れ：矢印でつないだフロー図 */
.idb-flowchart { list-style: none; margin: 0 0 1em !important; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr) 46px) minmax(0, 1fr); align-items: stretch; }
.idb-flowchart > li:not(.gap) { position: relative; background: #fff; border: 2px solid var(--l); border-radius: 12px; padding: 1.4em .8em .9em; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .25em; }
.idb-flowchart .no { position: absolute; top: -.95em; left: 50%; transform: translateX(-50%); width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--m); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.idb-flowchart b { font-size: .98em; font-weight: 900; color: var(--m); line-height: 1.4; }
.idb-flowchart em { font-style: normal; font-weight: 900; font-size: .9em; color: #fff; background: var(--time); border-radius: 999px; padding: .1em .9em; white-space: nowrap; }
.idb-flowchart .sub { font-size: .74em; color: var(--s); line-height: 1.5; }
.idb-flowchart > li.is-exam { border-color: var(--a); background: color-mix(in srgb, var(--a) 7%, #fff); }
.idb-flowchart > li.is-exam .no { background: var(--a); }
.idb-flowchart > li.is-pend { border-style: dashed; }
.idb-flowchart > li.is-pend em { background: #a3abb4; }
.idb-flowchart > li.is-pend .no { background: #a3abb4; }
.idb-flowchart .gap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--a); }
.idb-flowchart .gap::before { content: ""; width: 100%; height: 0; border-top: 3px solid var(--a); }
.idb-flowchart .gap::after { content: ""; width: 0; height: 0; border-left: 9px solid var(--a); border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-top: -10px; align-self: flex-end; }
.idb-flowchart .gap span { order: -1; font-size: .66em; font-weight: 700; white-space: nowrap; color: var(--s); }
@container (max-width: 760px) {
  .idb-flowchart { grid-template-columns: 1fr; }
  .idb-flowchart > li:not(.gap) { flex-direction: row; flex-wrap: wrap; text-align: left; padding: .8em .9em .8em 3em; gap: .2em .6em; }
  .idb-flowchart .no { top: 50%; left: .7em; transform: translateY(-50%); }
  .idb-flowchart .sub { flex: 1 1 100%; }
  .idb-flowchart .gap { flex-direction: row; height: 34px; gap: .6em; justify-content: flex-start; padding-left: 1.45em; }
  .idb-flowchart .gap::before { width: 0; height: 100%; border-top: 0; border-left: 3px solid var(--a); }
  .idb-flowchart .gap::after { display: none; }
  .idb-flowchart .gap span { order: 0; }
}

/* 入試実績：区分ごとの倍率 */
.idb-stat .idb-kpis.ib-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.idb-stat .idb-kpis .ib-fact { background: #fff; border: 1px solid var(--l); border-top: 4px solid var(--k, var(--a)); }
.idb-stat .idb-kpis .ib-fact small { white-space: normal; line-height: 1.4; }
.idb-stat .idb-kpis .ib-fact b { color: var(--k, var(--m)); }
.idb-stat .idb-kpis .ib-fact span { display: block; font-size: .72em; color: var(--s); line-height: 1.5; }
@container (max-width: 760px) { .idb-stat .idb-kpis.ib-facts { grid-template-columns: 1fr 1fr; } }

/* データから読み取れること */
.idb-insights { list-style: none; margin: 0 0 1em !important; padding: .4em 1em; border: 1px solid var(--l); border-left: 5px solid var(--a); border-radius: 8px; background: color-mix(in srgb, var(--a) 5%, #fff); }
.idb-insights li { position: relative; padding: .5em 0 .5em 1.4em; font-size: .9em; line-height: 1.7; border-bottom: 1px dashed var(--l); }
.idb-insights li:last-child { border-bottom: 0; }
.idb-insights li::before { content: "▶"; position: absolute; left: 0; top: .6em; font-size: .75em; color: var(--a); }
.idb-insights b { color: var(--m); }

/* 年度別データの表 */
.idb-yt { min-width: 640px; }
.idb-yt th { white-space: nowrap; font-size: .92em; line-height: 1.35; vertical-align: middle; text-align: center !important; }
.idb-yt td { vertical-align: middle; }
.idb-yt td.rt { font-weight: 900; color: var(--m); line-height: 1.25; }
.idb-yt td.rt small { display: block; font-size: .72em; font-weight: 500; color: var(--s); }
.idb-yt td.rt.is-small { color: #a3abb4; }
.idb-yt td.dn { color: #17a08a; font-weight: 700; }
.idb-yt td.up { color: #d63a2c; font-weight: 700; }
.idb-yt td.er { white-space: nowrap; font-weight: 700; }
.idb-yt td.er span { display: inline-block; width: 52px; height: 7px; border-radius: 4px; background: var(--l); margin-right: 6px; vertical-align: middle; overflow: hidden; }
.idb-yt td.er i { display: block; height: 100%; background: var(--a); }
.idb-yt tr.is-recent td:first-child { font-weight: 900; color: var(--m); box-shadow: inset 4px 0 0 var(--a); }
.idb-yt tfoot tr.is-avg td { background: var(--bg); font-weight: 900; border-top: 2px solid var(--m); }
.idb-yt tfoot tr.is-avg + tr.is-avg td { border-top: 1px solid var(--l); }
.idb-tblmode { margin: 0 0 .6em !important; }

/* この専攻を受ける前に読んでおきたい記事 */
.idb-reads { list-style: none; margin: 0 0 1em !important; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: none; }
.idb-read { display: grid; grid-template-columns: 2.2em 168px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border: 1px solid var(--l); border-radius: 10px; background: #fff; color: var(--t) !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.idb-read:hover { border-color: var(--a); box-shadow: 0 6px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.idb-read-no { width: 2.2em; height: 2.2em; border-radius: 50%; background: var(--m); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.idb-read-img { aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, var(--m), var(--a)); }
.idb-read-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idb-read-body small { display: inline-block; font-size: .7em; font-weight: 700; color: #fff; background: var(--a); border-radius: 999px; padding: .05em .8em; }
.idb-read-body b { display: block; font-size: .95em; font-weight: 700; line-height: 1.5; margin: .25em 0 .3em; }
.idb-read-body em { display: block; font-style: normal; font-size: .82em; color: #56606b; line-height: 1.6; }
.idb-read-body em i { font-style: normal; font-weight: 900; font-size: .85em; color: var(--m); background: color-mix(in srgb, #ffe94d 70%, #fff); border-radius: 4px; padding: 0 .45em; margin-right: .5em; }
@container (max-width: 560px) {
  .idb-read { grid-template-columns: 2em minmax(0, 1fr); }
  .idb-read-img { display: none; }
}

/* 左の検索欄：画面の高さに収め、はみ出す分は欄の中でスクロール（PC） */
@media (min-width: 1024px) {
  .content-in > .ib-rail { max-height: calc(100vh - 32px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .ib-rail .ib-side-groups a { padding: .3em .2em; }
  .ib-rail .ib-side-label { margin: .55em 0 .2em !important; }
}

/* 検索欄＋検索ボタン、検索結果画面 */
.idb-qwrap { display: flex; gap: 6px; }
.idb-qwrap input { flex: 1; min-width: 0; }
.idb-qgo { flex: none; font: inherit; font-weight: 800; color: #fff; background: var(--m); border: 0; border-radius: 8px; padding: 0 1.3em; cursor: pointer; }
.idb-qgo:hover { filter: brightness(1.08); }
.idb-adv-go svg { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 2.6; vertical-align: -.15em; margin-right: .35em; }
.idb-back { margin: 0 0 .4em !important; font-size: .85em; }
.idb-back a { color: var(--s, #6a7480); }
.ib-results[hidden], .ib-menu-body[hidden] { display: none !important; }
.ib-side-groups a.is-on { outline: 3px solid #123a66; outline-offset: 1px; }

/* 一覧の設置区分（国立・公立・私立） */
.idb-setup-tag { display: inline-block; font-size: .85em; font-weight: 800; color: var(--m); border: 1px solid currentColor; border-radius: 3px; padding: 0 .4em; margin-right: .5em; line-height: 1.5; vertical-align: .05em; }

/* ---- 大学から探す：大学のまとまり（旧帝大など） ---- */
.idb-ugroup { border: 1px solid var(--l); border-radius: 12px; padding: .2em 1.1em 1em; margin: 0 0 1.2em; background: #fff; }
.idb-ugroup-h { display: flex; align-items: baseline; gap: .6em; margin: .8em 0 0 !important; font-size: 1.12em; font-weight: 900; color: var(--m); letter-spacing: .04em; }
.idb-ugroup-h small { font-size: .7em; font-weight: 700; color: var(--s); }
.idb-ugroup .ib-h3 { margin-top: 1.1em; }

/* ---- 検索結果ページ：トップと同じ検索欄で、見出しだけ検索結果にする ---- */
.idb-res-hero { padding-top: 28px !important; padding-bottom: 28px !important; }
.idb-res-title { font-size: 1.7em !important; }
.idb-res-count { font-size: .62em; font-weight: 800; letter-spacing: .04em; opacity: .95; }
.idb-res-count b { font-size: 1.5em; margin-right: .1em; }
.idb-res-hero .ib-menu-eyebrow { margin-bottom: .3em !important; }

/* ---- 大学から探す：スマホは大学名だけを並べ、「続きを見る」で全研究科を開く ---- */
.idb-ugroup .ib-h3 a { color: inherit; text-decoration: none; }
.idb-ugroup .ib-h3 a:hover { text-decoration: underline; }
.idb-unames { display: none; list-style: none; margin: .6em 0 0 !important; padding: 0; gap: .5em; grid-template-columns: 1fr 1fr; }
.idb-unames a { display: flex; flex-direction: column; gap: .15em; padding: .7em .8em; border: 1px solid var(--l); border-radius: 8px; background: #fff; font-weight: 800; color: var(--m); text-decoration: none; }
.idb-unames .ib-count { font-size: .75em; font-weight: 700; color: var(--s); }
.idb-umore { display: none; width: 100%; margin: .2em 0 1em; padding: .75em; font: inherit; font-size: .9em; font-weight: 800; color: var(--m); background: #fff; border: 1.5px solid var(--m); border-radius: 999px; cursor: pointer; }
@media (max-width: 760px) {
  #univs:not(.is-open) .idb-unames { display: grid; }
  #univs:not(.is-open) .idb-ufull { display: none; }
  .idb-umore { display: block; }
}
/* ---- 検索結果の見出しの横棒：長さは --idb-res-bar で調整できる ---- */
.idb-res-title { display: block !important; }
.idb-res-title::after { width: var(--idb-res-bar, 84px) !important; flex-basis: auto !important; }
.idb-res-count { display: inline-block; margin-left: .5em; }

/* 左の箱の見出し「院試データベース」は検索トップへのリンク */
.ib-side-title a { color: inherit; text-decoration: none; }
.ib-side-title a:hover { text-decoration: underline; }

/* ===== スマホ：専攻ページの倍率カードは枠内に収め、数字と折れ線を横に並べて低くする ===== */
.idb-ratio-card { box-sizing: border-box; }
.idb-ratio-card svg path { vector-effect: non-scaling-stroke; }
@container (max-width: 760px) {
  .idb .idb-ratio-card { width: 100%; max-width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; padding: 10px 14px 10px; }
  .idb .idb-ratio-card small, .idb .idb-ratio-card p { grid-column: 1 / -1; }
  .idb .idb-ratio-card b { font-size: 2em; line-height: 1.1; }
  .idb .idb-ratio-card svg { width: 100%; height: 30px; margin: 0; }
  .idb .idb-ratio-card p { font-size: .7em; margin-top: .3em !important; }
  .idb .ib-hero-card .ib-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .idb .ib-hero-card .ib-facts > * { min-width: 0; }
}
/* ===== スマホ：検索結果の1行を詰める（倍率と出願日程を横に並べる） ===== */
.idb-row svg path { vector-effect: non-scaling-stroke; }
@container (max-width: 760px) {
  .idb-row { grid-template-columns: 32px minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: start; padding: .7em .8em; }
  .idb-row .ib-icon { width: 32px; height: 32px; grid-row: 1; }
  .idb-row-main { grid-column: 2 / -1; }
  .idb-row-main b { font-size: 1em; margin: 0 0 .25em; }
  .idb-row-main small { font-size: .72em; }
  .idb-row .idb-ratio { grid-column: 2; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 0 .4em; }
  .idb-row .idb-ratio b { font-size: 1.25em; }
  .idb-row .idb-ratio svg { width: 100%; max-width: 56px; height: 18px; }
  .idb-row .idb-ratio em, .idb-row .idb-ratio i { font-size: .66em; }
  .idb-row .idb-next { grid-column: 3; font-size: .7em; }
  .idb-row .idb-next b { font-size: 1.1em; }
}
@container (max-width: 760px) {
  .idb-row { grid-template-columns: 32px minmax(0, 1.4fr) minmax(0, 1fr); }
  .idb-row .idb-ratio small { font-size: .64em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .idb-row .idb-ratio em, .idb-row .idb-ratio i { line-height: 1.45; }
}
/* 専攻ページ末尾：検索トップへ戻るボタン（スマホでも見つけやすく） */
.idb-totop { text-align: center; margin: 1.6em 0 .4em !important; }
.idb-totop a { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-width: min(100%, 320px); box-sizing: border-box; padding: .85em 1.6em; border: 2px solid var(--m, #23324a); border-radius: 999px; background: #fff; color: var(--m, #23324a) !important; font-weight: 900; font-size: .95em; text-decoration: none !important; transition: background .15s, color .15s; }
.idb-totop a span { font-size: 1.3em; line-height: 1; }
.idb-totop a:hover { background: var(--m, #23324a); color: #fff !important; }
@media (max-width: 760px) { .idb-totop a { width: 100%; } }
/* ===== はみ出し防止（院試DBの全ページ共通）=====
   参考書DBの部品は「値は折り返さない」(.ib-fact b { white-space: nowrap }) なので、院試DBでは折り返して枠内に収める。
   グリッド・フレックスの子は中身に押されて広がらないように min-width: 0 にする */
.idb .ib-fact, .idb .ib-facts > *, .idb .ib-hero-body > *, .idb-row > *, .idb .ib-hero-card > * { min-width: 0; }
.idb .ib-fact b, .idb .ib-fact span, .idb .ib-fact small { white-space: normal; overflow-wrap: anywhere; word-break: normal; line-break: strict; }
.idb .ib-hero-card .ib-facts, .idb .idb-jumps.ib-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.idb .ib-hero-card .ib-fact b { line-height: 1.35; }
.idb .idb-hero-visual { min-width: 0; }
.idb td, .idb th, .idb li, .idb p, .idb-row-main b, .idb-next { overflow-wrap: anywhere; }
/* キャンペーン：元の入会金に右上から左下へ斜線 */
.idb-strike { position: relative; display: inline-block; text-decoration: none; padding: 0 .08em;
  background: linear-gradient(to bottom right, transparent calc(50% - 1.5px), currentColor calc(50% - 1.5px), currentColor calc(50% + 1.5px), transparent calc(50% + 1.5px)); }
/* キャンペーン：「0円」だけ大きく */
.idb-zero { font-size: 1.6em; font-weight: 900; line-height: 1; vertical-align: -.08em; margin-left: .1em; }
/* 大学から探す（スマホ）：押せるボタンだと分かるように、右に矢印・はっきりした枠・軽い影・押したときの沈み込み */
.idb-unames a { position: relative; padding: .75em 2em .75em .85em; border: 1.5px solid #c9d1da; box-shadow: 0 2px 0 #dde3ea; transition: transform .1s, box-shadow .1s, border-color .15s; }
.idb-unames a::after { content: ""; position: absolute; right: .85em; top: 50%; width: .5em; height: .5em; border-top: 2px solid var(--m); border-right: 2px solid var(--m); transform: translateY(-50%) rotate(45deg); opacity: .7; }
.idb-unames a:hover { border-color: var(--m); }
.idb-unames a:active { transform: translateY(2px); box-shadow: 0 0 0 #dde3ea; }
/* はみ出し防止（全ページ走査で見つかった箇所） */
.idb-course { display: flex; flex-wrap: wrap; gap: 6px; }
.idb-course .ib-chip { max-width: 100%; white-space: normal; }
.idb dl, .idb dl > * { min-width: 0; }
.idb dd, .idb dt, .idb em { overflow-wrap: anywhere; min-width: 0; }
.idb .ib-row { grid-template-columns: 54px minmax(0, 1fr); }
.idb .ib-row > * { min-width: 0; }
.idb .ib-row-main, .idb .ib-row-main * { overflow-wrap: anywhere; }
@container (min-width: 761px) { .idb .ib-row { grid-template-columns: 54px 92px minmax(0, 1fr) 128px; } }

/* 左の箱の「この条件で検索」ボタン（トップへのリンクの上） */
.idb-rail-go { display: flex; align-items: center; justify-content: center; gap: .45em; width: 100%; margin: 1.1em 0 .2em; padding: .75em 1em; font: inherit; font-size: .95em; font-weight: 900; color: #fff; background: var(--m, #23324a); border: 0; border-radius: 999px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.18); transition: transform .1s, box-shadow .1s, opacity .15s; }
.idb-rail-go:hover { opacity: .9; }
.idb-rail-go:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.18); }

/* 大学から探す：研究科の箱はすべて同じ大きさ（1行・高さ固定）。長い名前は文字を縮め、入りきらなければ「…」 */
.idb-ufull .ib-fields a { height: 3.1em; box-sizing: border-box; flex-wrap: nowrap; overflow: hidden; }
.idb-gs-n { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.idb-ufull .ib-fields .ib-count { flex: none; white-space: nowrap; }
/* 日程の流れ図：長いラベルは枠内で折り返す */
.idb-flowchart li { min-width: 0; }
.idb-flowchart em { white-space: normal; max-width: 100%; box-sizing: border-box; text-align: center; line-height: 1.35; }
/* ===== スマホ：検索トップ・検索結果の冒頭を詰め、「条件で探す」の検索ボタンまで1画面に収める（参考書DBのスマホ表示に合わせる） ===== */
@container (max-width: 480px) {
  .ib-menu-hero { padding: 14px 12px 14px !important; }
  .ib-menu-hero .ib-menu-eyebrow, .ib-menu-hero .ib-menu-hero-lead { display: none !important; }
  .ib-menu-hero .ib-menu-title { font-size: 1.35em !important; margin: 4px 0 8px !important; padding-bottom: 8px !important; }
  .ib-menu-hero .ib-menu-badge { top: 14px; right: -112px; transform-origin: center; transform: rotate(40deg) scale(.82); }
  .ib-menu-hero .ib-menu-stats { margin: 0 0 10px !important; font-size: .78em; }
  .ib-menu-hero .ib-menu-stats li { padding: 0 .7em !important; line-height: 1.3; }
  .ib-menu-hero .ib-menu-stats b { font-size: 1.35em !important; }
  .ib-menu-hero .ib-search { margin-bottom: 10px !important; }
  .idb-cond { padding: 10px 11px !important; }
  .idb-cond-title { margin-bottom: 6px !important; font-size: .92em; }
  .idb-cond-main { gap: 6px 8px !important; }
  .idb-cond-item b { font-size: .68em !important; margin-bottom: 1px !important; }
  .idb-cond-item select { padding-top: .38em !important; padding-bottom: .38em !important; font-size: .86em !important; min-height: 0 !important; height: auto !important; }
  .idb-cond-quick { margin-top: 8px !important; flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 6px !important; }
  .idb-cond-quick::-webkit-scrollbar { display: none; }
  .idb-cond-quick > span { display: none; }
  .idb-cond-quick .idb-qchip { flex: none; font-size: .78em !important; padding: .35em .8em !important; white-space: nowrap; }
  .idb-more { margin-top: 6px !important; padding: .35em 0 !important; font-size: .8em !important; }
  .idb-adv-foot { margin-top: 8px !important; display: flex !important; flex-direction: row !important; gap: 8px !important; padding-top: 0 !important; }
  .idb-adv-foot button { padding: .6em .9em !important; font-size: .86em !important; }
  .idb-adv-foot .idb-adv-clear { flex: none; }
  .idb-adv-foot .idb-adv-go { flex: 1 1 auto; }
}
@container (max-width: 480px) {
  html body .idb-cond .idb-cond-quick { flex-wrap: nowrap; overflow-x: auto; }
  html body .idb-cond .idb-cond-quick .idb-qchip { flex: 0 0 auto; }
  html body .idb-cond .idb-adv-foot { flex-wrap: nowrap; justify-content: stretch; border-top: 0; }
  html body .idb-cond .idb-adv-foot button { width: auto; margin: 0; }
}
/* 大学から探す：大学のボタンに色（まとまりごとに1色。旧帝大＝紺、東京一科＝青緑、その他＝茶） */
.idb-ugroup { --ug: #2f4f8f; --ug-bg: #eef3fb; }
.idb-ugroup:nth-of-type(2) { --ug: #12806f; --ug-bg: #e9f6f3; }
.idb-ugroup:nth-of-type(3) { --ug: #9a5b1e; --ug-bg: #fbf2e8; }
.idb-ugroup-h { color: var(--ug) !important; }
.idb-unames a { background: var(--ug-bg) !important; border: 1.5px solid color-mix(in srgb, var(--ug) 35%, #fff) !important; border-left: 5px solid var(--ug) !important; color: var(--ug) !important; box-shadow: 0 2px 0 color-mix(in srgb, var(--ug) 22%, #fff) !important; }
.idb-unames a .ib-count { color: color-mix(in srgb, var(--ug) 70%, #555) !important; }
.idb-unames a::after { border-color: var(--ug) !important; opacity: .9; }
.idb-unames a:hover { background: color-mix(in srgb, var(--ug) 14%, #fff) !important; }
.idb-unames a:active { box-shadow: 0 0 0 transparent !important; }
/* 大学から探す：開いた後（全研究科）も、まとまりの色で統一する */
.idb-ugroup .idb-ufull .ib-h3 { color: var(--ug) !important; }
.idb-ugroup .idb-ufull .ib-h3::before { background: var(--ug) !important; border-color: var(--ug) !important; }
.idb-ugroup .idb-ufull .ib-fields a { background: var(--ug-bg) !important; border: 1.5px solid color-mix(in srgb, var(--ug) 30%, #fff) !important; border-left: 4px solid var(--ug) !important; color: var(--ug) !important; font-weight: 700; }
.idb-ugroup .idb-ufull .ib-fields a .ib-count { color: color-mix(in srgb, var(--ug) 70%, #555) !important; }
.idb-ugroup .idb-ufull .ib-fields a:hover { background: color-mix(in srgb, var(--ug) 14%, #fff) !important; border-color: var(--ug) !important; }
/* 冒頭の数字（大学・研究科・専攻）：ラベルは途中で折り返さず、数字の横に1行で置く */
.ib-menu-stats li { white-space: nowrap; }
.ib-menu-stats li b { margin-right: .15em; }
@container (max-width: 480px) {
  .ib-menu-hero .ib-menu-stats { display: flex !important; justify-content: center; flex-wrap: nowrap; }
  .ib-menu-hero .ib-menu-stats li { padding: 0 .55em !important; font-size: .95em; }
}
