/* ─────────────────────────────────────────────────────────────
   퀸스산부인과 — 기본 디자인
   색: 로고의 자홍을 기준으로 한 색 + 층별 진료과 표시색
   서체: SUIT 하나 (굵기로만 위계를 나눔)
   주인공: 첫 화면의 건물 그림과 층별 안내. 나머지는 조용하게.
   ───────────────────────────────────────────────────────────── */

@font-face {
  font-family: "SUIT";
  src: url("/fonts/SUIT-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --magenta: #b5176f;      /* 로고 자홍 — 선택한 층, 강조 */
  --magenta-deep: #8e1257; /* 글자용 진한 자홍 */
  --tint: #fbeff5;         /* 연한 자홍 */
  --blush: #fcf5f8;        /* 첫 화면·제목 영역 바탕 */
  --ink: #33292f;          /* 본문 */
  --muted: #7a6b78;        /* 보조 글자 */
  --line: #ebe0e6;         /* 구분선 */
  --line-strong: #d8c7d0;
  --paper: #ffffff;
  --lamp: #ffe2a0;         /* 불 켜진 창문 */

  /* 층별 진료과 표시색 (작은 표시에만 사용) */
  --m-obgyn: var(--magenta);
  --m-care: #7a5aa6;
  --m-internal: #2d7a74;
  --m-child: #2f6fb0;
  --m-hall: #a8701c;
  --m-garden: #4f8a3c;
  --m-base: #7d6f78;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --floor-h: 46px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "SUIT", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

img { max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--magenta-deep); }

:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -0.01em; margin: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius);
}
.skip:focus { top: 8px; }

.empty { color: var(--muted); }

/* ── 머리말 ─────────────────────────────────────────────── */

.site-header {
  border-top: 3px solid var(--magenta);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  z-index: 20;
}

.bar {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 82px;
}

.brand { flex: none; display: block; line-height: 0; }

.gnb { flex: 1; }
.gnb > ul {
  display: flex; justify-content: center; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}
.gnb-item { position: relative; }
.gnb-item > a {
  display: block;
  padding: 29px 11px;
  font-size: 16px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.gnb-item > a:hover { color: var(--magenta-deep); }
.gnb-item.is-current > a { color: var(--magenta-deep); box-shadow: inset 0 -3px 0 var(--magenta); }

.gnb-sub {
  position: absolute; left: 50%; top: 100%;
  translate: -50% 0;
  min-width: 190px;
  list-style: none; margin: 0; padding: 10px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--magenta);
  box-shadow: 0 14px 28px -18px rgb(51 41 47 / 0.35);
  visibility: hidden; opacity: 0;
}
.gnb-item:hover .gnb-sub,
.gnb-item:focus-within .gnb-sub { visibility: visible; opacity: 1; }
.gnb-sub a {
  display: block; padding: 7px 20px;
  font-size: 15px; text-decoration: none; white-space: nowrap;
}
.gnb-sub a:hover { background: var(--tint); }

.cta {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--magenta);
  color: #fff;
  font-size: 15px; font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.cta:hover { background: var(--magenta-deep); color: #fff; }

@media (max-width: 1499px) {
  .bar { gap: 18px; }
  .gnb-item > a { padding-inline: 8px; font-size: 15px; }
  .call-num { font-size: 18px; }
}
@media (max-width: 1279px) {
  .gnb-item > a { padding-inline: 6px; font-size: 14.5px; }
  .call-label { display: none; }
  .cta { padding: 8px 14px; font-size: 14px; }
}

.call {
  flex: none;
  display: grid;
  text-align: right;
  text-decoration: none;
  line-height: 1.25;
}
.call-label { font-size: 13px; color: var(--muted); }
.call-num { font-size: 20px; font-weight: 800; color: var(--magenta-deep); font-variant-numeric: tabular-nums; }

.m-nav { display: none; }

@media (max-width: 1099px) {
  .gnb { display: none; }
  .bar { justify-content: space-between; gap: 12px; min-height: 64px; }
  .brand img { width: 160px; height: auto; }
  .call { margin-left: auto; }
  .cta { display: none; }
  .call-label { display: none; }
  .call-num { font-size: 17px; }
  .m-nav { display: block; }
  .m-nav summary {
    list-style: none; cursor: pointer;
    padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
    font-weight: 700; font-size: 15px; white-space: nowrap;
  }
  .m-nav summary::-webkit-details-marker { display: none; }
  .m-nav[open] summary { background: var(--ink); color: #fff; border-color: var(--ink); }
  .m-nav-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgb(51 41 47 / 0.4);
    padding: 8px var(--gutter) 24px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 24px;
    max-height: calc(100vh - 67px); overflow-y: auto;
  }
  .m-nav-panel h2 { font-size: 15px; color: var(--magenta-deep); margin-top: 16px; }
  .m-nav-panel ul { list-style: none; margin: 4px 0 0; padding: 0; }
  .m-nav-panel a { display: block; padding: 5px 0; font-size: 15px; text-decoration: none; }
}

/* ── 메인: 첫 화면 ──────────────────────────────────────── */

.hero {
  background: var(--blush);
  border-bottom: 1px solid var(--line);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 56px;
  align-items: end;
  padding-block: 48px 36px;
}
.intro h1 {
  font-size: clamp(32px, 4.2vw, 52px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
}
.intro-lead { max-width: 33em; margin: 16px 0 0; color: var(--muted); font-size: 17px; }

.intro-emergency {
  background: var(--paper);
  border-left: 4px solid var(--magenta);
  padding: 18px 26px 18px 22px;
  min-width: 280px;
}
.intro-emergency p { margin: 0; }
.em-title { font-weight: 700; font-size: 15px; }
.em-phone {
  display: inline-block;
  font-size: 34px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--magenta-deep); text-decoration: none;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 2px;
}
.em-sub { color: var(--muted); font-size: 14px; }
.em-links { margin-top: 12px !important; display: flex; gap: 18px; font-size: 15px; font-weight: 700; }

@media (max-width: 799px) {
  .intro { grid-template-columns: 1fr; padding-block: 36px 28px; }
  .intro-lead { font-size: 16px; }
  .intro-emergency { min-width: 0; }
}

/* ── 메인: 오늘 진료 ────────────────────────────────────── */

.today { padding-bottom: 36px; }
.today-title {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px;
  font-size: 17px; font-weight: 800; margin-bottom: 12px;
}
.today-title time { font-size: 14px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

.today-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--paper);
  border: 1px solid var(--line);
}
.today-list li + li { border-left: 1px solid var(--line); }
.today-list a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline;
  padding: 16px 20px;
  text-decoration: none; height: 100%;
}
.today-list a:hover { background: var(--blush); }
.t-name { font-size: 17px; font-weight: 800; }
.t-name small { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.t-state {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 800;
}
.t-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.t-detail { grid-column: 1 / -1; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.t-hours { grid-column: 1 / -1; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

.st-open .t-state { color: #1f8a4c; }
.st-open .t-state::before { box-shadow: 0 0 0 4px color-mix(in srgb, #1f8a4c 20%, transparent); }
.st-lunch .t-state { color: var(--m-hall); }
.st-beforeopen .t-state { color: var(--m-child); }
.st-closed .t-state, .st-dayoff .t-state { color: var(--muted); }

.today-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

@media (max-width: 899px) {
  .today-list { grid-template-columns: 1fr 1fr; }
  .today-list li:nth-child(3) { border-left: 0; }
  .today-list li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .today-list a { padding: 14px; }
}
@media (max-width: 419px) {
  .today-list a { grid-template-columns: 1fr; }
  .t-state { justify-self: start; }
}

/* ── 메인: 층별 안내 ────────────────────────────────────── */

.directory {
  display: grid;
  grid-template-columns: 240px minmax(240px, 290px) minmax(0, 1fr);
  gap: 0 28px;
  align-items: start;
  padding-bottom: 72px;
}

/* 건물 그림 */
.bldg { display: block; width: 240px; height: auto; overflow: visible; }
.bldg .band { fill: var(--paper); stroke: var(--line-strong); stroke-width: 1; }
.bldg .base { fill: #f3ebef; stroke: var(--line-strong); stroke-width: 1; }
.bldg .win { fill: #efe6eb; stroke: var(--line-strong); stroke-width: 1; }
.bldg .door { fill: #e7dce2; stroke: var(--line-strong); stroke-width: 1; }
.bldg .ph { fill: var(--paper); stroke: var(--line-strong); stroke-width: 1; }
.bldg .ph-cap { stroke: #b59fac; stroke-width: 3; stroke-linecap: round; }
.bldg .clock { fill: var(--paper); stroke: #a8909e; stroke-width: 1.5; }
.bldg .clock-hand { stroke: #a8909e; stroke-width: 1.5; fill: none; stroke-linecap: round; }
.bldg .garden { fill: #b9d3b0; }
.bldg .cornice { stroke: #b59fac; stroke-width: 4; stroke-linecap: round; }
.bldg .cornice.thin { stroke-width: 2.5; }
.bldg .ground { stroke: #a8909e; stroke-width: 2; }
.bldg .sign { fill: var(--magenta); }
.bldg .sign-text {
  font: 700 11px "SUIT", sans-serif; fill: #fff;
  writing-mode: vertical-rl; letter-spacing: 3px;
}
.bldg .fl-num { font: 600 11px "SUIT", sans-serif; fill: #b59fac; font-variant-numeric: tabular-nums; }
.bldg .fl[data-stop] { cursor: pointer; }
.bldg .fl.is-hover .band { fill: var(--tint); }
.bldg .fl[data-marker="obgyn"]    { --marker: var(--m-obgyn); }
.bldg .fl[data-marker="care"]     { --marker: var(--m-care); }
.bldg .fl[data-marker="internal"] { --marker: var(--m-internal); }
.bldg .fl[data-marker="child"]    { --marker: var(--m-child); }
.bldg .fl[data-marker="hall"]     { --marker: var(--m-hall); }
.bldg .fl[data-marker="garden"]   { --marker: var(--m-garden); }
.bldg .fl[data-marker="base"]     { --marker: var(--m-base); }
/* 옥상(PH): 띠 대신 펜트하우스와 정원에 불이 켜진다 */
.bldg .roof.is-hover .ph { fill: var(--tint); }
.bldg .roof.is-active .ph { fill: var(--lamp); stroke: var(--marker); }
.bldg .roof.is-active .garden { fill: var(--marker); }
.bldg .roof.is-active .clock { stroke: var(--marker); }
.bldg .fl.is-active .band { fill: var(--marker, var(--magenta)); stroke: var(--marker, var(--magenta)); }
.bldg .fl.is-active .win { fill: var(--lamp); stroke: var(--marker, var(--magenta)); }
.bldg .fl.is-active .fl-num { fill: var(--marker, var(--magenta)); font-weight: 800; }

/* 층 목록: 행 높이를 그림과 맞춘다 */
.floors {
  display: grid;
  grid-template-rows: repeat(var(--rows), var(--floor-h));
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line-strong);
}
.floors > li { border-bottom: 1px solid var(--line-strong); display: flex; }

/* 층 버튼: 엘리베이터 층 버튼처럼. 테두리 색 = 그 층 진료과 색, 누르면 불이 켜진다 */
.floor-btn, .floor-static {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 0 10px 0 4px;
  font: inherit; color: inherit; text-align: left;
  background: none; border: 0;
}
.floor-btn { cursor: pointer; }
.floor-btn[data-marker="obgyn"]    { --marker: var(--m-obgyn); }
.floor-btn[data-marker="care"]     { --marker: var(--m-care); }
.floor-btn[data-marker="internal"] { --marker: var(--m-internal); }
.floor-btn[data-marker="child"]    { --marker: var(--m-child); }
.floor-btn[data-marker="hall"]     { --marker: var(--m-hall); }
.floor-btn[data-marker="garden"]   { --marker: var(--m-garden); }
.floor-btn[data-marker="base"]     { --marker: var(--m-base); }

.floor-label {
  flex: none;
  display: inline-grid; place-items: center;
  width: 70px; height: 32px;
  border: 2px solid var(--marker, var(--line-strong));
  border-radius: 999px;
  background: var(--paper);
  font-size: 16px; font-weight: 800; letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.floor-name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.floor-static { color: var(--muted); }
.floor-static .floor-label { border-style: dashed; color: #a8909e; font-weight: 600; background: transparent; }
.floor-static .floor-name { font-weight: 500; font-size: 14px; }

.floor-btn:hover .floor-label { background: var(--tint); }
.floor-btn:hover .floor-name { color: var(--magenta-deep); }
.floor-btn[aria-pressed="true"] .floor-label {
  background: var(--marker); border-color: var(--marker); color: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--marker) 22%, transparent);
}
.floor-btn[aria-pressed="true"] .floor-name { color: var(--ink); font-weight: 800; }

/* 선택한 층 안내 */
.stop-panels { min-width: 0; }
.stop {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--marker, var(--magenta));
}
.stop[data-marker="obgyn"]    { --marker: var(--m-obgyn); }
.stop[data-marker="care"]     { --marker: var(--m-care); }
.stop[data-marker="internal"] { --marker: var(--m-internal); }
.stop[data-marker="child"]    { --marker: var(--m-child); }
.stop[data-marker="hall"]     { --marker: var(--m-hall); }
.stop[data-marker="garden"]   { --marker: var(--m-garden); }
.stop[data-marker="base"]     { --marker: var(--m-base); }

.stop-hero { margin: 0; position: relative; }
.stop-hero img { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
.stop-hero figcaption {
  position: absolute; left: 12px; bottom: 12px;
  padding: 3px 10px;
  background: rgb(255 255 255 / 0.92);
  font-size: 13px; font-weight: 600;
}

.stop-body { padding: 26px 30px 30px; }

.stop-head { display: flex; align-items: flex-start; gap: 22px; }
.stop-floor {
  flex: none;
  margin: 0;
  font-size: 54px; font-weight: 800; line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--marker);
  font-variant-numeric: tabular-nums;
}
.stop h3 { font-size: 24px; font-weight: 800; }
.stop-summary { margin: 6px 0 0; color: var(--muted); font-size: 15px; max-width: 36em; }

.depts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0 32px;
  margin-top: 22px;
}
.dept { padding-top: 18px; border-top: 1px solid var(--line); }
.dept h4 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.dept-phone {
  display: flex; flex-direction: column;
  margin: 2px 0 4px;
  font-size: 27px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2;
  text-decoration: none; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.dept-phone span { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.dept-phone:hover { color: var(--magenta-deep); }

.hours { margin: 12px 0 0; display: grid; gap: 1px; font-size: 15px; }
.hours > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; }

.dept-note { margin: 12px 0 0; font-size: 14px; color: var(--ink); background: var(--blush); padding: 8px 12px; }
.dept-links {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 16px 0 0; padding: 0;
}
.dept-links a {
  display: block; padding: 6px 13px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.dept-links a:hover { border-color: var(--magenta); color: var(--magenta-deep); background: var(--tint); }

.stop-thumbs {
  display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 8px; align-items: end;
  margin-top: 26px;
}
.stop-thumbs img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.stop-thumbs a { font-size: 13px; font-weight: 700; white-space: nowrap; padding-left: 6px; }

@media (max-width: 1099px) {
  .directory { grid-template-columns: 190px minmax(220px, 250px) minmax(0, 1fr); gap: 0 20px; }
  .bldg { width: 190px; }
  .stop-body { padding: 22px 22px 24px; }
}

@media (max-width: 899px) {
  .directory { grid-template-columns: 1fr; padding-bottom: 48px; }
  .stop { scroll-margin-top: 16px; }
  .stop-floor { font-size: 42px; }
  .dept-phone { font-size: 24px; }
  .stop-thumbs { grid-template-columns: repeat(3, 1fr); }
  .hours { font-size: 14px; }
  .hours > div { grid-template-columns: 6.5em 1fr; gap: 8px; }
  .stop-thumbs a { grid-column: 1 / -1; padding: 4px 0 0; }
}

/* ── 메인: 아이를 만나기까지 ────────────────────────────── */

.journey { padding-block: 72px 64px; }
.journey-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.journey-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.03em; }
.journey-head p { margin: 0; color: var(--muted); }

.journey-steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px;
}
.journey-steps a { display: block; text-decoration: none; }
.journey-steps img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.step-floor {
  display: inline-block;
  margin-top: -16px; margin-left: 12px;
  position: relative;
  padding: 3px 10px;
  background: var(--magenta); color: #fff;
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.journey-steps h3 { font-size: 19px; font-weight: 800; margin-top: 12px; }
.journey-steps p { margin: 4px 0 0; font-size: 15px; color: var(--muted); line-height: 1.6; }
.journey-steps a:hover h3 { color: var(--magenta-deep); text-decoration: underline; }
.journey-steps a:hover img { filter: brightness(1.04); }

@media (max-width: 999px) {
  .journey-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
}
@media (max-width: 599px) {
  .journey { padding-block: 48px; }
  .journey-steps { grid-template-columns: 1fr; gap: 0; }
  .journey-steps li { border-bottom: 1px solid var(--line); padding-block: 14px; }
  .journey-steps a { display: grid; grid-template-columns: 112px 1fr; column-gap: 14px; }
  .journey-steps img { grid-row: 1 / 4; aspect-ratio: 1; }
  .step-floor { margin: 0; justify-self: start; font-size: 13px; padding: 1px 8px; }
  .journey-steps h3 { margin-top: 4px; font-size: 17px; }
  .journey-steps p { font-size: 14px; }
}

/* ── 메인: 의료진 ───────────────────────────────────────── */

.doctors { background: var(--blush); border-block: 1px solid var(--line); padding-block: 64px; }
.doctors-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 28px; }
.doctors-head h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -0.03em; }
.doctors-head p { margin: 0; color: var(--muted); }

.doctor-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 28px 16px;
}
.doctor-grid a { display: grid; text-decoration: none; }
.doc-photo {
  display: block; aspect-ratio: 1; overflow: hidden;
  background: #f6e6ee;
  border-bottom: 3px solid var(--magenta);
}
/* 흰 배경 증명사진이 카드 바탕과 자연스럽게 섞이도록 */
.doc-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; mix-blend-mode: multiply; }
.doc-dept { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--magenta-deep); }
.doc-name { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.doc-focus { font-size: 13px; color: var(--muted); line-height: 1.5; }
.doctor-grid a:hover .doc-name { color: var(--magenta-deep); text-decoration: underline; }

@media (max-width: 599px) {
  .doctors { padding-block: 44px; }
  .doctor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
}

/* ── 메인: 소식 · 강좌 ──────────────────────────────────── */

.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 48px 64px;
  padding-block: 56px 64px;
  border-top: 1px solid var(--line);
}
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.block-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.block-head a { font-size: 14px; font-weight: 700; color: var(--muted); }

.post-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.post-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.post-list a { text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-list a:hover { text-decoration: underline; }
.post-list time { flex: none; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

.class-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.class-list li {
  display: grid; grid-template-columns: 62px 1fr; gap: 16px; align-items: center;
  padding: 8px 14px 8px 8px; background: var(--blush);
}
.class-list time {
  display: grid; justify-items: center; align-content: center;
  height: 62px; background: var(--paper);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.class-list .m { font-size: 11px; color: var(--muted); font-weight: 600; }
.class-list .d { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.class-list .w { font-size: 11px; color: var(--muted); }
.class-text { font-size: 15px; line-height: 1.5; }
.classes-foot { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.classes-foot a { font-weight: 700; color: var(--ink); }

/* 일정 데이터의 옛 글자색을 새 색으로 */
.sc-note { color: var(--m-hall); font-weight: 700; }
.sc-off { color: #c0392b; font-weight: 600; }
.sc-half { color: var(--m-child); font-weight: 600; }

@media (max-width: 799px) {
  .home-lower { grid-template-columns: 1fr; padding-block: 40px; }
}

/* ── 메인: 바로가기 · 협력병원 ──────────────────────────── */

.shortcuts { background: var(--blush); border-block: 1px solid var(--line); padding-block: 44px 48px; }
.shortcuts h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 18px; }
.shortcuts ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.shortcuts a {
  display: grid; gap: 2px;
  height: 100%;
  padding: 18px 20px;
  background: var(--paper);
  border-left: 3px solid transparent;
  text-decoration: none;
}
.shortcuts strong { font-size: 17px; font-weight: 800; }
.shortcuts span { font-size: 14px; color: var(--muted); }
.shortcuts a:hover { border-left-color: var(--magenta); }
.shortcuts a:hover strong { color: var(--magenta-deep); }

@media (max-width: 799px) {
  .shortcuts ul { grid-template-columns: 1fr 1fr; }
  .shortcuts a { padding: 14px 14px; }
}
@media (max-width: 479px) {
  .shortcuts ul { grid-template-columns: 1fr; }
}

.partners { padding-block: 36px 56px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.partners h2 { font-size: 15px; font-weight: 800; }
.partners ul { flex: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.partners a { text-decoration: none; color: var(--muted); }
.partners a:hover { color: var(--magenta-deep); text-decoration: underline; }
.partner-note { margin: 0; font-size: 14px; color: var(--muted); }

/* ── 꼬리말 ─────────────────────────────────────────────── */

.site-footer { background: #f6f0f3; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px 48px;
  padding-block: 44px 30px;
}
.site-footer h2 { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.site-footer address { font-style: normal; margin-top: 16px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.biz { margin: 6px 0 0; }
.footer-phones dl { margin: 0; display: grid; gap: 3px; }
.footer-phones dl > div { display: flex; justify-content: space-between; gap: 12px; max-width: 260px; }
.footer-phones dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 16px 32px; border-top: 1px solid var(--line);
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 4px 20px; list-style: none; margin: 0; padding: 0; }
.footer-bottom strong { color: var(--ink); }
.footer-bottom p { margin: 0; }

@media (max-width: 799px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── 하위 페이지 ────────────────────────────────────────── */

.sub-hero {
  background: var(--blush);
  border-bottom: 1px solid var(--line);
  padding-block: 40px 36px;
}
.sub-title {
  margin-top: 10px;
  font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -0.035em;
}

.sub {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 56px;
  padding-block: 44px 88px;
}

.subnav { position: sticky; top: 24px; align-self: start; }
.subnav-title {
  margin: 0 0 6px; padding-bottom: 12px;
  font-size: 15px; font-weight: 800; color: var(--magenta-deep);
  border-bottom: 2px solid var(--ink);
}
.subnav ul { list-style: none; margin: 0; padding: 0; }
.subnav > ul > li { border-bottom: 1px solid var(--line); }
.subnav a { display: block; padding: 11px 0; font-size: 16px; font-weight: 650; text-decoration: none; }
.subnav li ul { padding: 0 0 10px 12px; border-left: 2px solid var(--tint); margin-left: 2px; }
.subnav li ul a { padding: 4px 0; font-size: 15px; font-weight: 500; color: var(--muted); }
.subnav a[aria-current="page"] { color: var(--magenta-deep); }
.subnav > ul > li > a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--magenta); padding-left: 12px; }
.subnav li ul a[aria-current="page"] { font-weight: 800; }

.crumbs ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-strong); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; }

@media (max-width: 899px) {
  .sub-hero { padding-block: 24px 22px; }
  .sub { grid-template-columns: minmax(0, 1fr); gap: 0; padding-block: 0 56px; }
  .subnav { position: static; margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter); background: var(--paper); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
  .subnav-title { display: none; }
  .subnav > ul { display: flex; gap: 4px 18px; overflow-x: auto; scrollbar-width: none; }
  .subnav > ul > li { border: 0; flex: none; }
  .subnav li ul { display: none; }
  .subnav a { padding: 6px 0; font-size: 15px; white-space: nowrap; }
  .subnav > ul > li > a[aria-current="page"], .subnav > ul > li.is-on > a { box-shadow: inset 0 -2px 0 var(--magenta); padding-left: 0; color: var(--magenta-deep); }
}

/* 기존 본문(html 조각)을 새 디자인에 맞춤 */
.legacy { max-width: 820px; }
.legacy h2.ct {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em;
  margin: 36px 0 16px; padding-top: 28px;
  border-top: 1px solid var(--line);
}
.legacy > h2.ct:first-child, .legacy > .gap:first-child + h2.ct { margin-top: 0; padding-top: 0; border-top: 0; }
.legacy h3.ct2 { font-size: 18px; font-weight: 800; margin: 28px 0 10px; }
.legacy .gap { display: block; height: 16px; }
.legacy .gap + h2.ct, .legacy .gap + .gap { margin-top: 0; }
.legacy .em, .legacy .color { color: var(--magenta-deep); font-weight: 700; }
.legacy p { margin: 0 0 1em; }
.legacy img { height: auto; }
.legacy table, .legacy .c_table {
  width: 100% !important; border-collapse: collapse;
  margin: 8px 0 16px; font-size: 15px;
  border-top: 2px solid var(--ink);
}
.legacy th, .legacy td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legacy th { background: var(--blush); font-weight: 800; }
.legacy iframe { max-width: 100%; border: 0; }
.legacy .root_daum_roughmap { width: 100% !important; margin: 8px 0 20px; }
.legacy a { color: var(--magenta-deep); }

@media (max-width: 699px) {
  .legacy table { display: block; overflow-x: auto; }
}

/* 시설 사진 */
.facility-jump ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 44px; padding: 0; }
.facility-jump a {
  display: block; padding: 6px 15px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none;
}
.facility-jump a:hover { border-color: var(--magenta); color: var(--magenta-deep); background: var(--tint); }
.facility-jump a[aria-current="true"] { border-color: var(--magenta); background: var(--magenta); color: #fff; }
.facility-floor { margin-bottom: 60px; scroll-margin-top: 24px; }
.facility-floor h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.facility-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 12px; }
.facility-grid figure { margin: 0; }
.facility-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.facility-grid figcaption { margin-top: 7px; font-size: 14px; font-weight: 600; }

/* 일정 달력 */
.cal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.cal-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.cal-head a { font-size: 15px; font-weight: 700; text-decoration: none; color: var(--muted); }
.cal-head a:hover { color: var(--magenta-deep); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.cal { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: 13px; border-top: 2px solid var(--ink); }
.cal th { padding: 8px 4px; font-weight: 800; border-bottom: 1px solid var(--line); }
.cal th:first-child, .cal .is-sun .cal-day { color: #c0392b; }
.cal td { height: 108px; padding: 7px; vertical-align: top; border: 1px solid var(--line); line-height: 1.45; }
.cal td.cal-empty { background: #fbf8fa; }
.cal td.is-today { background: var(--tint); box-shadow: inset 0 3px 0 var(--magenta); }
.cal-day { display: block; font-weight: 800; font-size: 14px; margin-bottom: 3px; }
.cal-entry + .cal-entry { margin-top: 4px; }
.cal-list { display: none; list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.cal-list li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cal-list time { font-weight: 800; font-variant-numeric: tabular-nums; }

@media (max-width: 799px) {
  .cal { display: none; }
  .cal-list { display: block; }
}

/* 게시판 */
.board-search { display: flex; gap: 8px; margin-bottom: 20px; max-width: 420px; }
.board-search input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 15px;
  padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.board-search button, .post-back a {
  font: inherit; font-size: 15px; font-weight: 700;
  padding: 9px 18px; border: 0; border-radius: var(--radius);
  background: var(--ink); color: #fff; cursor: pointer; text-decoration: none;
}
.board-search button:hover, .post-back a:hover { background: var(--magenta-deep); color: #fff; }
.board-count { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.board-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.board-list li { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.board-list li.is-reply { padding-left: 24px; }
.board-list a { text-decoration: none; font-weight: 650; }
.board-list a:hover { text-decoration: underline; }
.board-list .meta { flex: none; display: flex; gap: 10px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.has-file { color: var(--magenta-deep); font-weight: 600; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 28px; }
.pager a, .pager span { min-width: 38px; padding: 6px 10px; text-align: center; border-radius: var(--radius); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager a:hover { background: var(--tint); }
.pager [aria-current] { background: var(--ink); color: #fff; font-weight: 700; }

.post-title { font-size: clamp(24px, 3vw, 36px); }
.post-meta { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.post-image { display: block; margin: 0 0 24px; max-width: 100%; }
.post-body { max-width: 760px; }
.post-body img { height: auto; }
.post-files { list-style: none; margin: 32px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); font-size: 15px; }
.post-back { margin-top: 48px; }

/* 오류 */
.error-page { padding-block: 96px 120px; max-width: 720px; }
.error-page h1 { font-size: 32px; font-weight: 800; margin-bottom: 16px; }

/* ── 메인 팝업 ─────────────────────────────────────────── */

.popups {
  padding: 0; border: 0;
  max-width: min(440px, calc(100vw - 32px));
  background: var(--paper);
  box-shadow: 0 24px 48px -12px rgb(51 41 47 / 0.45);
}
.popups::backdrop { background: rgb(51 41 47 / 0.55); }
.popups-track img { display: block; width: 100%; height: auto; }
.popups-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 12px; border-top: 1px solid var(--line); font-size: 14px;
}
.popups-count { margin-right: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.popups-bar button {
  font: inherit; font-size: 14px; font-weight: 700;
  padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.popups-bar [data-popups-close] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── 움직임: 층을 고를 때 창문에 불이 켜지는 것 하나만 ───── */
@media (prefers-reduced-motion: no-preference) {
  .gnb-sub { transition: opacity .15s ease, visibility .15s; }
  .bldg .band, .bldg .win { transition: fill .25s ease; }
  .floor-label { transition: background-color .2s ease, box-shadow .2s ease, color .2s ease; }
  .directory.is-live .stop:not([hidden]) .stop-hero img { animation: stop-in .3s ease both; }
  @keyframes stop-in { from { opacity: 0; } to { opacity: 1; } }
}
