/* 홈 레이어 팝업 — 시안 토큰(--brand-ink · --line) 위에 얹는다. PC 는 가운데 최대 2장 나란히, 모바일은 아래에서 겹쳐서 한 장씩 */
.bsky-pop-wrap{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:16px}
.bsky-pop-dim{position:absolute;inset:0;background:rgba(11,47,92,.42);backdrop-filter:blur(2px)}
.bsky-pop-row{position:relative;display:flex;gap:16px;align-items:flex-start;justify-content:center;max-width:100%;max-height:calc(100vh - 32px)}
.bsky-pop{width:min(420px,calc(100vw - 32px));background:#fff;border:1px solid var(--line-strong,#b9cbe3);box-shadow:0 30px 70px rgba(11,47,92,.28);display:flex;flex-direction:column;max-height:calc(100vh - 32px);animation:bsky-pop-in .5s var(--ease,ease) both}
.bsky-pop .sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
.bsky-pop-media{display:block;overflow:auto;min-height:0;flex:1}
.bsky-pop-media img{display:block;width:100%;height:auto}
.bsky-pop-body{padding:1.4rem 1.5rem;font-size:1rem;line-height:1.7;color:var(--ink,#0f1b2d)}
.bsky-pop-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.7rem .9rem;background:var(--brand-ink,#1b3f78);color:#fff;font-size:.86rem;font-weight:600;flex:none}
.bsky-pop-bar .bsky-pop-today{font-weight:600;font-size:.86rem;padding:.3rem 0}
.bsky-pop-bar button{background:none;border:0;color:#fff;font-weight:800;font-size:.9rem;cursor:pointer;padding:.3rem .5rem}
.bsky-pop-bar button:hover{text-decoration:underline}
body.bsky-pop-open{overflow:hidden}
@keyframes bsky-pop-in{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@media (max-width:767px){
  .bsky-pop-wrap{align-items:flex-end;padding:0}
  .bsky-pop-row{width:100%;max-height:88vh;display:grid;align-items:end}
  .bsky-pop-row > .bsky-pop{grid-area:1/1}  /* 여러 장은 겹쳐서 — 닫으면 다음 장(병원 10/16) */
  .bsky-pop{width:100%;max-height:88vh;animation-name:bsky-pop-up}
  @keyframes bsky-pop-up{from{transform:translateY(100%)}to{transform:none}}
}
@media (prefers-reduced-motion:reduce){.bsky-pop{animation:none}}

/* 관리자 사이트 > 홈페이지 내용(cms.js) — 공지 · 임시 휴진 띠, 숨긴 수술 건수 카드, 수술 종목 [자세히 보기] */
.cms-bar{display:flex;flex-wrap:wrap;justify-content:center;gap:.2rem 1.4rem;padding:.55rem 16px;background:var(--brand-ink,#0a2548);color:#fff;font-size:.88rem;font-weight:600;text-align:center;position:relative;z-index:60}
.cms-bar a{color:#fff;text-decoration:underline;text-underline-offset:3px}
.nc[hidden]{display:none}
.sx-panel .sx-more{margin-top:1.1rem;color:var(--brand,#1d5fae)}
/* PC 여러 장 — 한 상자 안에서 자동으로 넘김 · 아래 제목 탭(병원 10/20, 서울하늘안과처럼) */
.bsky-slider{width:min(460px,calc(100vw - 32px))}
.bsky-sl-view{overflow:hidden;flex:1;min-height:0;background:#fff}
.bsky-sl-track{display:flex;align-items:flex-start;transition:transform .5s var(--ease,ease)}
.bsky-sl-slide{flex:0 0 100%;min-width:0;max-height:calc(100vh - 170px);overflow:auto}
.bsky-sl-tabs{display:flex;border-top:1px solid #dde5f0;background:#fff;flex:none}
.bsky-sl-tabs button{flex:1 1 0;min-width:0;padding:.7rem .55rem;border:0;border-left:1px solid #dde5f0;background:#f2f5fa;color:#5a6780;font-size:.84rem;font-weight:600;line-height:1.35;cursor:pointer;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bsky-sl-tabs button:first-child{border-left:0}
.bsky-sl-tabs button[aria-selected="true"]{background:#fff;color:#0f1b2d;font-weight:800}
@media (prefers-reduced-motion:reduce){.bsky-sl-track{transition:none}}

/* ═══ 2026-10-26 병원 변경 요청 — PC 팝업을 서울하늘안과와 같은 모양으로(가로형 그림 · 아래 흰 탭 줄 · 검정 띠) ═══
   그림은 자르지 않고 틀(16:10) 안에 원래 크기 이내로 가운데, 남는 양옆은 같은 그림을 흐리게(대표 10/26 '잘려 보인다'). 글로 만든 팝업은 그대로 스크롤. 모바일은 아래에서 올라오는 지금 방식 유지 */
.bsky-pop-blur{display:none}
@media (min-width:768px){
  .bsky-pop,.bsky-slider{width:min(800px,calc(100vw - 32px));border:0;box-shadow:0 30px 80px rgba(0,0,0,.35)}
  .bsky-pop-row{gap:20px}
  .bsky-pop-row:has(> .bsky-pop:nth-child(2)) > .bsky-pop{width:min(520px,calc(50vw - 40px))}  /* 한 장씩 여러 개를 나란히 띄울 때 */
  .bsky-pop-media:has(> img){aspect-ratio:16/10;max-height:none;overflow:hidden;flex:none}
  .bsky-sl-slide:has(img){flex:0 0 100%;aspect-ratio:16/10;max-height:none;overflow:hidden}
  .bsky-pop-media:has(> img),.bsky-sl-slide:has(img) .bsky-pop-media{position:relative;display:flex!important;align-items:center;justify-content:center;overflow:hidden;background:#0d1220}
  .bsky-pop-media:has(> img) > img,.bsky-sl-slide:has(img) img{position:relative;z-index:1;width:auto!important;height:auto!important;max-width:100%;max-height:100%;object-fit:contain}
  .bsky-pop-blur{display:block;position:absolute;inset:-24px;background:center/cover no-repeat;filter:blur(22px) brightness(.55);transform:scale(1.05)}
  .bsky-sl-slide:has(img) .bsky-pop-media{height:100%}
  .bsky-sl-view{flex:none}
  .bsky-sl-tabs{border-top:0;background:#fff}
  .bsky-sl-tabs button{padding:.85rem .6rem;background:#fff;border-left:1px solid #e3e3e3;color:#333;font-size:.92rem;font-weight:500;-webkit-line-clamp:1}
  .bsky-sl-tabs button[aria-selected="true"]{background:#fff;color:#000;font-weight:800}
  .bsky-pop-bar{background:#111;padding:.65rem 1rem;font-size:.86rem}
  .bsky-pop-bar .bsky-pop-today,.bsky-pop-bar button{font-weight:600}
}

/* 그림 비율에 맞춘 폭(live.js fitPop 이 --pop-h · 폭을 넣은 뒤) — 틀 비율 고정을 풀고 그 높이로 */
@media (min-width:768px){
  .bsky-slider[style*="--pop-h"] .bsky-sl-slide:has(img),.bsky-pop[style*="--pop-h"] .bsky-pop-media:has(> img){aspect-ratio:auto!important;height:var(--pop-h)}
  .bsky-slider[style*="--pop-h"] .bsky-sl-slide img,.bsky-pop[style*="--pop-h"] .bsky-pop-media > img{width:100%!important;height:100%!important;object-fit:contain}
}
