/* Shared fluid layout; loaded after the page styles. */
:root {
  --side-padding: clamp(20px, 8.333vw, 160px);
  --content-width: min(1600px, calc(100% - var(--side-padding) * 2));
}

body { min-width: 0; }
/* Full-width sections; inner content containers control readable line lengths. */
#wrapper { width: 100%; max-width: none; }
#wrapper > main { width: 100%; max-width: none; }
/* Clip full-bleed banners at the viewport without changing sticky scrolling. */
.page-sub #wrapper { overflow-x: clip; }
img { max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }
.site-header { padding-inline: clamp(20px, 3.125vw, 120px); }
.site-header .header-inner { gap: 28px; }
.site-header .gnb { flex: 1; min-width: 0; justify-content: center; }
.site-header .gnb-depth1 { width: 100%; justify-content: space-around; gap: 0; }
.site-header .gnb-depth1 > li { flex: 1; min-width: 0; }
.site-header .gnb-depth2 { width: 100%; max-width: none; padding-inline: 8px; }
.site-header .gnb-depth1 > li > a { font-size: clamp(16px, 1.05vw, 20px); }
.site-header .btn-ham { display: none; }
.site-header .header-right { gap: 20px; }
.site-header.is-menu-open .gnb-depth2 { opacity: 1; visibility: visible; pointer-events: auto; }
.site-header.is-menu-open .gnb-bg { height: var(--gnb-panel-height); background: var(--color-white); }
.site-header .gnb-depth2 a { overflow-wrap: anywhere; }
.quick-menu.is-closed .quick-toggle-icon::before { transform: translate(-50%, -50%); }
.quick-menu.is-closed .quick-toggle-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.section-hero { width: calc(100% - clamp(20px, 3.125vw, 120px) * 2); height: clamp(440px, 36vw, 680px); }
.section-hero .hero-text { left: clamp(30px, 5.2vw, 100px); right: 80px; }
.section-hero .hero-title { font-size: clamp(36px, 3.33vw, 64px); }
.section-hero .hero-desc { max-width: 650px; line-height: 1.6; }
.section-hero .hero-rolling { left: clamp(30px, 5.2vw, 100px); bottom: 40px; }
.section-core, .section-checkup { padding-block: clamp(80px, 10.4vw, 200px); }
.section-core .core-grid, .section-checkup .checkup-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.section-core .core-card, .section-checkup .checkup-card { width: auto; min-width: 0; }
.section-core .core-card-thumb { width: 100%; height: auto; aspect-ratio: 382 / 500; }
.section-core .core-card-overlay { padding: 15% 20px; gap: 32px; justify-content: center; }
.section-core .core-overlay-text { font-size: clamp(16px, 1.25vw, 24px); }
.section-core .core-card-title { font-size: clamp(20px, 1.46vw, 28px); }
.section-checkup .checkup-thumb { height: auto; aspect-ratio: 364 / 280; }
.section-checkup .checkup-nhis { left: auto; top: auto; right: 12px; bottom: 12px; width: 32%; height: auto; aspect-ratio: 117 / 40; }
.section-checkup .checkup-title { font-size: clamp(19px, 1.25vw, 24px); }

.section-gastro { height: auto; padding: clamp(80px, 10.4vw, 200px) var(--side-padding); }
.section-gastro .gastro-head { position: relative; inset: auto; width: 100%; gap: 24px; margin: 0 auto 60px; }
.section-gastro .gastro-head-text { width: auto; }
.section-gastro .gastro-nav { flex-shrink: 0; }
.section-gastro .gastro-slider { position: relative; inset: auto; width: 100%; margin-inline: auto; }
.section-gastro .gastro-slide-panel { gap: clamp(24px, 5.2vw, 100px); }
.section-gastro .gastro-slide-img { width: 47%; height: auto; aspect-ratio: 750 / 480; }
.section-gastro .gastro-slide-content { min-width: 0; gap: 32px; }
.section-gastro .gastro-slide-desc { font-size: clamp(16px, 1.05vw, 20px); }
.section-gastro .gastro-slide-desc br { display: none; }
.section-gastro .gastro-slide-side { display: none; }
.section-endo { height: auto; }
.section-endo .endo-inner { padding-top: clamp(80px, 10.4vw, 200px); gap: 60px; }
.section-endo .endo-head { padding-inline: var(--side-padding); }
.section-endo .endo-watermark { left: 10%; top: 24%; width: 80%; height: auto; }
.section-endo .endo-card { width: 20%; min-width: 0; padding-inline: 16px; }
.section-endo .endo-card-title { font-size: clamp(18px, 1.46vw, 28px); }

.site-footer .footer-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.site-footer .footer-col { width: auto; min-width: 0; padding: 60px clamp(24px, 3.125vw, 120px); }
.site-footer .footer-hours-list { width: auto; }
.site-footer .footer-hours-row dd { white-space: nowrap; }
.site-footer .footer-hours-row { gap: 24px; }
.site-footer .footer-phone { font-size: clamp(28px, 2.1vw, 40px); }
.site-footer .footer-links { flex-wrap: wrap; gap: 12px 20px; }
.site-footer .footer-bottom { height: auto; min-height: 100px; padding: 30px clamp(20px, 3.125vw, 120px); }
.site-footer .footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: auto; }
.site-footer .copyright, .site-footer .footer-logo, .site-footer .btn-top { position: static; transform: none; }
.site-footer .copyright { flex: 1; line-height: 1.6; }
.site-footer .footer-logo { flex-shrink: 0; }
.site-footer .btn-top { min-height: 44px; }

.sub-nav { margin-inline: clamp(20px, 3.125vw, 60px); }
.sub-visual-title { font-size: clamp(32px, 3.33vw, 64px); }
.mission-motion-headline { white-space: normal; }
.mission-motion-slogan { font-size: clamp(28px, 3.33vw, 64px); }
.mission-motion-desc { font-size: clamp(16px, 1.5vw, 24px); }
.mission-content { width: var(--content-width); }
.mission-goal-text { font-size: clamp(16px, 1.05vw, 20px); padding: 24px; }

@media (max-width: 1800px) {
  .site-header .location { display: none; }
}

@media (max-width: 1439px) {
  :root { --header-height: 80px; }
  body.is-gnb-open { overflow: hidden; }
  .gnb-overlay { position: fixed; top: var(--header-height); left: 0; z-index: 95; width: 20%; height: calc(100dvh - var(--header-height)); border: 0; margin: 0; padding: 0; background: rgba(18, 28, 45, 0.38); cursor: pointer; }
  .gnb-overlay[hidden] { display: none !important; }
  .site-header .gnb { display: block; position: fixed; top: var(--header-height); right: 0; left: auto; width: 80%; height: calc(100dvh - var(--header-height)); max-height: none; overflow-y: auto; overscroll-behavior: contain; background: var(--color-white); border-top: 0; box-shadow: -12px 0 28px rgba(16, 24, 40, 0.12); transform: translateX(100%); visibility: hidden; pointer-events: none; transition: transform 0.28s ease, visibility 0.28s ease; }
  .site-header.is-menu-open .gnb { visibility: visible; pointer-events: auto; transform: none; }
  .site-header .gnb-depth1 { display: flex; flex-direction: column; gap: 0; height: auto; padding: 8px 0 28px; }
  .site-header .gnb-depth1 > li { height: auto; min-width: 0; border-bottom: 1px solid #e6ebf2; }
  .site-header .gnb-depth1 > li > a { position: relative; width: 100%; min-height: 52px; height: auto; justify-content: space-between; gap: 12px; padding: 14px 22px; color: var(--color-text); font-size: 17px; font-weight: 600; }
  .site-header .gnb-depth1 > li > a span { flex: 1; }
  .site-header .gnb-depth1 > li > a span::after { display: none; }
  .site-header .gnb-depth1 > li > a::after { content: ''; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 0.2s ease; flex-shrink: 0; }
  .site-header .gnb-depth1 > li.is-open > a { color: var(--color-primary); }
  .site-header .gnb-depth1 > li.is-open > a::after { transform: translateY(2px) rotate(225deg); }
  .site-header .gnb-depth2, .site-header.is-menu-open .gnb-depth2 { display: none; position: static; transform: none; width: 100%; max-width: none; max-height: none; overflow: visible; padding: 0 22px 12px 28px; text-align: left; opacity: 1; visibility: visible; pointer-events: auto; transition: none; }
  .site-header .gnb-depth1 > li.is-open > .gnb-depth2 { display: block; }
  .site-header .gnb-depth2 li + li { margin-top: 0; }
  .site-header .gnb-depth2 a { min-height: 42px; padding: 10px 0; font-size: 15px; color: #3d4a5c; }
  .site-header .gnb-bg { display: none; }
  .site-header .btn-ham { display: inline-flex; align-items: center; justify-content: center; position: relative; width: 44px; height: 44px; padding: 10px 6px; }
  .site-header.is-menu-open .btn-ham img { opacity: 0; }
  .site-header.is-menu-open .btn-ham::before, .site-header.is-menu-open .btn-ham::after { content: ''; position: absolute; width: 28px; height: 2px; left: 8px; top: 21px; background: var(--color-text); transform: rotate(45deg); }
  .site-header.is-menu-open .btn-ham::after { transform: rotate(-45deg); }
  .section-title, .mission-section-head .section-title { font-size: 36px; }
  .section-desc { font-size: 18px; }
  .section-core .core-grid, .section-checkup .checkup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  .section-core .core-card-thumb { aspect-ratio: 4 / 3; }
  .section-core .core-card-body { margin-top: 24px; gap: 16px; }
  .section-gastro .gastro-slide-title { font-size: 32px; }
  .section-gastro .gastro-nav button { width: 56px; height: 56px; }
  .section-endo .endo-panel { height: auto; }
  .section-endo .endo-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 var(--side-padding); }
  .section-endo .endo-card { width: auto; min-height: 260px; padding: 28px 16px; border: 1px solid var(--color-border); color: var(--color-white); }
  .section-endo .endo-cards:hover .endo-card:not(:hover) { color: var(--color-white); }
  .section-endo .endo-card-desc, .section-endo .endo-card:hover .endo-card-desc { display: block; margin-top: 16px; }
  .section-endo .endo-card:hover .endo-card-arrow { display: none; }
  .site-footer .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .footer-col:last-child { grid-column: 1 / -1; border-top: 1px solid var(--color-border); }
  .site-footer .footer-info-block { height: auto; }
  .site-footer .footer-links { position: static; margin-top: 24px; }
  .site-footer .footer-bottom-inner { flex-wrap: wrap; }
  .site-footer .footer-logo { width: 170px; }
  .mission-section + .mission-section { margin-top: 100px; }
}

@media (max-width: 767px) {
  :root { --side-padding: 20px; --header-height: 72px; }
  .site-header .logo, .site-header .logo a { width: 196px; height: 24px; }
  .site-header .logo img { width: 203px; height: 35.5px; left: -4px; top: -6px; }
  .site-header .header-inner { gap: 12px; }
  .section-label { font-size: 15px; }
  .section-title, .mission-section-head .section-title { font-size: 28px; letter-spacing: -0.8px; }
  .section-desc { font-size: 16px; }
  .section-hero { width: 100%; height: 510px; }
  .section-hero .hero-bg { object-position: 62% center; }
  .section-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(3 14 40 / 65%), rgb(3 14 40 / 10%)); pointer-events: none; }
  .section-hero .hero-text { left: 24px; right: 24px; z-index: 1; gap: 24px; }
  .section-hero .hero-title { font-size: clamp(30px, 7.5vw, 44px); letter-spacing: -1px; }
  .section-hero .hero-desc { font-size: 16px; max-width: 340px; }
  .section-hero .hero-rolling { z-index: 1; left: 24px; bottom: 32px; }
  .section-hero .hero-scroll { display: none; }
  .section-core .section-head, .section-checkup .section-head { margin-bottom: 36px; gap: 14px; }
  .section-core .core-grid, .section-checkup .checkup-grid { gap: 32px 16px; }
  .section-core .core-card-title { font-size: 18px; }
  .section-core .core-card-thumb { aspect-ratio: 3 / 4; }
  .section-core .core-card-overlay { position: static; padding: 16px 0 0; color: var(--color-text-sub); gap: 12px; border-radius: 0; }
  .section-core .core-card-thumb { overflow: visible; height: auto; aspect-ratio: auto; }
  .section-core .core-card-photo { height: auto; aspect-ratio: 3 / 4; }
  .section-core .core-card:nth-child(3) .core-card-photo, .section-core .core-card:nth-child(4) .core-card-photo { height: auto; }
  .section-core .core-card-thumb::before, .section-core .core-overlay-more { display: none; }
  .section-core .core-overlay-text { opacity: 1; transform: none; font-size: 14px; text-align: left; }
  .section-core .core-overlay-text br { display: none; }
  .section-core .core-card:hover .core-card-photo { border-radius: 0; transform: none; }
  .section-core .core-card-body { margin-top: 16px; }
  .section-gastro .gastro-head { display: block; margin-bottom: 28px; }
  .section-gastro .gastro-head-text { gap: 14px; }
  .section-gastro .gastro-nav { margin-top: 24px; }
  .section-gastro .gastro-slide-panel { flex-direction: column; align-items: stretch; gap: 28px; }
  .section-gastro .gastro-slide-img { width: 100%; }
  .section-gastro .gastro-slide-content { gap: 24px; }
  .section-gastro .gastro-slide-title { font-size: 28px; }
  .btn-primary { padding: 16px 24px; }
  .section-endo .endo-inner { gap: 36px; }
  .section-endo .endo-cards { grid-template-columns: 1fr; }
  .section-endo .endo-card { min-height: 180px; }
  .section-endo .endo-card-title { font-size: 22px; }
  .section-endo .endo-watermark { display: none; }
  .section-checkup .checkup-title { font-size: 18px; }
  .section-checkup .checkup-desc { font-size: 15px; line-height: 1.5; }
  .section-checkup .checkup-body { gap: 20px; margin-top: 20px; }
  .section-checkup .checkup-card .link-more { min-height: 44px; }
  .site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .site-footer .footer-top { grid-template-columns: 1fr; }
  .site-footer .footer-col { padding: 36px 24px; border-right: 0; border-bottom: 1px solid var(--color-border); }
  .site-footer .footer-col:last-child { border-top: 0; }
  .site-footer .footer-hours-block { margin-top: 32px; }
  .site-footer .footer-location-block { height: auto; gap: 28px; }
  .site-footer .footer-address { font-size: 18px; line-height: 1.6; }
  .site-footer .footer-map-btns { align-self: stretch; width: 100%; flex-direction: row; }
  .site-footer .footer-map-btn { padding: 14px 8px; }
  .site-footer .footer-bottom-inner { gap: 20px; }
  .site-footer .copyright { order: 3; flex-basis: 100%; }
  .site-footer .footer-links a { min-height: 44px; display: inline-flex; align-items: center; }
  .quick-menu { left: 0; right: 0; bottom: 0; width: 100%; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--color-white); box-shadow: 0 -4px 20px rgb(0 0 0 / 8%); }
  .quick-menu .quick-list, .quick-menu.is-closed .quick-list { display: flex; flex-direction: row; gap: 8px; }
  .quick-menu .quick-btn { font-size: 13px; height: 44px; gap: 5px; }
  .quick-menu .quick-btn img { width: 17px; height: 17px; }
  .quick-menu .quick-toggle { display: none; }
  .sub-nav { margin-inline: 16px; gap: 8px; padding-block: 12px; }
  .sub-nav-item { min-width: 0; }
  .sub-nav-item:last-child { flex: 1; }
  .sub-nav-trigger { min-height: 44px; padding: 8px; font-size: 14px; text-align: left; }
  .sub-nav-label { overflow-wrap: anywhere; }
  .sub-nav-dropdown { min-width: 0; width: min(240px, calc(100vw - 80px)); max-height: 60dvh; overflow-y: auto; }
  .sub-nav-item:last-child .sub-nav-dropdown { left: auto; right: 0; }
  .sub-visual { padding: 44px 20px; }
  .sub-visual-title { font-size: 30px; letter-spacing: -1px; }
  .mission-motion-text { padding-top: 24px; }
  .mission-motion-headline { font-size: clamp(26px, 6vw, 36px); line-height: 1.3; }
  .mission-motion-slogan { font-size: clamp(26px, 6.5vw, 38px); }
  .mission-motion-desc { font-size: 16px; }
  .mission-motion-desc br { display: none; }
  .mission-section-head { margin-bottom: 36px; }
  .mission-vision-diagram { --mission-vision-gap: 32px; }
  .mission-vision-card { padding: 32px 20px; }
  .mission-goal-text { padding: 24px; font-size: 18px; }
  .mission-value-card { padding: 32px 24px; }
}

@media (max-width: 479px) {
  .section-checkup .checkup-grid { grid-template-columns: 1fr; }
}

/* Subpage typography standard: Figma letter spacing -3%. */
.page-sub #wrapper,
.page-sub #wrapper * { letter-spacing: -0.03em; }
