/* ===========================================================
   京大M予備本部 トップ — メイン・ホスピタル × エリア・クリニック
   navy blueprint / clinical design
   =========================================================== */
.kmy-hq, .kmy-hq-site {
  --navy: #0d447d;
  --navy-2: #1257a0;
  --navy-3: #0a3766;
  --ink: #10233d;
  --text: #3c4c60;
  --muted: #6a7a8d;
  --line: #dfe6ee;
  --teal: #1f9e9e;
  --teal-bright: #34c6bf;
  --teal-deep: #0f6f72;
  --gold: #ddae2f;
  --gold-bright: #f0c250;
  --gold-deep: #7a5c12;
  --crit: #e0533d;
  --warn: #e7973a;
  --paper: #f8f9fb;
  --mint: #f8f7f3;
  --mint-2: #f2efe3;
  --grid: rgba(120, 170, 200, 0.10);
  color: var(--text);
  background: #fff;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}
.kmy-hq { overflow: hidden; }
.kmy-hq-site { overflow-x: clip; }
.kmy-hq *,
.kmy-hq-site *,
.kmy-kyoko * { box-sizing: border-box; }

.kmy-hq-wrap { width: min(1140px, calc(100% - 40px)); margin: 0 auto; }

.kmy-hq h1, .kmy-hq h2, .kmy-hq h3, .kmy-hq p { margin-top: 0; letter-spacing: 0; }
.kmy-hq h1, .kmy-hq h2, .kmy-hq h3 {
  color: var(--ink); font-weight: 900; line-height: 1.34;
  word-break: keep-all; overflow-wrap: break-word; text-wrap: pretty;
}
.kmy-hq h1 { margin-bottom: 22px; font-size: clamp(32px, 4.3vw, 54px); }
.kmy-hq h1 span { display: block; }
.kmy-hq h2 { margin-bottom: 18px; font-size: clamp(25px, 3vw, 40px); }
.kmy-hq h3 { margin-bottom: 10px; font-size: 20px; }
.kmy-hq p { line-height: 1.9; }

.kmy-hq-eyebrow {
  margin-bottom: 12px;
  color: var(--gold-deep);
  font-size: 12px; font-weight: 900; letter-spacing: .14em;
  text-transform: uppercase;
}
.kmy-hq-lead { max-width: 780px; color: #243349; font-size: 18px; font-weight: 600; }

/* ---- buttons ---- */
.kmy-hq-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 13px 24px;
  border: 1px solid var(--gold); border-radius: 6px;
  font-size: 15px; font-weight: 900; line-height: 1.2;
  text-decoration: none !important; transition: transform .15s ease, filter .15s ease;
}
.kmy-hq-button--primary { color: #04201f !important; background: var(--gold-bright); border-color: var(--gold-bright); box-shadow: 0 14px 30px rgba(221, 174, 47, .28); }
.kmy-hq-button--ghost { color: #eaf4f4 !important; background: transparent; border-color: rgba(255,255,255,.5); }
.kmy-hq-button:hover { transform: translateY(-1px); filter: brightness(1.03); }

/* ---- sections ---- */
.kmy-hq-section { padding: clamp(64px, 7.5vw, 104px) 0; }
.kmy-hq-section--white { background: #fff; }
.kmy-hq-section--paper { background: var(--paper); }

/* clean clinic sections — former dark sections are now light mint */
.kmy-hq-section--navy { background: var(--mint); }
.kmy-hq-band { position: relative; background: var(--mint-2); }
.kmy-hq-section--navy h2, .kmy-hq-section--navy h3, .kmy-hq-band h2 { color: var(--ink); }
.kmy-hq-section--navy p, .kmy-hq-band p { color: var(--text); }
.kmy-hq-section--navy .kmy-hq-eyebrow, .kmy-hq-band .kmy-hq-eyebrow { color: var(--gold-deep); }

/* hero — the single dark brand moment (over the photo) */
.kmy-hq-hero { color: #eaf3f3; }
.kmy-hq-hero > * { position: relative; }
.kmy-hq-hero h1 { color: #fff; text-shadow: 0 2px 26px rgba(0, 10, 20, .72), 0 1px 4px rgba(0, 10, 20, .55); }
.kmy-hq-hero p { color: #e6f1f1; text-shadow: 0 1px 14px rgba(0, 14, 26, .5); }
.kmy-hq-hero .kmy-hq-eyebrow { color: var(--gold-bright); }
/* ヒーローのすりガラス(ぼかし)は除去し、画像をクリアに見せる (2026-07) */

.kmy-hq-section-head { max-width: 820px; margin: 0 auto 40px; text-align: center; }
.kmy-hq-pillrow { display: inline-flex; flex-wrap: wrap; gap: 8px; vertical-align: middle; margin: 0 6px; }
.kmy-hq-pillrow span { display: inline-flex; align-items: center; padding: 3px 16px; border-radius: 999px; background: var(--mint-2); color: var(--gold-deep); font-size: .72em; font-weight: 900; }
.kmy-hq-section-head--left { margin-left: 0; text-align: left; }
/* 勇気づけの誓い見出し（大きく・ヒーローと同系の金アクセント） */
.kmy-hq-vow { font-size: clamp(28px, 3.9vw, 46px); line-height: 1.5; font-weight: 900; color: var(--ink); }
.kmy-hq-vow__hook { display: block; margin-bottom: .35em; font-size: 1.18em; }
.kmy-hq-vow .accent { color: var(--gold-deep); }

/* ============ HERO ============ */
.kmy-hq-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(580px, 84vh, 880px);
  padding: clamp(104px, 13vw, 160px) 0 clamp(56px, 7vw, 96px);
}
.kmy-hq-hero__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 42%;
}
/* thin scrim: just enough for text legibility, photo stays clearly visible (no heavy dark wash) */
.kmy-hq-hero__shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(98deg, rgba(7, 21, 35, .46) 0%, rgba(7, 21, 35, .24) 30%, rgba(7, 21, 35, .05) 58%, rgba(7, 21, 35, 0) 100%),
    linear-gradient(180deg, rgba(7, 21, 35, 0) 55%, rgba(7, 21, 35, .12) 85%, rgba(7, 21, 35, .26) 100%);
}
.kmy-hq-hero .kmy-hq-wrap { position: relative; z-index: 3; }

/* brand lockup — real logo, big, at the top of the hero */
.kmy-hq-hero__lockup { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.kmy-hq-hero__logo { width: min(300px, 62vw); height: auto; display: block; filter: drop-shadow(0 4px 18px rgba(0,0,0,.35)); }
.kmy-hq-hero__logo-caption { padding-bottom: 6px; font-size: clamp(12px, 1.6vw, 14px); font-weight: 900; letter-spacing: .04em; color: var(--gold-bright); border-left: 2px solid rgba(240, 194, 80,.5); padding-left: 12px; }

.kmy-hq-hero__brand {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 26px;
  padding: 7px 14px 7px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  background: rgba(7,21,35,.44); font-size: 12px; font-weight: 900; color: #cfe0f0; letter-spacing: .06em;
}
.kmy-hq-hero__brand b { color: var(--gold-bright); }
.kmy-hq-hero h1 { font-size: clamp(28px, 4.2vw, 52px); }
.kmy-hq-hero h1 .accent { color: var(--gold-bright); }
.kmy-hq-nowrap { white-space: nowrap; }
.kmy-hq-hero__sub { margin: 0 0 18px; font-size: clamp(16px, 2vw, 22px); font-weight: 800; color: #eaf3f3 !important; }
.kmy-hq-hero__line { width: 64px; height: 4px; margin: 0 0 22px; background: var(--gold-bright); border-radius: 2px; }
.kmy-hq-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.kmy-hq-hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin: 40px 0 0; max-width: 720px; }
.kmy-hq-hero__facts div { padding: 16px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(7,21,35,.44); }
.kmy-hq-hero__facts dt { color: var(--gold-bright); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.kmy-hq-hero__facts dd { margin: 7px 0 0; color: #fff; font-size: 15px; font-weight: 900; line-height: 1.5; }

/* ============ MISSION BAND ============ */
.kmy-hq-band { padding: clamp(64px, 8vw, 110px) 0; text-align: center; }
.kmy-hq-band .kmy-hq-band__big { margin: 0 auto; max-width: 900px; font-size: clamp(21px, 3.1vw, 37px); font-weight: 900; line-height: 1.6; color: var(--ink); word-break: keep-all; overflow-wrap: break-word; text-wrap: pretty; }
.kmy-hq-band__big u { text-decoration-color: var(--gold-bright); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.kmy-hq-band__big .accent { color: var(--gold-deep); }
.kmy-hq-band__note { margin: 26px auto 0; max-width: 720px; font-size: 16px; }

/* ============ KANKIZUKE BATON RELAY（伴走のバトン） ============ */
.kmy-hq-baton { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 6px; align-items: center; margin-top: 44px; }
.kmy-hq-baton-node {
  position: relative; padding: 30px 22px; border-radius: 18px; text-align: center;
  background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 36px rgba(20,33,61,.07);
}
.kmy-hq-baton-node--final { background: linear-gradient(165deg, rgba(240, 194, 80,.16), #fff 60%); border-color: rgba(240, 194, 80,.45); }
.kmy-hq-baton-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px; border-radius: 15px; background: var(--mint-2); color: var(--gold-deep); }
.kmy-hq-baton-icon svg { width: 27px; height: 27px; }
.kmy-hq-baton-node--final .kmy-hq-baton-icon { background: var(--gold-bright); color: #04201f; }
.kmy-hq-baton-node h3 { margin: 0 0 3px; font-size: 18px; }
.kmy-hq-baton-sub { margin: 0 0 14px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .02em; }
.kmy-hq-baton-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.kmy-hq-baton-tags span { padding: 4px 11px; border-radius: 999px; background: var(--mint-2); color: var(--gold-deep); font-size: 11.5px; font-weight: 900; }
.kmy-hq-baton-desc { margin: 0; font-size: 14.5px; font-weight: 800; color: var(--ink); line-height: 1.6; }

.kmy-hq-baton-pass { display: grid; justify-items: center; gap: 8px; padding: 0 2px; color: var(--gold-deep); }
.kmy-hq-baton-pass svg { width: 30px; height: 30px; }
.kmy-hq-baton-pass span { font-size: 11px; font-weight: 900; color: var(--gold-deep); white-space: nowrap; writing-mode: vertical-rl; text-orientation: mixed; letter-spacing: .04em; }

/* ============ COMPARISON TABLE (P3) ============ */
.kmy-hq-compare { width: 100%; border-collapse: separate; border-spacing: 0; }
.kmy-hq-compare-scroll { overflow-x: auto; }
.kmy-hq-compare th, .kmy-hq-compare td { padding: 18px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.kmy-hq-compare thead th { font-size: 14px; font-weight: 900; color: var(--muted); background: transparent; text-align: center; }
.kmy-hq-compare thead th.is-project { color: #fff; background: var(--navy); border-radius: 10px 10px 0 0; }
.kmy-hq-compare tbody th { width: 120px; font-size: 13px; font-weight: 900; color: var(--muted); white-space: nowrap; }
.kmy-hq-compare td { font-size: 14px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.7; }
.kmy-hq-compare td.is-project { color: var(--ink); font-weight: 900; background: rgba(221, 174, 47,.07); border-left: 1px solid rgba(221, 174, 47,.25); border-right: 1px solid rgba(221, 174, 47,.25); }
.kmy-hq-compare tbody tr:last-child td.is-project { border-bottom: 3px solid var(--gold); border-radius: 0 0 10px 10px; }
.kmy-hq-compare .tag-bad { color: var(--muted); }
/* Always show only the 京大M予備 column (hide the two "other" comparison columns). */
.kmy-hq-compare thead th:nth-child(2),
.kmy-hq-compare thead th:nth-child(3),
.kmy-hq-compare tbody td.tag-bad { display: none; }
.kmy-hq-compare tbody th { width: 40%; white-space: normal; }
.kmy-hq-compare td.is-project { text-align: left; }

/* ============ CONCEPT DIAGRAM (P4) ============ */
.kmy-hq-concept { display: grid; grid-template-columns: 260px 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.kmy-hq-node {
  display: grid; gap: 6px; place-items: center; text-align: center;
  padding: 26px 18px; border-radius: 14px; border: 1px solid rgba(240, 194, 80,.4);
  background: linear-gradient(160deg, rgba(240, 194, 80,.16), rgba(255,255,255,.02));
}
.kmy-hq-node .ico { font-size: 34px; line-height: 1; }
.kmy-hq-node b { color: #fff; font-size: 20px; }
.kmy-hq-node small { color: var(--gold-bright); font-weight: 800; font-size: 12px; }
.kmy-hq-node--main { box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.kmy-hq-clinics { display: grid; gap: 12px; }
.kmy-hq-clinic {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.04);
  position: relative;
}
.kmy-hq-clinic .ico { font-size: 24px; }
.kmy-hq-clinic b { color: #fff; font-size: 16px; }
.kmy-hq-clinic span { color: var(--gold-bright); font-size: 12px; font-weight: 800; margin-left: auto; }
.kmy-hq-concept__note { margin-top: 30px; display: grid; gap: 8px; }
.kmy-hq-concept__note li { list-style: none; padding-left: 22px; position: relative; font-size: 14.5px; color: #c4d3e3; line-height: 1.8; }
.kmy-hq-concept__note li::before { content: "✚"; position: absolute; left: 0; color: var(--gold-bright); font-weight: 900; }

/* ============ SPLIT (text + photo) ============ */
.kmy-hq-split { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(340px,.95fr); gap: clamp(28px,5vw,64px); align-items: center; }
.kmy-hq-split--reverse { grid-template-columns: minmax(340px,.95fr) minmax(0,1.05fr); }
.kmy-hq-photo { margin: 0; overflow: hidden; border-radius: 10px; background: #dce6f4; box-shadow: 0 24px 56px rgba(11,31,51,.18); }
.kmy-hq-photo img { display: block; width: 100%; height: 100%; min-height: 360px; object-fit: cover; }

/* ============ ROLE GRID (4 roles) ============ */
.kmy-hq-role-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.kmy-hq-role { padding: 0 0 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 14px 32px rgba(20,33,61,.06); }
.kmy-hq-role__media { position: relative; overflow: hidden; aspect-ratio: 9/5.4; margin: 0 0 16px; background: #eaf0f6; }
.kmy-hq-role__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,29,51,0) 46%, rgba(10,29,51,.34)); }
.kmy-hq-role__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kmy-hq-role__num { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; min-width: 26px; height: 26px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 999px; color: #04201f; background: var(--gold-bright); font-size: 12px; font-weight: 900; }
.kmy-hq-role__pillar { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; color: #fff; background: rgba(13,68,125,.85); backdrop-filter: blur(2px); font-size: 12px; font-weight: 900; letter-spacing: .02em; }
.kmy-hq-role h3 { margin: 0 18px 6px; }
.kmy-hq-role__label { margin: 0 18px 4px; color: var(--gold-deep); font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.kmy-hq-role__affiliation { margin: 0 18px 12px; color: var(--muted); font-size: 12px; font-weight: 800; }
.kmy-hq-role p { margin: 0 18px; font-size: 14px; line-height: 1.85; }

/* ============ MECHANISM LOOP (4 steps) ============ */
.kmy-hq-loop { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.kmy-hq-loop article { position: relative; padding: 26px 22px; border-radius: 16px; border: 1px solid var(--line); border-top: 4px solid var(--gold); background: #fff; box-shadow: 0 12px 30px rgba(20,33,61,.06); }
.kmy-hq-loop article::after { content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--gold-deep); font-weight: 900; font-size: 20px; z-index: 2; }
.kmy-hq-loop article:last-child::after { content: "↺"; }
.kmy-hq-loop-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 12px; background: var(--mint-2); color: var(--gold-deep); }
.kmy-hq-loop-icon svg { width: 24px; height: 24px; }
.kmy-hq-loop .en { color: var(--gold-deep); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.kmy-hq-loop h3 { margin: 4px 0 8px; color: var(--ink); }
.kmy-hq-loop p { color: var(--text); font-size: 13.5px; line-height: 1.8; }

/* ============ CLINICAL CASE (P7-10) ============ */
.kmy-hq-case { display: grid; gap: 22px; }
.kmy-hq-case__head {
  display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center;
  padding: 18px 22px; border-radius: 16px 16px 0 0;
  color: #eaf3f3; background: linear-gradient(135deg, var(--navy), var(--navy-2));
}
.kmy-hq-case__head .karte { font-size: 12px; font-weight: 900; letter-spacing: .1em; color: #d4f5f1; }
.kmy-hq-case__head strong { font-size: clamp(17px,2.2vw,22px); color: #fff; }
.kmy-hq-case__head .meta { margin-left: auto; font-size: 13px; font-weight: 700; color: #cfe6e4; }
.kmy-hq-case__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.kmy-hq-card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 14px 34px rgba(20,33,61,.06); }
.kmy-hq-card h4 { margin: 0 0 14px; font-size: 14px; font-weight: 900; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.kmy-hq-card h4 .en { color: var(--muted); font-size: 11px; letter-spacing: .08em; }

/* vitals bars */
.kmy-hq-vitals { display: grid; gap: 9px; }
.kmy-hq-vital { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: center; }
.kmy-hq-vital span { font-size: 12.5px; font-weight: 800; color: var(--text); }
.kmy-hq-vital .bar { position: relative; height: 22px; border-radius: 4px; background: #eef3f8; overflow: hidden; }
.kmy-hq-vital .bar i { position: absolute; inset: 0 auto 0 0; display: block; height: 100%; border-radius: 4px; }
.kmy-hq-vital .bar b { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 900; color: #143; font-style: normal; }
.bar i.lv-crit { background: var(--crit); }
.bar i.lv-warn { background: var(--warn); }
.bar i.lv-mid { background: #9fb3c6; }
.bar i.lv-stable { background: var(--teal); }
.kmy-hq-vital .flag { font-size: 10px; font-weight: 900; padding: 2px 6px; border-radius: 4px; color: #fff; }
.flag.is-crit { background: var(--crit); } .flag.is-warn { background: var(--warn); } .flag.is-stable { background: var(--teal); }
.kmy-hq-conclusion { margin-top: 14px; padding: 14px 16px; border-radius: 10px; color: var(--ink); background: var(--mint-2); border-left: 4px solid var(--gold); font-size: 13.5px; font-weight: 800; line-height: 1.75; }

/* prescription pad */
.kmy-hq-rx { display: grid; gap: 10px; }
.kmy-hq-rx li { list-style: none; display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; background: #fafcfe; }
.kmy-hq-rx li.is-stop { border-left-color: var(--crit); background: #fdf4f2; }
.kmy-hq-rx .rx-tag { font-size: 11px; font-weight: 900; color: #fff; background: var(--gold-deep); border-radius: 4px; padding: 3px 8px; height: fit-content; white-space: nowrap; }
.kmy-hq-rx li.is-stop .rx-tag { background: var(--crit); }
.kmy-hq-rx p { margin: 0; font-size: 13px; line-height: 1.7; }
.kmy-hq-rx b { color: var(--ink); }

/* pathway */
.kmy-hq-path { display: grid; gap: 0; margin-top: 4px; }
.kmy-hq-path li { list-style: none; display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.kmy-hq-path li:last-child { border-bottom: 0; }
.kmy-hq-path .when { font-size: 12px; font-weight: 900; color: var(--gold-deep); }
.kmy-hq-path .what { font-size: 13px; line-height: 1.7; }

/* ============ CORE QUESTION (P11) ============ */
.kmy-hq-core { text-align: center; }
.kmy-hq-core .label { color: var(--gold-deep); font-size: 12px; font-weight: 900; letter-spacing: .2em; }
.kmy-hq-core h2 { margin: 18px auto 22px; max-width: 900px; font-size: clamp(23px,3.3vw,40px); }
.kmy-hq-core .accent { color: var(--gold-deep); }

/* ============ SERVICE INFRA (P12) ============ */
/* infra items — 5-node infographic branches, self-contained (no ancestor-class dependency) */
.kmy-hq-infra-item {
  display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center;
  min-height: 128px; padding: 24px 14px 20px; border-radius: 14px; border: 1px solid var(--line); border-top: 4px solid var(--gold);
  color: var(--ink) !important; background: #fff; box-shadow: 0 12px 28px rgba(20,33,61,.07);
  text-decoration: none !important; font-weight: 900; font-size: 14px; line-height: 1.5;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kmy-hq-infra-item:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(221, 174, 47,.18); }
.kmy-hq-infra-item small { display: block; margin-top: 4px; color: var(--gold-deep); font-size: 11px; font-weight: 800; }
.kmy-hq-infra-item-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 10px; border-radius: 14px; background: var(--mint-2); color: var(--gold-deep); }
.kmy-hq-infra-item-icon svg { width: 26px; height: 26px; }

/* ============ MEMBER ============ */
.kmy-hq-member { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,420px); gap: clamp(28px,5vw,64px); align-items: center; }
.kmy-hq-member__card {
  position: relative; overflow: hidden; display: grid; align-content: end; gap: 10px;
  min-height: 320px; padding: 26px; border-radius: 16px;
  color: #fff !important; text-decoration: none !important; box-shadow: 0 20px 48px rgba(20,33,61,.16);
}
.kmy-hq-member__card img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.kmy-hq-member__card:hover img { transform: scale(1.04); }
.kmy-hq-member__card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(9,23,38,.88) 0%, rgba(9,23,38,.5) 46%, rgba(9,23,38,.06) 78%); }
.kmy-hq-member__card > * { position: relative; z-index: 2; }
.kmy-hq-member__card span { width: fit-content; padding: 5px 11px; border-radius: 999px; color: #04201f; background: var(--gold-bright); font-size: 13px; font-weight: 900; }
.kmy-hq-member__card strong { font-size: 21px; line-height: 1.5; text-shadow: 0 2px 10px rgba(0,0,0,.3); }
.kmy-hq-member__card em { color: var(--gold-bright); font-style: normal; font-weight: 900; }

/* ============ NETWORK ============ */
.kmy-hq-link-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.kmy-hq-link-grid a { display: grid; gap: 8px; min-height: 110px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 30px rgba(20,33,61,.07); color: var(--ink) !important; text-decoration: none !important; }
.kmy-hq-link-grid span { font-size: 18px; font-weight: 900; }
.kmy-hq-link-grid small { color: var(--muted); font-size: 13px; font-weight: 700; }

/* ============ FINAL CTA ============ */
.kmy-hq-final { padding: clamp(70px,8vw,110px) 0; text-align: center; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); }
.kmy-hq-final h2, .kmy-hq-final p { color: #fff; }
.kmy-hq-final p { color: #d6e7e6; }
.kmy-hq-final .kmy-hq-button { margin-top: 20px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .kmy-hq-split, .kmy-hq-split--reverse, .kmy-hq-member, .kmy-hq-concept { grid-template-columns: 1fr; }
  .kmy-hq-role-grid, .kmy-hq-loop, .kmy-hq-case__grid, .kmy-hq-link-grid { grid-template-columns: 1fr 1fr; }
  .kmy-hq-loop article::after { content: "↓"; right: 50%; top: auto; bottom: -16px; transform: translateX(50%); }
}
@media (max-width: 680px) {
  .kmy-hq-wrap { width: min(100% - 28px, 1140px); }
  .kmy-hq-actions, .kmy-hq-button { width: 100%; }
  .kmy-hq-hero__facts, .kmy-hq-role-grid, .kmy-hq-loop, .kmy-hq-link-grid, .kmy-hq-case__grid { grid-template-columns: 1fr; }
  .kmy-hq-photo img { min-height: 240px; }
  .kmy-hq-compare tbody th { width: 84px; }
}


/* ===== コンシェルジュ京子 ウィジェット（既存流用） ===== */
.kmy-kyoko {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 9992;
  width: min(390px, calc(100vw - 28px));
  color: #183047;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  pointer-events: none;
}

.kmy-kyoko__launcher,
.kmy-kyoko__panel {
  pointer-events: auto;
}

.kmy-kyoko__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-left: auto;
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .62) !important;
  border-radius: 999px;
  color: #14213d !important;
  background: rgba(255, 255, 255, .9) !important;
  box-shadow: 0 18px 44px rgba(8, 20, 36, .18);
  cursor: pointer;
}

.kmy-kyoko__avatar,
.kmy-kyoko__portrait {
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #06223a;
  background: linear-gradient(135deg, #dffdf6, #8ee8ff);
  font-weight: 900;
  overflow: hidden;
}

.kmy-kyoko__avatar {
  width: 42px;
  height: 42px;
}

.kmy-kyoko__avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kmy-kyoko__launcher strong,
.kmy-kyoko__launcher small {
  display: block;
  text-align: left;
  line-height: 1.2;
}

.kmy-kyoko__launcher small {
  color: #687383;
  font-size: 12px;
  font-weight: 900;
}

.kmy-kyoko__panel {
  position: absolute;
  right: 0;
  bottom: 66px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 28px 80px rgba(8, 20, 36, .22);
}

.kmy-kyoko__head {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(223, 253, 246, .82), rgba(255, 248, 218, .74));
}

.kmy-kyoko__portrait {
  width: 76px;
  height: 96px;
  font-size: 24px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ecfffa, #dff5ff);
}

.kmy-kyoko__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
}

.kmy-kyoko__head h2 {
  margin: 0 0 5px;
  color: #14213d;
  font-size: 20px;
  line-height: 1.35;
}

.kmy-kyoko__head h2 span {
  display: inline-block;
}

.kmy-kyoko__head p {
  margin: 0;
  color: #344052;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.kmy-kyoko__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(8, 20, 36, .12) !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78) !important;
  color: #14213d !important;
  cursor: pointer;
}

.kmy-kyoko__conversation {
  display: grid;
  gap: 10px;
  max-height: 230px;
  margin: 14px 16px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid rgba(8, 20, 36, .06);
  border-radius: 8px;
  background: #f8fbfe;
}

.kmy-kyoko-chat {
  width: fit-content;
  max-width: 92%;
  margin: 0;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.62;
}

.kmy-kyoko-chat--agent {
  border-top-left-radius: 2px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(8, 20, 36, .06);
}

.kmy-kyoko-chat--user {
  justify-self: end;
  border-top-right-radius: 2px;
  background: linear-gradient(135deg, #dffdf6, #dff5ff);
}

.kmy-kyoko__choices {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.kmy-kyoko__choices button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(8, 20, 36, .09) !important;
  border-radius: 8px;
  color: #183047 !important;
  background: #f8fbfe !important;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.kmy-kyoko__choices button:hover {
  background: #eefaff !important;
}

.kmy-kyoko__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 16px;
}

.kmy-kyoko__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(8, 20, 36, .14);
  border-radius: 8px;
  color: #14213d !important;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none !important;
}

.kmy-kyoko__actions a:first-child {
  border-color: #123b7a;
  color: #fff !important;
  background: #123b7a;
}

@media (max-width: 980px) {
  .kmy-hq-hero__grid,
  .kmy-hq-split,
  .kmy-hq-split--reverse,
  .kmy-hq-member {
    grid-template-columns: 1fr;
  }

  .kmy-hq-hero__grid {
    grid-template-areas:
      "copy"
      "media"
      "facts";
  }

  .kmy-hq-role-grid,
  .kmy-hq-flow,
  .kmy-hq-link-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  body .kmy-public-md-links {
    left: 10px !important;
    right: 10px !important;
    bottom: 12px !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    padding: 6px !important;
    max-width: none !important;
    overflow: hidden !important;
  }

  body .kmy-public-md-links a {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 32px !important;
    max-width: 100% !important;
    padding: 6px 8px !important;
    font-size: 12px !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  body .kmy-public-md-links .is-cta {
    flex-basis: 100% !important;
  }

  .kmy-hq-wrap {
    width: min(100% - 28px, 1120px);
  }

  .kmy-hq-hero {
    padding-top: 52px;
  }

  .kmy-hq-lead {
    font-size: 16px;
  }

  .kmy-hq-actions,
  .kmy-hq-button {
    width: 100%;
  }

  .kmy-hq-hero__facts,
  .kmy-hq-role-grid,
  .kmy-hq-flow,
  .kmy-hq-service-grid,
  .kmy-hq-link-grid {
    grid-template-columns: 1fr;
  }

  .kmy-hq-hero__media img,
  .kmy-hq-photo img {
    min-height: 260px;
  }

  .kmy-kyoko {
    right: 12px;
    bottom: 102px;
    z-index: 10020;
    width: min(320px, calc(100vw - 24px));
  }

  .kmy-kyoko__launcher {
    width: 58px;
    height: 58px;
    justify-content: center;
    gap: 0;
    padding: 8px;
  }

  .kmy-kyoko__avatar {
    flex: 0 0 38px;
    min-width: 38px;
    width: 38px;
    height: 38px;
  }

  .kmy-kyoko__launcher span:last-child {
    display: none;
  }

  .kmy-kyoko__panel {
    bottom: 70px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }

  .kmy-kyoko__head {
    grid-template-columns: 58px 1fr auto;
  }

  .kmy-kyoko__portrait {
    width: 58px;
    height: 76px;
  }

  .kmy-kyoko__actions {
    grid-template-columns: 1fr;
  }
}

/* ===========================================================
   HEADER / FOOTER（camp.jukurevo テイスト × 京大M予備 紺×ティール）
   =========================================================== */
html { scroll-behavior: smooth; }
.kmy-hq section[id] { scroll-margin-top: 86px; }
.kmy-hq-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.kmy-hq-header {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  min-height: 70px; padding: 10px max(22px, calc((100vw - 1140px) / 2));
  background: rgba(10, 24, 40, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.kmy-hq-header.is-scrolled { background: rgba(10, 24, 40, .95); border-color: rgba(255, 255, 255, .12); box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }

.kmy-hq-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none !important; }
.kmy-hq-brand__mark {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px;
  padding: 6px; border-radius: 9px; background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.kmy-hq-brand__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.kmy-hq-brand__mark svg { width: 24px; height: 24px; display: block; }
.kmy-hq-brand__copy { display: grid; line-height: 1.25; min-width: 0; }
.kmy-hq-brand__name { color: #fff; font-weight: 900; font-size: 16px; }
.kmy-hq-brand__sub { color: #9fd8d3; font-size: 11px; font-weight: 800; letter-spacing: .02em; }

.kmy-hq-nav { display: flex; align-items: center; gap: 2px; }
.kmy-hq-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px;
  border-radius: 999px; color: #dce7f2 !important; font-size: 13px; font-weight: 800;
  text-decoration: none !important; transition: background .15s ease, color .15s ease;
}
.kmy-hq-nav a:hover { background: rgba(240, 194, 80, .16); color: #fff !important; }
.kmy-hq-nav__cta { margin-left: 8px; color: #04201f !important; background: var(--gold-bright); box-shadow: 0 10px 24px rgba(221, 174, 47, .3); }
.kmy-hq-nav__cta:hover { color: #04201f !important; transform: translateY(-1px); }
/* 会員コンテンツ = 京大生の体験物語（小サブ付き・縦積み） */
.kmy-hq-nav__has-sub { flex-direction: column; align-items: center; gap: 1px; line-height: 1.15; }
.kmy-hq-nav__has-sub .kmy-hq-nav__main { white-space: nowrap; }
.kmy-hq-nav__sub { font-size: 10px; font-weight: 700; letter-spacing: 0; color: #9fd8d3 !important; white-space: nowrap; }

.kmy-hq-navtoggle { display: none; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
.kmy-hq-navtoggle span:not(.kmy-hq-sr) { display: block; width: 22px; height: 2px; margin: 5px auto; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.kmy-hq-navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.kmy-hq-navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.kmy-hq-navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.kmy-hq-footer { color: rgba(255, 255, 255, .72); background: var(--navy-3); }
.kmy-hq-footer .kmy-hq-wrap { width: min(1140px, calc(100% - 40px)); }

/* CTA strip */
.kmy-hq-footer__cta-strip { border-bottom: 1px solid rgba(255,255,255,.1); }
.kmy-hq-footer__cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; padding: 30px 0; }
.kmy-hq-footer__cta-copy strong { display: block; color: #fff; font-size: clamp(18px, 2.4vw, 24px); font-weight: 900; }
.kmy-hq-footer__cta-copy span { display: block; margin-top: 6px; font-size: 13px; color: rgba(255,255,255,.7); }
.kmy-hq-footer__cta-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 14px 26px; border-radius: 7px; color: #04201f !important; background: var(--gold-bright); font-weight: 900; font-size: 15px; text-decoration: none !important; box-shadow: 0 12px 28px rgba(221, 174, 47,.3); white-space: nowrap; }
.kmy-hq-footer__cta-btn:hover { transform: translateY(-1px); }

/* main columns */
.kmy-hq-footer__top { display: grid; grid-template-columns: minmax(250px, 1fr) 2.3fr; gap: clamp(28px, 5vw, 70px); padding: 52px 0 44px; align-items: start; }
.kmy-hq-footer__about .kmy-hq-footer__logo { display: flex; gap: 12px; align-items: center; }
.kmy-hq-footer__about .kmy-hq-footer__logo img { height: 34px; width: auto; display: block; }
.kmy-hq-footer__about strong { color: #fff; font-size: 19px; }
.kmy-hq-footer__about p { margin: 14px 0 0; font-size: 13px; line-height: 1.85; max-width: 330px; }
.kmy-hq-footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 24px; }
.kmy-hq-footer__col h3 { margin: 0 0 14px; padding-bottom: 11px; color: #fff; font-size: 13px; font-weight: 900; letter-spacing: .04em; border-bottom: 1px solid rgba(255,255,255,.14); }
.kmy-hq-footer__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.kmy-hq-footer__col a { display: inline-flex; align-items: baseline; gap: 7px; color: rgba(255,255,255,.76) !important; font-size: 13px; font-weight: 700; text-decoration: none !important; line-height: 1.5; }
.kmy-hq-footer__col a::before { content: "›"; color: var(--gold); font-weight: 900; }
.kmy-hq-footer__col a:hover { color: var(--gold-bright) !important; }
.kmy-hq-footer__col a small { color: rgba(255,255,255,.45); font-size: 11px; font-weight: 700; }

/* bottom bar */
.kmy-hq-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); }
.kmy-hq-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 18px 0 24px; }
.kmy-hq-footer__bottom small { font-size: 12px; color: rgba(255,255,255,.5); }
.kmy-hq-footer__legal { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.kmy-hq-footer__legal a { font-size: 12px; font-weight: 700; color: rgba(255,255,255,.6) !important; text-decoration: none !important; }
.kmy-hq-footer__legal a:hover { color: var(--gold-bright) !important; }

/* ============ WALL vs OLD-STYLE DIAGRAM (paradigm shift proof) ============ */
.kmy-hq-wall-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; margin: 0 0 22px; }
.kmy-hq-wall-card { padding: 22px; border-radius: 14px; border: 1px solid var(--line); background: #fff; box-shadow: 0 12px 28px rgba(20,33,61,.06); }
.kmy-hq-wall-card h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; font-weight: 900; color: var(--ink); }
.kmy-hq-wall-icon { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 9px; }
.kmy-hq-wall-icon svg { width: 19px; height: 19px; }
.kmy-hq-wall-card .kmy-hq-wall-icon { background: rgba(224,83,61,.1); color: #c14a35; }
.kmy-hq-wall-card.is-old .kmy-hq-wall-icon { background: #e8ecf1; color: var(--muted); }
.kmy-hq-wall-card.is-old { background: var(--paper); }
.kmy-hq-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.kmy-hq-chip-list li { padding: 7px 13px; border-radius: 999px; background: rgba(224,83,61,.08); border: 1px solid rgba(224,83,61,.22); color: #a83f2e; font-size: 12.5px; font-weight: 800; }
.kmy-hq-wall-old-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 8px; background: #e8ecf1; color: var(--muted); font-size: 13px; font-weight: 800; }
.kmy-hq-wall-old-label::before { content: "▸▸▸"; letter-spacing: -2px; color: #aab6c4; }
.kmy-hq-wall-arrow { display: grid; place-items: center; color: var(--gold-deep); font-size: 22px; font-weight: 900; }
.kmy-hq-wall-conclusion { margin: 0; padding: 14px 18px; border-radius: 10px; text-align: center; background: var(--mint-2); border-left: 4px solid var(--gold); color: var(--ink); font-size: 14px; font-weight: 800; line-height: 1.7; }

/* ============ INFRA FLOW DIAGRAM ============ */
/* ============ INFRA INFOGRAPHIC (メイン・ホスピタル → 5サービス → エリア・クリニック) ============ */
.kmy-hq-infra-flow { position: relative; display: grid; justify-items: center; gap: 0; margin-top: 34px; }
.kmy-hq-infra-flow::before {
  content: ""; position: absolute; top: 26px; bottom: 26px; left: 50%; width: 2px; z-index: 0;
  background: repeating-linear-gradient(180deg, var(--gold) 0 7px, transparent 7px 14px);
  opacity: .55; transform: translateX(-50%);
}
.kmy-hq-infra-node {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; font-weight: 900; font-size: 16px; text-align: center;
  color: #fff; background: linear-gradient(135deg, var(--navy), var(--navy-2));
  box-shadow: 0 14px 30px rgba(9,23,38,.28);
}
.kmy-hq-infra-node svg { width: 20px; height: 20px; flex: none; }
.kmy-hq-infra-node--top { background: linear-gradient(135deg, var(--navy-2), var(--navy)); box-shadow: 0 14px 30px rgba(13, 68, 125,.32); }
.kmy-hq-infra-connector { position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; margin: 2px 0; color: var(--gold-deep); }
.kmy-hq-infra-connector svg { width: 22px; height: 22px; }
.kmy-hq-infra-services {
  position: relative; z-index: 1; width: 100%; margin: 4px 0;
  display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px;
}

/* ============ LEADERSHIP ============ */
.kmy-hq-leaders { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.kmy-hq-leader { display: grid; grid-template-columns: 132px 1fr; gap: 20px; padding: 24px; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: 0 14px 32px rgba(20,33,61,.06); }
.kmy-hq-leader__photo { width: 132px; height: 132px; border-radius: 12px; overflow: hidden; background: var(--paper); }
.kmy-hq-leader__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kmy-hq-leader__role { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: var(--mint-2); color: var(--gold-deep); font-size: 11px; font-weight: 900; }
.kmy-hq-leader h3 { margin: 0 0 3px; font-size: 19px; }
.kmy-hq-leader__affiliation { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.kmy-hq-leader p:last-child { margin: 0; font-size: 13.5px; line-height: 1.8; }

/* ============ VIDEO ============ */
.kmy-hq-video-frame { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 16px; background: #000; box-shadow: 0 24px 56px rgba(11,31,51,.24); margin-top: 30px; }
.kmy-hq-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kmy-hq-video-caption { margin: 14px 0 0; text-align: center; font-size: 14px; font-weight: 800; color: var(--text); min-height: 22px; }

.kmy-hq-video-tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 16px; }

.kmy-hq-video-tab {
  appearance: none; -webkit-appearance: none;
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4/3; border-radius: 12px; border: 0;
  background: #0a1d33; color: #fff !important; cursor: pointer;
  padding: 0; margin: 0; font: inherit; text-decoration: none !important;
  box-shadow: 0 0 0 3px transparent, 0 10px 24px rgba(20,33,61,.14);
  transition: box-shadow .15s, transform .15s;
}
.kmy-hq-video-tab:hover { transform: translateY(-2px); box-shadow: 0 0 0 3px transparent, 0 16px 32px rgba(20,33,61,.22); }
.kmy-hq-video-tab.is-active { box-shadow: 0 0 0 3px var(--gold-bright), 0 14px 30px rgba(221,174,47,.35); }
.kmy-hq-video-tab img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.kmy-hq-video-tab::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(6,16,28,.92) 0%, rgba(6,16,28,.35) 52%, rgba(6,16,28,.04) 78%);
}
.kmy-hq-video-tab__play {
  position: absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%,-50%);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.7);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  font-size: 14px; line-height: 1; opacity: .92;
}
.kmy-hq-video-tab.is-active .kmy-hq-video-tab__play { background: var(--gold-bright); border-color: var(--gold-bright); color: #10233d; opacity: 1; }
.kmy-hq-video-tab__label {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 8px 10px 9px;
  font-size: 12px; font-weight: 900; line-height: 1.35;
}
.kmy-hq-video-tab__label b { display: block; margin-bottom: 2px; font-size: 10px; font-weight: 900; color: var(--gold-bright); letter-spacing: .04em; }
.kmy-hq-video-tab.is-active .kmy-hq-video-tab__label b { color: #fff; }

.kmy-hq-video-tab--podcast { background: var(--navy); }
.kmy-hq-video-tab--podcast::before { background: linear-gradient(0deg, rgba(10,29,51,.94) 0%, rgba(10,29,51,.4) 52%, rgba(10,29,51,.08) 78%); }
.kmy-hq-video-tab--podcast .kmy-hq-video-tab__play { font-size: 15px; }

@media (max-width: 860px) {
  .kmy-hq-navtoggle { display: block; }
  .kmy-hq-nav {
    position: fixed; left: 14px; right: 14px; top: 74px; display: grid; gap: 8px; padding: 16px;
    border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px;
    background: rgba(12, 30, 50, .98); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  }
  .kmy-hq-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .kmy-hq-nav a { min-height: 46px; justify-content: center; }
  .kmy-hq-nav__cta { margin-left: 0; }
  .kmy-hq-footer__top { grid-template-columns: 1fr; }
  .kmy-hq-footer__cols { grid-template-columns: 1fr 1fr; }
  .kmy-hq-wall-grid { grid-template-columns: 1fr; }
  .kmy-hq-wall-arrow { transform: rotate(90deg); padding: 4px 0; }
  .kmy-hq-leaders { grid-template-columns: 1fr; }
  .kmy-hq-infra-services { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .kmy-hq-baton { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .kmy-hq-baton-pass { padding: 4px 0; }
  .kmy-hq-baton-pass svg { transform: rotate(90deg); }
  .kmy-hq-baton-pass span { writing-mode: horizontal-tb; }
  .kmy-hq-video-tabs { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .kmy-hq-video-tabs { grid-template-columns: 1fr; }
  .kmy-hq-footer__cols { grid-template-columns: 1fr; gap: 26px; }
  .kmy-hq-footer__cta-btn { width: 100%; justify-content: center; }
  .kmy-hq-footer__bottom-inner { flex-direction: column; align-items: flex-start; }
  .kmy-hq-leader { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .kmy-hq-leader__photo { width: 108px; height: 108px; }
  .kmy-hq-infra-node { font-size: 14px; padding: 12px 18px; text-align: left; }
  .kmy-hq-infra-services { grid-template-columns: 1fr 1fr; }
}

/* ===========================================================
   京大M予備！MD 関連リンク（kyodai-m-yobi-central が全サイト出力）
   本番ではプラグインが土台CSSを出力。ここは土台＋新デザイン調和の上書き。
   =========================================================== */
.kmy-public-md-links{position:fixed;left:18px;bottom:18px;z-index:9990;display:flex;align-items:center;flex-wrap:wrap;gap:6px;max-width:min(92vw,680px);padding:8px;background:rgba(255,255,255,.97);border:1px solid #d8e2ee;border-radius:10px;box-shadow:0 14px 34px rgba(8,20,36,.18);font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif}
.kmy-public-md-links a{display:inline-flex;align-items:center;min-height:34px;padding:7px 11px;border:1px solid #cfdbe9;border-radius:7px;color:#0e2640;background:#fff;font-size:13px;font-weight:800;line-height:1.2;text-decoration:none;white-space:nowrap}
.kmy-public-md-links .kmy-public-md-main{background:#e8f6f5;border-color:#bfe3df;color:#0f6f72}
.kmy-public-md-links .is-cta{background:#0f6f72;border-color:#0f6f72;color:#fff}
.kmy-public-md-links a:hover{filter:brightness(.98)}
@media(max-width:640px){.kmy-public-md-links{left:10px;right:10px;bottom:10px;justify-content:center;gap:5px;padding:7px}.kmy-public-md-links a{min-height:32px;padding:6px 8px;font-size:12px}}
/* 京大MD 単独リンク版（会員動画/掲載は非表示。左下・小型・フル幅化しない。Chariootのfab/パネルは右下に出るため左右で棲み分け） */
.kmy-public-md-links--solo{max-width:max-content}
@media(max-width:680px){
  body .kmy-public-md-links.kmy-public-md-links--solo{right:auto!important;left:12px!important;bottom:12px!important;max-width:max-content!important;justify-content:flex-start!important}
  body .kmy-public-md-links.kmy-public-md-links--solo a{flex:0 0 auto!important;font-size:12px!important}
}
