/* =========================================================
   디자인 토큰 (Figma variables 기반)
   ========================================================= */
:root {
    --brand-primary-100: #c2ccf4;
    --brand-primary-300: #6d84e3;
    --brand-primary-350: #5478ce;
    --brand-primary-400: #4260db;
    --brand-primary-500: #2545c5;
    --brand-primary-600: #1d369a;
    --brand-primary-bg:  #edf0fc;

    --white: #ffffff;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-700: #404040; /* 본문 */
    --gray-800: #262626; /* 타이틀 */
    --gray-900: #171717; /* 헤드 */

    --white-10: rgba(255, 255, 255, 0.1);
    --white-70: rgba(255, 255, 255, 0.7);
    --white-80: rgba(255, 255, 255, 0.8);

    --font-sans: "Kakao Big Sans", "Wanted Sans Variable", "Wanted Sans",
                 "Pretendard", -apple-system, BlinkMacSystemFont,
                 "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

    --gnb-pad-y: 16px;
    --gnb-pad-x: clamp(20px, 3vw, 60px);
    --footer-pad-y-top: 40px;
    --footer-pad-y-bottom: 80px;
    --footer-pad-x: 160px;
    --container-max: 1600px;
    /* 모든 메인 섹션의 좌우 패딩에 사용. 미디어 쿼리에서 step 축소. */
    --container-px: 160px;

    /* SVG img(fill=currentColor)에 브랜드 색을 입힐 때 사용 */
    --filter-brand-500: brightness(0) saturate(100%) invert(20%) sepia(83%) saturate(2466%) hue-rotate(228deg) brightness(85%) contrast(106%);
    --filter-white: brightness(0) invert(1);
}
@media (max-width: 1700px) { :root { --container-px: 60px; } }
@media (max-width: 1280px) { :root { --container-px: 32px; } }
@media (max-width: 768px)  { :root { --container-px: 20px; } }

/* =========================================================
   리셋
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* 일부 브라우저 확장(ChatGPT 사이드바 등)이 주입하는 floating 요소 차단 */
[id^="USE_CHAT_GPT_AI_"],
[id*="USE_CHAT_GPT_AI"] {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}
html { scroll-behavior: smooth; }
/* sticky 헤더에 섹션 상단이 가려지지 않도록 */
.hero-slider, .doctors, .paper-banner, .papers, .services,
.board, .tour, .location { scroll-margin-top: 90px; }
body {
    font-family: var(--font-sans);
    color: var(--gray-900);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }

/* =========================================================
   GNB (헤더)
   ========================================================= */
.gnb {
    background: var(--white);
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.gnb__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: var(--gnb-pad-y) var(--gnb-pad-x);
    max-width: var(--container-max);
    margin: 0 auto;
}
.gnb__logo { display: block; flex-shrink: 0; }
.gnb__logo img { height: 48px; width: auto; }

.gnb__nav { flex: 1; display: flex; justify-content: center; }
.gnb__menu {
    display: flex;
    align-items: center;
    gap: 80px;
}
.gnb__item a {
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.36px;
    color: var(--gray-900);
    white-space: nowrap;
    transition: color .15s ease;
}
.gnb__item:hover a,
.gnb__item.is-active a {
    color: var(--gray-900);
    font-weight: 700;
}

.gnb__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}
.gnb__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-primary-500);
    color: var(--white);
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
    padding: 8px 20px;
    border-radius: 9999px;
    transition: background .15s ease;
}
.gnb__login:hover { background: #1d39a8; }

.gnb__menu-btn {
    display: none;                /* 데스크탑에선 숨김 */
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.gnb__menu-btn img { width: 24px; height: 24px; }
/* 가로 nav가 사라지는 폭부터 햄버거 노출 */
@media (max-width: 1024px) {
    .gnb__menu-btn { display: inline-flex; }
}

/* =========================================================
   푸터
   ========================================================= */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: var(--footer-pad-y-top) var(--footer-pad-x) var(--footer-pad-y-bottom);
}
.footer__inner {
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.footer__logo {
    display: inline-block;
    width: 200px;
    height: 50px;              /* 200 × 50 (4:1) */
    flex-shrink: 0;
}
.footer__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
    /* logo-footer.svg는 다크 배경용 색을 이미 포함 — filter 변환 없이 그대로 노출 */
}
@media (max-width: 768px) {
    .footer__logo { width: 160px; height: 40px; }
}
@media (max-width: 640px) {
    .footer__logo { width: 140px; height: 35px; }
}

.footer__sns {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer__sns-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--white-10);
    transition: background .15s ease;
}
.footer__sns-link:hover { background: rgba(255, 255, 255, 0.18); }
.footer__sns-link img { width: 30px; height: 30px; }

.footer__branch {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    background: var(--white);
    color: var(--gray-800);
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.32px;
}
.footer__branch img { width: 20px; height: 20px; }
.footer__branch:hover { opacity: .9; }

.footer__info {
    border-top: 1px solid var(--gray-800);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 16px;
    letter-spacing: -0.32px;
}
.footer__address {
    display: flex;
    align-items: center;
    gap: 28px;
    line-height: 1.6;
}
.footer__address strong { font-weight: 700; }
.footer__address span  { font-weight: 400; }

.footer__legal {
    display: flex;
    align-items: center;
    gap: 28px;
    line-height: 1.4;
}
.footer__legal a { transition: color .15s ease; }
.footer__legal a:hover { color: var(--gray-400); }

.footer__meta {
    display: flex;
    align-items: center;
    gap: 28px;
}
.footer__meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer__meta strong {
    font-weight: 700;
    line-height: 1.6;
    color: var(--white);
}
.footer__meta span {
    font-weight: 400;
    line-height: 1.4;
    color: var(--gray-400);
}
.footer__copy {
    margin: 0;
    color: var(--gray-400);
    font-weight: 400;
    line-height: 1.4;
}

/* =========================================================
   페이지 컨테이너 / 임시 hero
   ========================================================= */
.main { min-height: 60vh; }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gnb-pad-x); }
.hero { padding: 120px 0; text-align: center; }
.hero h1 { font-size: 48px; margin: 0 0 16px; }
.hero p  { font-size: 18px; color: var(--gray-500); margin: 0; }

/* =========================================================
   반응형 (~1280px / ~768px)
   ========================================================= */
@media (max-width: 1280px) {
    .gnb__inner { padding: 16px 32px; gap: 24px; }
    .gnb__menu { gap: 40px; }
    .footer { padding: 40px 32px 60px; }
}
@media (max-width: 1024px) {
    .gnb__nav { display: none; }
    .footer__top { flex-direction: column; align-items: flex-start; }
    .footer__row { flex-direction: column; align-items: flex-start; }
    .footer__address, .footer__legal, .footer__meta {
        flex-wrap: wrap; gap: 12px 20px;
    }
}
@media (max-width: 640px) {
    .gnb__inner { padding: 12px 16px; }
    .gnb__logo img { height: 36px; }
    .gnb__login { padding: 6px 14px; font-size: 14px; }
    .footer { padding: 32px 20px 40px; }
    .footer__sns-link { width: 40px; height: 40px; }
    .footer__sns-link img { width: 24px; height: 24px; }
    .footer__branch { gap: 20px; padding: 8px 14px; font-size: 14px; }
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 28px; }
    .hero p  { font-size: 14px; }
}

/* =========================================================
   섹션 1 — 히어로 슬라이더
   ========================================================= */
/* PC/모바일 슬라이더 토글 — 슬라이드를 디바이스별로 따로 등록 */
.hero-slider--mobile { display: none; }
@media (max-width: 768px) {
    .hero-slider--pc     { display: none; }
    .hero-slider--mobile { display: block; }
}

.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(420px, 50vw, 960px);
    overflow: hidden;
    background: var(--gray-900);
}
.hero-slider__track {
    position: relative;
    width: 100%;
    height: 100%;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}
.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}
.hero-slide__inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    color: var(--white);
}
.hero-slide--right .hero-slide__inner { align-items: flex-end; text-align: right; }
.hero-slide--center .hero-slide__inner { align-items: center; text-align: center; }

.hero-slide__title {
    margin: 0;
    font-weight: 700;
    font-size: clamp(28px, 3.4vw, 50px);
    line-height: 1.4;
    letter-spacing: -1px;
}
.hero-slide__sub {
    margin: 0;
    font-size: clamp(16px, 1.4vw, 22px);
    line-height: 1.6;
    letter-spacing: -0.44px;
    opacity: .9;
}

.hero-slide__badges {
    position: absolute;
    top: 55%;
    right: 40%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hero-badge {
    display: flex;
    align-items: center;
    width: 224px;
}
.hero-badge__body {
    flex: 1;
    height: 46px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--white);
    font-size: 22px;
    line-height: 1.6;
    letter-spacing: -0.44px;
}
.hero-badge__text { font-weight: 400; }
.hero-badge__role { font-weight: 400; }
.hero-badge__name { font-weight: 700; font-size: 30px; letter-spacing: -0.6px; }
.hero-badge__bar { width: 4px; height: 46px; background: var(--white); }

/* 좌우 화살표 — 퀵바(우측 floating)와 겹치지 않게 우측은 더 안쪽 */
.hero-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, .85);
    color: var(--gray-900);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 6;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    transition: background .15s ease, transform .15s ease;
}
.hero-slider__nav:hover { background: #fff; }
.hero-slider__nav:active { transform: translateY(-50%) scale(.96); }
.hero-slider__nav--prev { left: 200px; }    /* 우측과 동일 대칭 여백 */
.hero-slider__nav--next { right: 200px; }   /* 퀵바(우측 ~148px) 영역 피함 */
@media (max-width: 1280px) {
    .hero-slider__nav { width: 48px; height: 48px; }
    .hero-slider__nav--prev { left: 140px; }
    .hero-slider__nav--next { right: 140px; }
}
@media (max-width: 1024px) {
    .hero-slider__nav--prev { left: 120px; }
    .hero-slider__nav--next { right: 120px; }
}
@media (max-width: 768px) {
    /* 모바일은 퀵바가 하단으로 이동 → 양쪽 모두 화면 끝 가까이 */
    .hero-slider__nav { width: 40px; height: 40px; background: rgba(255,255,255,.7); }
    .hero-slider__nav--prev { left: 12px; }
    .hero-slider__nav--next { right: 12px; }
}

.hero-slider__pager {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}
.hero-slider__dot {
    width: 10px; height: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.4);
    transition: width .2s ease, background .2s ease;
}
.hero-slider__dot.is-active {
    width: 28px;
    background: var(--white);
}

/* =========================================================
   하단 고정 — 빠른 상담 신청
   ========================================================= */
.consult-bar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    width: min(1740px, calc(100vw - 80px));
    z-index: 80;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.1));
    display: flex;
    flex-direction: column;
    align-items: center;
}
.consult-bar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 200px;
    padding: 10px 20px;
    background: var(--brand-primary-500);
    color: var(--white);
    border-radius: 8px 8px 0 0;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
}
.consult-bar__chevron {
    display: inline-flex;
    width: 20px; height: 20px;
    transition: transform .3s ease;
}
.consult-bar__chevron img { width: 100%; height: 100%; filter: brightness(0) invert(1); }
.consult-bar[data-collapsed="true"] .consult-bar__chevron { transform: rotate(180deg); }
.consult-bar[data-collapsed="true"] .consult-bar__body { display: none; }
.consult-bar[data-collapsed="true"] .consult-bar__toggle-label::before { content: "펼치기"; }
.consult-bar[data-collapsed="true"] .consult-bar__toggle-label { font-size: 0; }
.consult-bar[data-collapsed="true"] .consult-bar__toggle-label::before { font-size: 16px; }

.consult-bar__body {
    width: 100%;
    min-height: 100px;
    background: var(--white-70);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border-top-left-radius: 0;
    padding: 12px 50px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}
.consult-bar__fields {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
}
.consult-field {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.consult-field__label {
    font-weight: 700;
    font-size: 18px;
    color: var(--gray-700);
    letter-spacing: -0.36px;
    white-space: nowrap;
}
.consult-field__input,
.consult-field__select select {
    width: 260px;
    height: 53px;
    padding: 0 16px;
    background: var(--white-80);
    border: 2px solid transparent;
    border-radius: 4px;
    font-size: 18px;
    color: var(--gray-800);
    font-family: inherit;
    letter-spacing: -0.36px;
    appearance: none;
    -webkit-appearance: none;
}
.consult-field__input::placeholder { color: var(--gray-500); }
.consult-field__input:focus,
.consult-field__select select:focus {
    outline: none;
    border-color: var(--brand-primary-400);
}
.consult-field__select { position: relative; }
.consult-field__caret {
    position: absolute;
    right: 15px;
    top: 50%;
    width: 24px; height: 24px;
    transform: translateY(-50%);
    pointer-events: none;
}
.consult-field__caret img { width: 100%; height: 100%; }

.consult-agree {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 15px;
    color: var(--gray-500);
    line-height: 1.4;
    letter-spacing: -0.3px;
    cursor: pointer;
}
.consult-agree input { margin-top: 3px; width: 13px; height: 13px; accent-color: var(--brand-primary-500); }
.consult-agree a { color: var(--gray-500); text-decoration: underline; }

.consult-bar__submit {
    width: 300px;
    height: 76px;
    background: var(--gray-800);
    color: var(--white);
    border-radius: 8px;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
    transition: background .15s ease;
}
.consult-bar__submit:hover { background: #111; }

/* =========================================================
   우측 고정 — 퀵링크 + TOP
   ========================================================= */
.quick-links {
    position: fixed;
    right: 40px;
    bottom: 80px;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 12px;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.1));
}
.quick-links__list {
    width: 108px;
    background: var(--white);
    border-radius: 8px;
    padding: 20px 4px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.quick-links__item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.quick-links__icon {
    width: 70px; height: 70px;
    border-radius: 9999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.quick-links__icon img { width: 80%; height: 80%; object-fit: contain; }
/* 3·4번 항목(이미 원형으로 디자인된 로고) — 원에 가득 contain, 배경 없이 */
.quick-links__item:nth-child(3) .quick-links__icon,
.quick-links__item:nth-child(4) .quick-links__icon { background: transparent !important; }
.quick-links__item:nth-child(3) .quick-links__icon img,
.quick-links__item:nth-child(4) .quick-links__icon img { width: 100%; height: 100%; object-fit: contain; }
.quick-menu__item:nth-child(3)  .quick-menu__icon,
.quick-menu__item:nth-child(4)  .quick-menu__icon  { background: transparent !important; }
.quick-menu__item:nth-child(3)  .quick-menu__icon  img,
.quick-menu__item:nth-child(4)  .quick-menu__icon  img { width: 100%; height: 100%; object-fit: contain; }
/* 모바일 펼침 카드에서 다른 항목 img 사이즈(32px)보다 4번이 작아 보이지 않게 — !important로 모바일 셀렉터 위 덮어쓰기 */
@media (max-width: 768px) {
    .quick-menu__item:nth-child(3) .quick-menu__icon,
    .quick-menu__item:nth-child(4) .quick-menu__icon { background: transparent !important; }
    .quick-menu__item:nth-child(3) .quick-menu__icon img,
    .quick-menu__item:nth-child(4) .quick-menu__icon img {
        width: 100% !important;
        height: 100% !important;
    }
}
.quick-links__label {
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.3px;
    color: var(--gray-500);
    text-align: center;
}
.quick-links__item + .quick-links__item {
    position: relative;
}
.quick-links__item + .quick-links__item::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 1px;
    background: #e5e5e5;
}
.quick-links__top {
    width: 108px; height: 108px;
    background: var(--brand-primary-500);
    color: var(--white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .15s ease;
}
.quick-links__top img { width: 24px; height: 24px; filter: brightness(0) invert(1); }
.quick-links__top span { font-size: 15px; line-height: 1.4; letter-spacing: -0.3px; }
.quick-links__top:hover { background: #1d39a8; }

/* =========================================================
   섹션 1 반응형
   ========================================================= */
@media (max-width: 1280px) {
    .hero-slide__inner { padding: 0 80px; }
    .hero-slide__badges { right: 8%; top: 60%; }
    .consult-bar__body { padding: 12px 20px; }
    .consult-bar__fields { gap: 20px; }
    .consult-field__input,
    .consult-field__select select { width: 200px; }
    /* 퀵바: 콘텐츠 침범 줄이고 카드 약간 작게 */
    .quick-links { right: 16px; bottom: 180px; gap: 10px; }
    .quick-links__list { width: 96px; padding: 16px 4px; gap: 16px; }
    .quick-links__icon { width: 60px; height: 60px; }
    .quick-links__label { font-size: 13px; }
    .quick-links__top { width: 96px; height: 96px; }
    .quick-links__top span { font-size: 13px; }
}
@media (max-width: 1024px) {
    .consult-bar__body { grid-template-columns: 1fr; }
    .consult-bar__submit { width: 100%; height: 56px; font-size: 18px; }
    .quick-links { right: 10px; bottom: 160px; }
    .quick-links__list { width: 84px; padding: 12px 3px; gap: 12px; }
    .quick-links__icon { width: 52px; height: 52px; }
    .quick-links__label { font-size: 11.5px; line-height: 1.35; }
    .quick-links__top { width: 84px; height: 84px; }
    .quick-links__top img { width: 20px; height: 20px; }
    .quick-links__top span { font-size: 12px; }
}
@media (max-width: 768px) {
    .hero-slider { height: 480px; min-height: 0; }
    .hero-slide__inner { padding: 0 24px; }
    .hero-slide__badges { display: none; }
    .consult-bar { width: calc(100vw - 16px); bottom: 8px; }
    .consult-bar__toggle { width: 140px; font-size: 14px; }
    .consult-bar__body { padding: 14px; min-height: auto; max-height: 60vh; overflow-y: auto; }
    .consult-bar__fields { gap: 10px; flex-direction: column; align-items: stretch; }
    .consult-field { width: 100%; }
    .consult-field__input,
    .consult-field__select select { flex: 1; width: 100%; }
    .quick-links { right: 8px; bottom: 200px; }
    .quick-links__list { width: 84px; padding: 14px 4px; gap: 14px; }
    .quick-links__icon { width: 52px; height: 52px; }
    .quick-links__label { font-size: 12px; }
    .quick-links__top { width: 84px; height: 84px; }
}

/* =========================================================
   섹션 2 — 의료진
   ========================================================= */
.doctors {
    background: var(--brand-primary-bg);
    padding: 40px var(--container-px) 80px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}
.doctors__viewport {
    position: relative;
    width: 100%;
    max-width: var(--container-max);
}
.doctors__panel {
    display: none;
    grid-template-columns: 600px 1fr;
    gap: 80px;
    align-items: flex-start;
    height: 600px;
}
.doctors__panel.is-active { display: grid; }

.doctors__story {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 20px 0;
}
.doctors__eyebrow {
    margin: 0;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
    color: var(--gray-800);
}
.doctors__headline {
    margin: 0;
    font-weight: 700;
    font-size: 40px;
    line-height: 1.4;
    letter-spacing: -0.8px;
    color: var(--gray-800);
}
/* 헤드라인 강조어 — 모든 섹션 제목/헤딩에서 <span class="is-accent">…</span>로 brand-500 강조 */
.is-accent { color: var(--brand-primary-500); }
.doctors__headline .is-accent { color: var(--brand-primary-500); } /* legacy 호환 */
.doctors__desc {
    margin: 0;
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
    color: var(--gray-700);
}

.doctors__card {
    position: relative;
    height: 660px;
    border-radius: 28px;
    background: linear-gradient(132.17deg, #5478ce 31.4%, #2545c5 100%);
    overflow: hidden;
}
.doctors__card-info {
    position: absolute;
    inset: 20px auto auto 28px;
    width: 492px;
    height: 620px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    z-index: 2;
}
.doctors__specialty {
    margin: 0;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.36px;
    color: var(--white);
}
.doctors__name {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    color: var(--white);
}
.doctors__name strong {
    font-weight: 700;
    font-size: 34px;
    line-height: 1.4;
    letter-spacing: -0.68px;
}
.doctors__name span {
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
}

.doctors__tabs {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}
.doctors__tab {
    padding: 8px 20px;
    border-radius: 9999px;
    background: var(--white);
    color: var(--gray-800);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
    transition: background .15s ease, color .15s ease;
}
.doctors__tab.is-active {
    background: #1d369a;
    color: var(--white);
}

.doctors__details {
    position: relative;
    background: var(--white);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px 36px 24px 24px;
    height: 440px;
    overflow: hidden;
}
.doctors__list {
    margin: 0;
    padding: 0 4px 0 0;
    list-style: none;
    display: none;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.doctors__list::-webkit-scrollbar { width: 0; height: 0; display: none; }
.doctors__list.is-active { display: flex; }
.doctors__list li {
    position: relative;
    padding-left: 14px;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.36px;
    color: var(--gray-700);
}
.doctors__list li::before {
    content: "·";
    position: absolute;
    left: 0;
    color: var(--gray-700);
}
/* 커스텀 스크롤바 (track + thumb) — Figma node 41:867 */
.doctors__scrollbar {
    position: absolute;
    top: 24px;
    right: 18px;
    bottom: 24px;
    width: 3px;
    background: #f5f5f5;
    border-radius: 9999px;
    overflow: hidden;
}
.doctors__scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--brand-primary-500);
    border-radius: 9999px;
    will-change: top, height;
}

.doctors__portrait {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 60%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}
.doctors__portrait img {
    position: absolute;
    bottom: 0;
    right: -40px;
    height: 88%;
    width: auto;
    object-fit: contain;
    object-position: right bottom;
    object-position: bottom right;
}

.doctors__pager {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: var(--gray-800);
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
}
.doctors__nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    transition: opacity .15s ease;
}
.doctors__nav img {
    width: 100%; height: 100%;
    display: block;
}
.doctors__nav--prev img { transform: scaleX(-1); }
.doctors__nav:hover { opacity: .7; }
.doctors__nav:disabled { opacity: .25; cursor: default; }

.doctors__count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
    font-weight: 500;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
    color: var(--gray-800);
    font-variant-numeric: tabular-nums;
}
.doctors__count-current { opacity: 1; }
.doctors__count-dot,
.doctors__count-total   { opacity: .3; }

/* 섹션 2 반응형 */
@media (max-width: 1280px) {
    .doctors { padding: 60px 32px 40px; }
    .doctors__panel { grid-template-columns: 1fr; gap: 40px; height: auto; }
    .doctors__card { min-height: 600px; }
}
@media (max-width: 768px) {
    .doctors { padding: 40px 20px; }
    .doctors__headline { font-size: 28px; }
    .doctors__eyebrow, .doctors__desc { font-size: 16px; }
    .doctors__card { min-height: auto; height: auto; padding-bottom: 320px; }
    .doctors__card-info { position: static; width: auto; height: auto; padding: 28px 20px 0; }
    .doctors__portrait {
        width: 75%;
        max-width: 320px;
        height: 260px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);  /* absolute라 margin:auto가 안 먹어 transform으로 가운데 */
        overflow: hidden;
    }
    .doctors__portrait img {
        width: 100%;
        height: 100%;
        left: 0; right: 0;
        transform: none;
        object-fit: cover;
        object-position: 50% 0%;           /* 머리 잘리지 않게 위쪽 기준 */
    }
    .doctors__details { padding: 18px; height: auto; min-height: 200px; }
    .doctors__list li { font-size: 15px; }
}

/* =========================================================
   섹션 3 — 접이식 논문 배너
   ========================================================= */
.paper-banner {
    width: 100%;
    background: linear-gradient(90deg, #6d84e3 0%, #4260db 100%);
    color: var(--white);
}
.paper-banner__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 18px 24px;
    color: var(--white);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
}
.paper-banner__title { white-space: nowrap; }
/* 닫힘/열림에 따라 안 두 span 중 하나만 노출 */
.paper-banner__title--open  { display: none; }
.paper-banner[data-open="true"] .paper-banner__title--closed { display: none; }
.paper-banner[data-open="true"] .paper-banner__title--open   { display: inline; white-space: normal; line-height: 1.4; }
.paper-banner__caret {
    display: inline-flex;
    width: 16px; height: 16px;
    transition: transform .3s ease;
}
.paper-banner__caret img {
    width: 100%; height: 100%;
    filter: brightness(0) invert(1);
    transform: rotate(180deg); /* 닫힘 = 아래쪽 화살표 */
    transition: transform .3s ease;
}
.paper-banner[data-open="true"] .paper-banner__caret img {
    transform: rotate(0deg);
}

/* papers 섹션 부드러운 collapse — main.js가 .is-collapsed 토글 */
#papers-panel {
    overflow: hidden;
    transition: max-height .45s ease, opacity .25s ease,
                padding-top .35s ease, padding-bottom .35s ease;
    max-height: 4000px;
    opacity: 1;
}
#papers-panel.is-collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.paper-banner__panel {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.paper-banner__panel[hidden] { display: none; }
.paper-banner__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 24px var(--container-px);
}
.paper-banner__empty {
    margin: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
    line-height: 1.6;
}
.paper-banner__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.paper-banner__list li {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: var(--white);
}
.paper-banner__list li strong {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.4;
}
.paper-banner__list li span {
    font-size: 14px;
    line-height: 1.4;
    opacity: .8;
}
.paper-banner__list li a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--white);
}

@media (max-width: 1280px) {
    .paper-banner__inner { padding: 24px 32px; }
}
@media (max-width: 640px) {
    .paper-banner__toggle { font-size: 16px; padding: 14px 16px; }
    .paper-banner__inner { padding: 18px 16px; }
}

/* =========================================================
   섹션 — 조일식 원장 연구 논문
   ========================================================= */
.papers {
    background: var(--white);
    padding: 100px var(--container-px);
    display: flex;
    flex-direction: column;
    gap: 60px;
}
.papers__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
}
.papers__title {
    margin: 0;
    color: var(--brand-primary-500);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.4;
    letter-spacing: -0.8px;
}
.papers__nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.papers__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--brand-primary-bg);
    color: var(--brand-primary-500);
    transition: background .15s ease, opacity .15s ease;
}
.papers__nav-btn img {
    width: 16px;
    height: 16px;
    filter: var(--filter-brand-500);
    transition: filter .15s ease;
}
.papers__nav-btn--prev img { transform: rotate(180deg); }
.papers__nav-btn:not(:disabled):hover,
.papers__nav-btn:not(:disabled):focus-visible {
    background: var(--brand-primary-500);
    outline: none;
}
.papers__nav-btn:not(:disabled):hover img,
.papers__nav-btn:not(:disabled):focus-visible img {
    filter: var(--filter-white);
}
.papers__nav-btn:disabled {
    cursor: default;
    opacity: .45;
}

.papers__viewport {
    position: relative;
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
}
.papers__page {
    display: none;
    flex-direction: column;
    gap: 40px;
}
.papers__page.is-active { display: flex; }
.papers__row {
    display: flex;
    gap: 13px;
    align-items: stretch;
    justify-content: flex-start;
}
.papers__row > .paper-card {
    /* 카드 한 줄이 1~2개여도 3등분 기준 폭 유지 (마지막 페이지 와이드 방지) */
    flex: 0 0 calc((100% - 13px * 2) / 3);
    min-width: 0;
}

.paper-card {
    background: var(--brand-primary-bg);
    border-radius: 12px;
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow: hidden;
}
.paper-card__top {
    display: flex;
    flex-direction: column;
    gap: 21px;
    flex: 1;
}
.paper-card__no {
    align-self: flex-start;       /* 부모 flex stretch 방지 */
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    width: max-content;           /* 한 자리=36px, 두 자리 이상은 자연 폭 */
    height: 22px;
    padding: 0 8px;
    border-radius: 9999px;
    background: var(--brand-primary-300);
    color: var(--white);
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
}
.paper-card__title {
    margin: 0;
    color: var(--gray-800);
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    word-break: keep-all;
}
.paper-card__foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.paper-card__line {
    width: 100%;
    height: 0;
    border: 0;
    border-top: 1px solid var(--brand-primary-100);
    margin: 0;
}
.paper-card__cite {
    margin: 0;
    color: var(--brand-primary-300);
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
}

/* 반응형 */
@media (max-width: 1280px) {
    .papers { padding: 80px 32px; gap: 40px; }
}
@media (max-width: 1024px) {
    .papers__row { flex-wrap: wrap; }
    .papers__row > .paper-card { flex: 1 1 calc(50% - 7px); }
    .papers__title { font-size: 32px; }
}
@media (max-width: 640px) {
    .papers { padding: 48px 20px; gap: 28px; }
    .papers__page { gap: 16px; }
    .papers__row { gap: 16px; }
    .papers__row > .paper-card { flex: 1 1 100%; }
    .papers__title { font-size: 24px; }
    .papers__nav-btn { width: 40px; height: 40px; }
    .paper-card { padding: 24px 20px; gap: 24px; }
    .paper-card__title { font-size: 16px; }
    .paper-card__cite  { font-size: 13px; }
}

/* =========================================================
   섹션 — 진료안내 (가로 슬라이더)
   ========================================================= */
.services {
    background: var(--white);
    padding: 120px var(--container-px);
    display: flex;
    flex-direction: column;
    gap: 60px;
}
.services__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
}
.services__intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.services__title {
    margin: 0;
    color: var(--brand-primary-500);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.4;
    letter-spacing: -0.8px;
}
.services__sub {
    margin: 0;
    color: var(--gray-700);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
}

.services__nav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.services__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--brand-primary-bg);
    color: var(--brand-primary-500);
    transition: background .15s ease;
}
.services__nav-btn img {
    width: 16px; height: 16px;
    filter: var(--filter-brand-500);
    transition: filter .15s ease;
}
.services__nav-btn--prev img { transform: rotate(180deg); }
.services__nav-btn:not(:disabled):hover,
.services__nav-btn:not(:disabled):focus-visible {
    background: var(--brand-primary-500);
    outline: none;
}
.services__nav-btn:not(:disabled):hover img,
.services__nav-btn:not(:disabled):focus-visible img {
    filter: var(--filter-white);
}
.services__nav-btn:disabled { cursor: default; opacity: .45; }

/* 슬라이더 — viewport는 컨테이너 안에 잘리고, track은 가로로 transform */
.services__viewport {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}
.services__track {
    display: flex;
    gap: 27px;
    transition: transform .35s cubic-bezier(.2,.6,.2,1);
    will-change: transform;
    padding: 0;
    margin: 0;
    list-style: none;
}
.service-card {
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.service-card__image {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--brand-primary-bg);
}
.service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.service-card__title {
    margin: 0;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -0.44px;
    color: var(--gray-800);
    word-break: keep-all;
}

/* 반응형 */
@media (max-width: 1280px) {
    .services { padding: 96px 32px; gap: 40px; }
    .services__viewport { overflow-x: auto; scrollbar-width: none; }
    .services__viewport::-webkit-scrollbar { display: none; }
}
@media (max-width: 768px) {
    .services { padding: 60px 20px; gap: 28px; }
    .services__title { font-size: 20px; white-space: nowrap; word-break: keep-all; }
    .services__sub { font-size: 14px; }
    .service-card { flex: 0 0 280px; }
    .service-card__image { height: 280px; }
    .service-card__title { font-size: 16px; }
    /* 모바일에선 강제 줄바꿈(\n → <br>) 무시하고 폭에 따라 자연 정렬 */
    .service-card__title br { display: none; }
    .services__nav-btn { width: 40px; height: 40px; }
}

/* =========================================================
   섹션 — 게시판 (선한 영향력)
   ========================================================= */
.board {
    background: var(--brand-primary-350);
    padding: 120px var(--container-px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}
.board__head {
    width: 100%;
    max-width: 1021px;
    display: flex;
    justify-content: center;
}
.board__title {
    margin: 0;
    color: var(--white);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.4;
    letter-spacing: -0.8px;
    text-align: center;
    word-break: keep-all;
}

.board__viewport {
    width: 100%;
    max-width: 1280px;     /* 카드 1:1 비율이 너무 커지지 않도록 살짝 좁게 */
    margin: 0 auto;
    overflow: hidden;
}
.board__track {
    display: flex;
    gap: 27px;
    margin: 0;
    padding: 0;
    list-style: none;
    transition: transform .4s cubic-bezier(.2,.6,.2,1);
    will-change: transform;
    justify-content: center;          /* 캐러셀 비활성 시 카드 가운데 정렬 */
}
/* 캐러셀 활성 시에는 좌측에서 시작해야 transform이 정상 동작 */
.board[data-rolling="true"] .board__track { justify-content: flex-start; }
.board-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
    /* 4개씩 한 화면에 보이도록 — gap 27px × 3 */
    flex: 0 0 calc((100% - 27px * 3) / 4);
    min-width: 0;
}
/* 무한 롤링용 복제 카드 — 캐러셀 활성 시에만 노출 */
.board-card.is-clone { display: none; }
.board[data-rolling="true"] .board-card.is-clone { display: flex; }
.board-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.board-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.board-card__image {
    width: 100%;
    aspect-ratio: 1 / 1;     /* 1:1 정사각 */
    background: #f7f7f7;
    overflow: hidden;
}
.board-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.board-card__body {
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}
.board-card__text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.board-card__title {
    margin: 0;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -0.44px;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.board-card__sub,
.board-card__desc {
    margin: 0;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.55;
    letter-spacing: -0.32px;
    color: var(--gray-700);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: keep-all;
}
.board-card__sub { font-weight: 500; }
.board-card__date {
    margin: 0;
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-500);
}

/* 하단 영역: 좌측 빈공간 · 가운데 전체보기 · 우측 nav */
.board__foot {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.board__more {
    grid-column: 2;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 12px 12px 12px 28px;
    background: var(--white);
    color: var(--gray-800);
    border-radius: 9999px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.4;
    letter-spacing: -0.36px;
    transition: background .15s ease, transform .15s ease;
}
.board__more:hover { background: #f4f6fb; }
.board__more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 9999px;
    background: var(--brand-primary-bg);
    color: var(--brand-primary-500);
}
.board__more-icon img {
    width: 16px; height: 16px;
    filter: var(--filter-brand-500);
}

.board__nav {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.board__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.22);
    transition: background .15s ease, opacity .15s ease;
}
.board__nav-btn img {
    width: 16px; height: 16px;
    filter: var(--filter-white);
    transition: filter .15s ease;
}
.board__nav-btn--prev img { transform: rotate(180deg); }
.board__nav-btn:not(:disabled):hover,
.board__nav-btn:not(:disabled):focus-visible {
    background: var(--white);
    outline: none;
}
.board__nav-btn:not(:disabled):hover img,
.board__nav-btn:not(:disabled):focus-visible img {
    filter: var(--filter-brand-500);
}
.board__nav-btn:disabled {
    cursor: default;
    opacity: .55;
}

/* 반응형 — 좌우 패딩은 --container-px 토큰이 처리, 여기는 상하/세부만 */
@media (max-width: 1700px) {
    .board { padding-top: 100px; padding-bottom: 100px; }
}
@media (max-width: 1280px) {
    .board { padding-top: 80px; padding-bottom: 80px; gap: 40px; }
    .board-card { flex: 0 0 calc((100% - 24px) / 2); } /* 2개씩 */
    .board__track { gap: 24px; }
    .board__title { font-size: 28px; }
}
@media (max-width: 640px) {
    .board { padding-top: 60px; padding-bottom: 60px; gap: 28px; }
    .board__title { font-size: 22px; }
    .board-card { flex: 0 0 100%; } /* 1개씩 */
    .board__track { gap: 16px; }
    .board__foot { grid-template-columns: 1fr; gap: 16px; }
    .board__more { grid-column: 1; }
    .board__nav { grid-column: 1; justify-self: center; }
    /* 모바일 공지 카드 이미지: 1:1 정사각형 */
    .board-card__image { aspect-ratio: 1 / 1; height: auto; }
    .board-card__body { padding: 20px 18px; gap: 14px; }
    .board-card__title { font-size: 18px; }
    .board-card__desc { font-size: 14px; }
}

/* =========================================================
   섹션 — 병원둘러보기 (중앙 강조 슬라이더)
   ========================================================= */
.tour {
    background: var(--white);
    padding: 120px var(--container-px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}
.tour__head {
    width: 100%;
    max-width: var(--container-max);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tour__title {
    margin: 0;
    color: var(--brand-primary-500);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.4;
    letter-spacing: -0.8px;
    white-space: nowrap;
}
.tour__sub {
    margin: 0;
    color: var(--gray-700);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
}

/* viewport: 1600폭, 중앙 카드는 920×540, 양쪽은 흐림 */
.tour__viewport {
    position: relative;
    width: 100%;
    max-width: var(--container-max);
    height: 540px;
    overflow: hidden;
}
.tour__track {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: transform .4s cubic-bezier(.2,.6,.2,1);
    will-change: transform;
}
.tour-slide {
    flex: 0 0 920px;
    height: 540px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4f4f4;
    opacity: 0.2;
    transition: opacity .4s ease;
}
.tour-slide.is-active { opacity: 1; }
.tour-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* pager: 진행바 + 페이지 수 + 좌/우 버튼 */
.tour__pager {
    width: 100%;
    max-width: var(--container-max);
    height: 48px;
    display: flex;
    align-items: center;
    gap: 40px;
}
.tour__progress {
    flex: 1 0 0;
    min-width: 0;
    height: 3px;
    background: #f5f5f5;
    overflow: visible;
    position: relative;
}
.tour__progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    width: 60px;
    background: var(--brand-primary-500);
    transform: translateY(-50%);
    transition: width .35s ease, left .35s ease;
}

.tour__controls {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-shrink: 0;
}
.tour__nums {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: #d4d4d4;
    font-variant-numeric: tabular-nums;
}
.tour__num.is-current { color: var(--gray-800); }
.tour__num-sep { color: #d4d4d4; }

.tour__nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tour__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #f5f5f5;
    transition: background .15s ease;
}
.tour__nav-btn img {
    width: 20px;
    height: 20px;
    transition: filter .15s ease;
}
.tour__nav-btn--prev img { transform: scaleX(-1); }
.tour__nav-btn:not(:disabled):hover,
.tour__nav-btn:not(:disabled):focus-visible,
.tour__nav-btn:not(:disabled):active {
    background: var(--brand-primary-500);
    outline: none;
}
.tour__nav-btn:not(:disabled):hover img,
.tour__nav-btn:not(:disabled):focus-visible img,
.tour__nav-btn:not(:disabled):active img {
    filter: var(--filter-white);
}
.tour__nav-btn:disabled { opacity: .4; cursor: default; }

/* 반응형 */
@media (max-width: 1280px) {
    .tour { padding: 96px 32px; gap: 40px; }
    .tour__viewport { height: clamp(280px, 35vw, 540px); }
    .tour-slide { flex-basis: clamp(420px, 60vw, 920px); height: 100%; }
}
@media (max-width: 768px) {
    .tour { padding: 60px 20px; gap: 28px; }
    .tour__title { font-size: 24px; white-space: normal; }
    .tour__sub { font-size: 14px; }
    .tour__viewport { height: 260px; }
    .tour-slide { flex-basis: 88vw; }
    .tour__pager { gap: 16px; }
    .tour__controls { gap: 16px; }
    .tour__nav-btn { width: 40px; height: 40px; }
}

/* =========================================================
   섹션 — 오시는 길 / 진료시간
   ========================================================= */
.location {
    background: var(--brand-primary-bg);
    padding: 120px var(--container-px);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

/* ── 좌측 ───────────────────────────── */
.location__hours {
    width: 660px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 48px;
}
.location__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.location__title {
    margin: 0;
    color: var(--brand-primary-500);
    font-weight: 700;
    font-size: 40px;
    line-height: 1.4;
    letter-spacing: -0.8px;
}
.location__sub {
    margin: 0;
    color: var(--gray-700);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
}

.location__hours-box {
    display: flex;
    flex-direction: column;
}
.location__hours-list {
    list-style: none;
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-800);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.location__hour {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--gray-800);
}
.location__hour-day {
    width: 120px;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -0.44px;
    white-space: nowrap;
}
.location__hour-time {
    font-family: "Pretendard Variable", "Pretendard", var(--font-sans);
    font-weight: 400;
    font-size: 22px;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
}
.location__hour-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 12px;
    background: var(--gray-700);
    color: var(--white);
    border-radius: 9999px;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.32px;
}

.location__notes {
    list-style: none;
    margin: 0;
    padding: 23px 20px;
    border-top: 1px solid var(--gray-400);
    display: flex;
    flex-direction: column;
    gap: 0;
    color: var(--brand-primary-400);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.36px;
}

.location__contact {
    display: flex;
    gap: 10px;
}
.location__btn {
    flex: 1 1 0;
    min-width: 0;
    height: 80px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--white);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.4;
    letter-spacing: -0.44px;
    transition: opacity .15s ease;
}
.location__btn img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}
.location__btn--phone { background: var(--brand-primary-500); }
.location__btn--kakao { background: var(--gray-800); }
.location__btn--kakao img { width: 32px; height: 32px; }
.location__btn:hover { opacity: .92; }

/* ── 우측 ───────────────────────────── */
.location__address {
    width: 794px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.location__address-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.location__address-main {
    margin: 0;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 28px;
    line-height: 1.4;
    letter-spacing: -0.56px;
}
.location__address-sub {
    margin: 0;
    color: var(--gray-700);
    font-weight: 400;
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -0.4px;
}
.location__map {
    width: 100%;
    aspect-ratio: 640 / 360;
    min-height: 360px;
    border-radius: 20px;
    overflow: hidden;
    background: #f4f4f4;
}
.location__map img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    display: block;
}
/* 카카오 약도 — JS가 부모 폭에 맞춰 mapWidth/mapHeight를 동적 전달.
   주입된 마크업 안 모든 요소를 부모 폭 100%로 강제. */
.location__map .root_daum_roughmap,
.location__map .root_daum_roughmap_landing,
.location__map .root_daum_roughmap > div,
.location__map .root_daum_roughmap iframe {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    border-radius: 20px;
}
.location__map iframe { border: 0; }

.location__transport {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.location__transport li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
}
.location__transport-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 4px 18px;
    border-radius: 9999px;
    background: var(--brand-primary-100);
    color: var(--brand-primary-500);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.6;
    letter-spacing: -0.32px;
    flex-shrink: 0;
}
.location__transport-desc {
    color: var(--brand-primary-400);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.6;
    letter-spacing: -0.36px;
}

/* ── 반응형 ───────────────────────────── */
@media (max-width: 1600px) {
    .location { padding: 100px 60px; }
    .location__hours, .location__address { width: auto; flex: 1 1 0; min-width: 0; }
}
@media (max-width: 1024px) {
    .location { flex-direction: column; padding: 80px 32px; gap: 48px; }
    .location__hours, .location__address { width: 100%; flex: none; }
    .location__title { font-size: 28px; }
    .location__address-main { font-size: 22px; }
    .location__map { aspect-ratio: auto; height: 360px; min-height: 0; }
}
@media (max-width: 640px) {
    .location { padding: 60px 20px; gap: 36px; }
    .location__title { font-size: 22px; }
    .location__sub { font-size: 14px; }
    .location__hour-day { width: 90px; font-size: 16px; }
    .location__hour-time { font-size: 16px; }
    .location__hour-badge { font-size: 12px; padding: 2px 8px; }
    .location__notes { font-size: 14px; }
    .location__btn { height: 64px; font-size: 16px; }
    .location__btn img { width: 22px; height: 22px; }
    .location__btn--kakao img { width: 24px; height: 24px; }
    .location__address-main { font-size: 18px; }
    .location__address-sub { font-size: 14px; }
    .location__map { aspect-ratio: auto; height: 260px; min-height: 0; }
    .location__transport li {
        gap: 10px;
        padding: 0 4px;
        flex-wrap: nowrap;             /* 줄바꿈 금지: 라벨 옆에 설명 유지 */
        align-items: flex-start;
    }
    .location__transport-tag {
        min-width: 0;
        font-size: 12px;
        padding: 2px 10px;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .location__transport-desc {
        font-size: 13px;
        flex: 1 1 auto;
        min-width: 0;
        line-height: 1.55;
        word-break: keep-all;
    }
}

/* =========================================================
   모바일 종합 보정 (≤768)
   ========================================================= */
@media (max-width: 768px) {
    /* tour: 슬라이드를 viewport 폭에 가깝게 */
    .tour__viewport { height: 240px; }
    .tour-slide { flex-basis: 88vw; height: 240px; }

    /* 데스크탑 GNB 메뉴 숨기고 햄버거만 (이미 적용됨, 보강) */
    .gnb__nav { display: none; }

    /* 의료진 카드 모바일 정리 */
    .doctors__card { padding-bottom: 220px; }
    .doctors__portrait {
        width: 75%;
        max-width: 260px;
        height: 220px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        overflow: hidden;
    }
    .doctors__portrait img {
        width: 100%;
        height: 100%;
        left: 0; right: 0;
        transform: none;
        object-fit: cover;
        object-position: 50% 0%;
    }
    .doctors__details { height: auto; min-height: 180px; }

    /* 진료안내 카드 모바일 사이즈 */
    .service-card { flex: 0 0 78vw; }
    .service-card__image { height: 78vw; max-height: 320px; }

    /* 게시판/논문에서 한 줄이 너무 길어지지 않게 */
    .board__cards { gap: 14px; }

    /* 진료시간 라벨 영역 좁게 */
    .location__hour-day { width: 90px; }

    /* 푸터 SNS만 보이고 다른 지점 줄바꿈 */
    .footer__sns { flex-wrap: wrap; }
    .footer__branch { width: 100%; justify-content: space-between; }
}

/* 모바일에서 quick-links + TOP을 하나의 컴팩트 그룹으로 */
@media (max-width: 640px) {
    .hero-slider { height: 420px; }
    .hero-slide__title { font-size: 22px; }
    .hero-slide__sub { font-size: 13px; }

    /* quick-links 전체 가운데 정리 */
    .quick-links { right: 6px; bottom: 180px; gap: 8px; }
    .quick-links__list { width: 64px; padding: 10px 4px; gap: 10px; }
    .quick-links__icon { width: 40px; height: 40px; }
    .quick-links__label { font-size: 10px; line-height: 1.3; }
    .quick-links__top { width: 64px; height: 64px; }
    .quick-links__top img { width: 18px; height: 18px; }
    .quick-links__top span { font-size: 12px; }

    /* consult-bar 더 컴팩트 */
    .consult-bar__toggle { width: 120px; height: 32px; padding: 6px 16px; }
    .consult-bar__submit { height: 48px; font-size: 16px; }

    .doctors__card-info { padding: 24px 16px 0; }
    .doctors__details { padding: 16px 14px; }
}

/* =========================================================
   햄버거 드로어 메뉴 (모바일)
   ========================================================= */
.mnav {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}
.mnav[data-open="true"] { display: block; }
.mnav__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    animation: mnavFade .2s ease;
}
.mnav__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 86vw);
    background: var(--white);
    box-shadow: -8px 0 24px rgba(0,0,0,.1);
    padding: 24px 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: mnavSlide .25s ease;
    overflow-y: auto;
}
.mnav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mnav__close {
    width: 32px; height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: var(--gray-800);
}
.mnav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.mnav__list a {
    display: block;
    padding: 16px 4px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--gray-800);
    border-bottom: 1px solid #f0f0f0;
}
.mnav__list a:hover,
.mnav__list a.is-active { color: var(--brand-primary-500); font-weight: 700; }

@keyframes mnavSlide { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes mnavFade  { from { opacity: 0; } to { opacity: 1; } }

/* =========================================================
   모바일 퀵바 (≤768) — 화면 하단 floating + 펼침 카드
   ========================================================= */
.quick-bar, .quick-menu { display: none; }

@media (max-width: 768px) {
    /* 데스크탑 우측 수직 카드 숨김 */
    .quick-links { display: none; }

    /* 하단 floating bar */
    .quick-bar {
        display: flex;
        gap: 8px;
        position: fixed;
        left: 12px; right: 12px; bottom: 12px;
        z-index: 90;
    }
    .quick-bar__btn {
        flex: 1 1 0;
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        height: 56px;
        padding: 0 14px;
        background: var(--white);
        color: var(--gray-800);
        border: 1px solid #e3e6ee;
        border-radius: 14px;
        font-weight: 700;
        font-size: 15px;
        letter-spacing: -.3px;
        box-shadow: 0 10px 24px rgba(13,20,48,.12);
        cursor: pointer;
    }
    .quick-bar__btn--consult {
        background: var(--brand-primary-500);
        color: var(--white);
        border-color: var(--brand-primary-500);
    }
    .quick-bar__btn--consult img { filter: brightness(0) invert(1); width: 22px; height: 22px; }
    .quick-bar__icon {
        width: 26px; height: 26px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 26px;
    }
    .quick-bar__icon img { width: 18px; height: 18px; }

    /* 펼침 카드 */
    .quick-menu {
        display: none;
        position: fixed;
        left: 12px; right: 12px; bottom: 12px;
        z-index: 95;
        background: var(--white);
        border-radius: 18px;
        padding: 44px 20px 16px;
        box-shadow: 0 20px 40px rgba(13,20,48,.22);
    }
    .quick-menu[data-open="true"] { display: block; }
    body.quick-menu-open .quick-bar { display: none; }
    /* 펼침 카드 안 하단 "퀵 메뉴 바로가기" 버튼도 메뉴 열림 시 숨김 */
    .quick-menu[data-open="true"] .quick-menu__foot { display: none; }

    .quick-menu__close {
        position: absolute;
        top: 12px; right: 12px;
        background: var(--gray-800);
        color: var(--white);
        padding: 6px 14px;
        border-radius: 9999px;
        font-size: 12px;
        font-weight: 600;
        border: 0;
        cursor: pointer;
    }
    .quick-menu__list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin: 0 0 14px;
        padding: 0;
        list-style: none;
    }
    .quick-menu__item a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 8px 2px;
        text-decoration: none;
        color: var(--gray-800);
    }
    .quick-menu__icon {
        width: 56px; height: 56px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .quick-menu__icon img { width: 32px; height: 32px; }
    .quick-menu__label {
        font-size: 12px;
        line-height: 1.35;
        font-weight: 500;
        text-align: center;
        color: var(--gray-700);
        word-break: keep-all;
        display: block;          /* 잘리지 않고 모든 줄 표시 */
    }

    .quick-menu__foot {
        display: flex;
        gap: 8px;
    }
    .quick-menu__cta {
        flex: 1 1 0;
        height: 56px;
        padding: 0 14px;
        background: var(--white);
        color: var(--gray-800);
        border: 1px solid #e3e6ee;
        border-radius: 14px;
        font-weight: 700;
        font-size: 15px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        cursor: pointer;
    }
    .quick-menu__cta--consult {
        background: var(--brand-primary-500);
        color: var(--white);
        border-color: var(--brand-primary-500);
    }
    .quick-menu__cta--consult img { filter: brightness(0) invert(1); width: 22px; height: 22px; }
}

/* =========================================================
   게시판 리스트 페이지 (/board.php)
   ========================================================= */
.board-list {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 80px var(--container-px) 120px;
}
.board-list__head {
    text-align: center;
    margin-bottom: 56px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.board-list__eyebrow {
    margin: 0;
    color: var(--brand-primary-500);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .12em;
}
.board-list__title {
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--gray-900);
}
.board-list__sub {
    margin: 4px 0 0;
    color: var(--gray-500);
    font-size: 16px;
}
.board-list__cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 27px;
}
.board-list__empty {
    padding: 80px 24px;
    text-align: center;
    color: var(--gray-500);
    background: #f5f6fa;
    border-radius: 16px;
}
.board-list__pager {
    margin-top: 56px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.board-list__pgr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #e6e9ef;
    background: #fff;
    color: var(--gray-700);
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.board-list__pgr:hover { background: var(--brand-primary-bg); color: var(--brand-primary-500); }
.board-list__pgr.is-active {
    background: var(--brand-primary-500);
    border-color: var(--brand-primary-500);
    color: #fff;
}
.board-list__pgr.is-disabled { opacity: .4; pointer-events: none; }

@media (max-width: 1280px) {
    .board-list__cards { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .board-list__title { font-size: 32px; }
}
@media (max-width: 640px) {
    .board-list { padding: 56px 20px 80px; }
    .board-list__cards { grid-template-columns: 1fr; gap: 16px; }
    .board-list__title { font-size: 24px; }
    .board-list__sub   { font-size: 14px; }
}

/* =========================================================
   게시판 상세 페이지 (/board-view.php)
   ========================================================= */
.board-view {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px var(--container-px) 120px;
}

/* breadcrumb */
.board-view__crumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 28px;
}
.board-view__crumb a {
    color: var(--gray-500);
    text-decoration: none;
    transition: color .15s ease;
}
.board-view__crumb a:hover { color: var(--brand-primary-500); }
.board-view__crumb .sep { color: #cbd1de; }
.board-view__crumb .cur { color: var(--gray-900); font-weight: 600; }

/* head */
.board-view__head {
    text-align: center;
    padding-bottom: 28px;
    border-bottom: 1px solid #e6e9ef;
    margin-bottom: 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.board-view__eyebrow {
    margin: 0;
    color: var(--brand-primary-500);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .18em;
}
.board-view__title {
    margin: 0;
    font-size: 38px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.02em;
    line-height: 1.3;
    word-break: keep-all;
}
.board-view__subtitle {
    margin: 0;
    color: var(--gray-500);
    font-size: 18px;
    line-height: 1.55;
    font-weight: 400;
    word-break: keep-all;
}
.board-view__meta {
    margin-top: 4px;
    display: flex;
    justify-content: center;
    gap: 16px;
}
.board-view__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--brand-primary-bg);
    color: var(--brand-primary-500);
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
}
.board-view__date svg { stroke: currentColor; }

/* hero image */
.board-view__hero {
    margin: 0 0 36px;
    border-radius: 18px;
    overflow: hidden;
    background: #f4f5f8;
    box-shadow: 0 16px 40px rgba(13,20,48,.06);
}
.board-view__hero img { width: 100%; height: auto; display: block; }

/* lead (요약) */
.board-view__lead {
    margin: 0 0 28px;
    padding: 20px 24px;
    background: #f7f9fc;
    border-left: 4px solid var(--brand-primary-500);
    border-radius: 4px 12px 12px 4px;
    color: var(--gray-700);
    font-size: 16px;
    line-height: 1.7;
    word-break: keep-all;
}

/* body */
.board-view__body {
    font-size: 17px;
    line-height: 1.9;
    color: var(--gray-800);
    min-height: 120px;
    word-break: keep-all;
}

/* external link */
.board-view__link {
    margin-top: 32px;
    padding: 16px 20px;
    background: #f7f9fc;
    border-radius: 10px;
    text-align: center;
}
.board-view__link a {
    color: var(--brand-primary-500);
    font-weight: 700;
    text-decoration: none;
}
.board-view__link a:hover { text-decoration: underline; }

/* prev/next siblings */
.board-view__siblings {
    margin-top: 60px;
    border-top: 1px solid #e6e9ef;
    border-bottom: 1px solid #e6e9ef;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.board-view__sibling {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px;
    text-decoration: none;
    color: var(--gray-700);
    transition: background .15s ease;
}
.board-view__sibling:hover { background: var(--brand-primary-bg); }
.board-view__sibling:first-child { border-right: 1px solid #e6e9ef; }
.board-view__sibling + .board-view__sibling { text-align: right; align-items: flex-end; }
.board-view__sibling .dir {
    font-size: 12px;
    color: var(--brand-primary-500);
    font-weight: 700;
    letter-spacing: .04em;
}
.board-view__sibling .ttl {
    font-size: 15px;
    color: var(--gray-900);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.board-view__sibling.is-disabled { pointer-events: none; opacity: .45; }

/* foot back */
.board-view__foot {
    margin-top: 36px;
    text-align: center;
}
.board-view__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 36px;
    background: var(--brand-primary-500);
    color: #fff;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: background .15s ease, transform .1s ease;
    box-shadow: 0 8px 20px rgba(37,64,163,.25);
}
.board-view__back:hover { background: var(--brand-primary-600); transform: translateY(-1px); }

.board-view__missing { text-align: center; padding: 80px 20px; color: var(--gray-500); }
.board-view__missing h1 { font-size: 22px; color: var(--gray-800); margin: 0 0 8px; }

@media (max-width: 768px) {
    .board-view { padding: 40px 20px 80px; }
    .board-view__title { font-size: 26px; }
    .board-view__subtitle { font-size: 15px; }
    .board-view__hero { border-radius: 12px; margin-bottom: 28px; }
    .board-view__body  { font-size: 15px; line-height: 1.8; }
    .board-view__lead  { font-size: 14px; padding: 16px 18px; }
    .board-view__siblings { grid-template-columns: 1fr; }
    .board-view__sibling:first-child { border-right: 0; border-bottom: 1px solid #e6e9ef; }
    .board-view__sibling + .board-view__sibling { text-align: left; align-items: flex-start; }
}

/* =========================================================
   푸터 약관 모달
   ========================================================= */
.footer__legal-btn {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color .15s ease;
}
.footer__legal-btn:hover { color: var(--gray-400); }

.policy-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.policy-modal[hidden] { display: none !important; }

.policy-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}
.policy-modal__card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    width: 100%;
    max-width: 760px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
}
.policy-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 18px;
    border-bottom: 1px solid #eef0f5;
    flex-shrink: 0;
}
.policy-modal__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -.02em;
}
.policy-modal__close {
    width: 36px; height: 36px;
    background: none;
    border: 0;
    font-size: 26px;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    line-height: 1;
    transition: background .15s ease;
}
.policy-modal__close:hover { background: #f4f5f8; color: #111; }

.policy-modal__body {
    padding: 24px 28px 32px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.75;
    color: var(--gray-700);
    font-size: 15px;
    word-break: keep-all;
}
.policy-modal__meta { font-size: 13px; color: #888; margin: 0 0 18px; }
.policy-modal__note { font-size: 13px; color: #6b7280; margin: 8px 0 16px; }
.policy-modal__body h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef0f5;
}
.policy-modal__body h3:first-child { margin-top: 0; }
.policy-modal__body p { margin: 0 0 10px; }
.policy-modal__body ul {
    margin: 6px 0 14px;
    padding-left: 22px;
    list-style: disc;
}
.policy-modal__body li { margin-bottom: 4px; }
.policy-modal__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 12px;
    font-size: 14px;
}
.policy-modal__body th,
.policy-modal__body td {
    padding: 10px 12px;
    border: 1px solid #e6e9ef;
    text-align: left;
    vertical-align: top;
}
.policy-modal__body th {
    background: #f7f8fb;
    font-weight: 700;
    color: var(--gray-800);
}

body.no-scroll { overflow: hidden; }

@media (max-width: 640px) {
    .policy-modal { padding: 12px; }
    .policy-modal__card { max-height: 92vh; border-radius: 14px; }
    .policy-modal__header { padding: 18px 20px 14px; }
    .policy-modal__title { font-size: 18px; }
    .policy-modal__body { padding: 18px 20px 24px; font-size: 14px; }
    .policy-modal__body table { font-size: 13px; }
    .policy-modal__body th, .policy-modal__body td { padding: 8px 10px; }
}

/* =========================================================
   최상단 알림 띠 (topbar)
   ========================================================= */
.topbar {
    background: var(--brand-primary-500);
    color: var(--white);
    padding: 13px var(--container-px);
}
.topbar[hidden] { display: none; }
.topbar__inner {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;                /* 마키 영역 클리핑 */
}
.topbar__track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
}
.topbar__text {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -.3px;
    padding-right: 60px;             /* 두 복제본 사이 간격 */
    white-space: nowrap;
    font-weight: 500;
}
/* 평소엔 복제본 숨김 + 가운데 정렬 */
.topbar__track > .topbar__text:nth-child(2) { display: none; }
.topbar__track > .topbar__text:first-child  { padding-right: 0; }

/* 폭 부족 시 JS가 .is-marquee 부여 → 두 텍스트 다 노출 + 무한 스크롤 */
.topbar.is-marquee .topbar__inner { justify-content: flex-start; }
.topbar.is-marquee .topbar__track > .topbar__text { display: inline-block; padding-right: 60px; }
.topbar.is-marquee .topbar__track {
    animation: topbar-marquee 16s linear infinite;
}
@keyframes topbar-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }   /* 한 복제본 폭만큼 → 끊김 없이 이어짐 */
}
.topbar.is-marquee:hover .topbar__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .topbar__track { animation: none !important; }
}
.topbar__close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--white);
    border: 0;
    font-size: 22px;
    line-height: 1;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s ease;
}
.topbar__close:hover { background: rgba(255,255,255,.12); }

@media (max-width: 768px) {
    .topbar { padding: 10px var(--container-px); }
    .topbar__text { font-size: 15px; padding-right: 40px; }
    .topbar__close { font-size: 20px; }
}
@media (max-width: 480px) {
    .topbar__text { font-size: 14px; }
}
