/* responsive.css — 모바일 768px 이하 오버라이드 (plan.md Section 11-1) */

@media (max-width: 768px) {

  /* ── 섹션 배경 애니메이션: 모바일 생략 (research.md 12절) ── */
  .bg-map-wrap { display: none; }            /* S1, S2 세계지도 */
  .bg-graph-wrap { display: none; }          /* S3 그래프 */
  .bg-5p-wrap { display: none; }             /* S4 5P 원 */

  .desktop-block{
    display: inline;
  }

  .mobile-block{
    display: block;
  }



  /* ── 아웃트로: 모바일 단순화 ── */
  .outro-wrap {
    height: 200vh;
    height: 200dvh;
  }

  .outro-inner {
    top: var(--nav-h-mobile);  /* [버그 수정 D-rev] 모바일 navbar 높이 */
    height: calc(100vh - var(--nav-h-mobile));  /* [버그 수정 C] 모바일 navbar 높이 반영 */
    height: calc(100dvh - var(--nav-h-mobile));
  }

  .outro-ring {
    display: none;
  }

  .outro-text {
    font-size: 2.5em;
    width: 100%;
    padding: 0 16px;
    line-height: 1.4;
  }

  .outro-text span{
    display: block;
  }

  .outro-btn{
    font-size: 1em;
  }

  .outro-btn {
    padding: 10px 22px;
  }


  /* 네비게이션: 2행 구조 (로고 56px + 프로그래스 2px + 섹션링크 40px ≈ 96px) */
  #main-nav,#main-nav.nav-compact .nav-inner {
    height: var(--nav-h-mobile);
  }
 
  .nav-logo{height: 20px;}
  #main-nav.nav-compact .nav-logo{height: 20px;}
  
  .nav-inner { 
    padding: 0;
    border-bottom: 1px solid #cbcbcb;
    flex-direction: column;
    height: unset
  }

  .nav-inner .logo-container{
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 18px 16px;
  }


  /* 데스크탑 전용 버튼 숨기기 */
  .nav-record-btn { display: none; }
  /* 드롭다운 숨기기 */
  .nav-dropdown { display: none; }


  /* 햄버거 표시 */
  #nav-hamburger { display: flex; }

  /* 모바일 inactive 링크: Nanum Heavy/Bold, 명시적 색상 */
  .nav-links a {
    font-weight: 700;
    opacity: 1;
    color: #9e9e9e;
  }
  .nav-links a.active {
    font-weight: 900;
    color: #0c0c0c;
    opacity: 1;
  }

  .nav-links {
    position: relative;
    width: 100%;
    height: 40px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-wrap: nowrap;
    gap: 24px;
    padding: 8px 16px;
    align-items: center;
  }
  .nav-links::-webkit-scrollbar { display: none; }

  .nav-progress {
    background: var(--white);
  }

  /* 타임라인: 모바일 — 단일 컬럼, timeline-left 숨김 */
  .timeline-section {

  }

  

  .section-hero-inner {
    height: calc(100vh - var(--nav-h-mobile));
    height: calc(100dvh - var(--nav-h-mobile));
  }

  .section-hero-text {
    padding-top: 10vh;
    padding-top: 10dvh;
  }


  .section-title {
    font-size: 2.5em;
    word-break: keep-all;
  }

  .section-body {
    font-size: 16px;
  }

  .section-content {
    padding-top: 64px;
    z-index: 1;
  }

  .timeline-wrap {
    display: block;  /* grid 해제 */
    padding: 0;
    /* padding-top: 64px; */
  }

  #section4 .timeline-wrap {
    padding-bottom: 0;
  }

  .timeline-left{
    background: var(--white);
    z-index: 1;
    position: relative;
    top: 0;
    padding: 8px 16px;
    padding-top: 64px;
    transition: all 0.3s ease;
  }
  
  .timeline-left.pinned{
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
    padding: 8px 16px;
  }

  .timeline-left .year-assets{
    display: none;  /* 모바일: 좌측 컬럼 숨김 */
  }

  .year-label {
    font-size: 64px;
    line-height: 72px; 
    transition: all 0.3s ease;
  }
  .timeline-left.pinned .year-label{
    font-size: 32px;
    line-height: 40px; 
    margin: 0;
  }
  .odo-num {
    height: 1em;  /* line-height와 동일하게 조정 */
  }

  .timeline-right {
    padding-left: 56px;  /* 24px(라인) + 16px(간격) */
    padding-top: 40px;  /* 24px(라인) + 16px(간격) */
    padding-right: 16px;
  }

  /* 모바일: 세로선 위치 조정 */
  .cards-track::before {
    left: -29px;
  }

  .timeline-line-fill {
    left: -29px;
  }

  .year-group {
    gap: 0;
  }

  /* 모바일: 이벤트 카드 내부 자산 표시 (데스크탑에서는 숨김) */
  .event-content > .assets-wrap { display: block; padding: 48px 0; }

  .event-content {
    overflow-wrap: break-word;
    word-break: break-all;
    max-width: unset;
    width: 100%;
  }

  .event-card{
    padding-bottom: 112px;
  }

  .asset-label{
    margin-top:8px;
    font-weight: 700;
  }

  /* 모바일: 도넛 위치 — 세로선에 맞춤 */
  .event-donut {
    left: calc(-1 * (16px + 24px));  /* padding-left(40px) 중 간격(16px) + 도넛 지름(24px) */
    width: 24px;
    height: 24px;
    cursor: default;
  }

  .event-donut::after{
    inset: 8px;
  }

  /* 자산 썸네일: portrait 174×248 */
  .asset-thumb img:not(.icon) {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .asset-thumb-inner{
    border-radius: var(--radius-card);
    overflow: hidden;
    width: fit-content;
    background:var(--grey-cb);
  }
  .asset-thumb-inner.portrait{
    width: 174px;
    height: 248px;
  }
  .asset-thumb-inner.landscape{
    width: 174px;
    height: 133px;
  }

  .asset-hover-icon{
    display: none!important;
  }
  /* 캐러셀: 모바일에서 세로 직렬 */
  .assets-carousel .carousel-slide {
    grid-area: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .assets-carousel .carousel-track {
    gap: 30px;
  }

  .carousel-nav {
    display: none;
  }

  /* ── 팝업 오버레이 ── */
  .popup-overlay {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* 데스크탑 닫기 숨김 */
  .popup-close-desktop { display: none; }

  /* ── 모달: fullscreen ── */
  .popup {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
  }

  /* ── PDF: 모바일 풀스크린 ── */
  .popup-pdf {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    background: var(--bg-pdf-dark); /* #484848 */
    border: none;
    border-radius: 0;
    flex-direction: column;
  }

  .popup-pdf:has(.pdf-iframe){
    height: 100vh;
    height: 100dvh;
  }

  /* PDF 메타패널 숨김 (바텀시트로 대체) */
  .pdf-meta-panel { display: none; }

  /* 데스크탑 PDF nav/counter 숨김 */
  .popup-pdf .pdf-nav { display: none; }

  /* PDF 뷰어 영역 */
  .popup-pdf .pdf-viewer-wrap {
    padding: 0;
    gap: 0;
    flex: 1;
  }

  .popup-pdf .pdf-canvas-wrap {
    border-radius: 0;
  }

  .popup-pdf .pdf-canvas {
    max-width: 100%;
    max-height: none;
  }

  /* PDF 풋터 숨김 */
  .pdf-footer-actions { display: none; }

  /* ── 이미지: 모바일 풀스크린 ── */
  .popup-image {
    width: 100%;
    height: 100%;
    max-width: none;
    background: var(--bg-mob-img); /* #2C2D30 */
  }

  /* 데스크탑 이미지 요소 숨김 */
  .img-header { display: none; }
  .img-info-panel { display: none; }
  .img-footer-actions { display: none; }
  .img-prev, .img-next { display: none; }
  .img-counter { display: none; }

  .popup-main-img {
    border-radius: 0;
    max-height: none;
    width: 100%;
    height: auto;
  }

  .img-main-wrap {
    height: auto;
    flex: 1;
    border-radius: 0;
    background: transparent;
  }

  /* 모바일: 가로형은 높이에 맞추고 가운데 */
  .popup-main-img.landscape {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 112px); /* 헤더 56px + 하단 여백 */
    max-height: calc(100dvh - 112px);
  }

  .popup-main-img.portrait {
    width: auto;
    height: 100%;
  }

  /* ── 모바일 공통 요소 표시 ── */
  /* 모바일 헤더: white bar, 56px 높이 */
  .popup-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 16px;
    background: var(--white);
    flex-shrink: 0;
    position: relative;
  }

  .popup-header-mobile .mob-title {
    font-family: var(--font-pretendard);
    font-size: 16px;
    font-weight: 700;
    color: var(--black);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    margin-right: 12px;
  }

  .popup-header-mobile .mob-close {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
  }

  .popup-header-mobile::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--grey-cb);
  }

  /* 모바일 카운터 pill */
  .popup-counter-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 63px;
    height: 32px;
    background: var(--white);
    border: 1px solid var(--grey-cb);
    border-radius: 113px;
    font-family: var(--font-pretendard);
    font-size: 12px;
    line-height: 24px;
    align-self: flex-start;
    margin: 12px 16px;
    flex-shrink: 0;
    position: fixed;
    top: 73px;
    z-index: 1;
  }

  .popup-counter-pill .pill-cur {
    font-weight: 700;
    color: var(--black);
  }

  .popup-counter-pill .pill-sep {
    font-weight: 400;
    color: var(--grey-3);
  }

  /* 모바일 풋터 toolbar pill */
  .popup-toolbar-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    flex-shrink: 0;
    position: fixed;
    bottom: 0;
    right: 0;
  }

  .toolbar-pill {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 32px;
    padding: 0 16px;
    background: var(--white);
    border: 1px solid var(--grey-cb);
    border-radius: 113px;
  }

  .toolbar-pill button,
  .toolbar-pill a {
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-4);
    text-decoration: none;
  }

  .toolbar-pill svg {
    width: 16px;
    height: 16px;
  }

  /* ── 바텀시트 (다크 테마) ── */
  .popup-bottomsheet {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60vh;
    max-height: 60dvh;
    background: #2C2D30;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 10;
    overflow-y: auto;
  }

  .popup-bottomsheet.open {
    transform: translateY(0);
  }

  .bottomsheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-family: var(--font-pretendard);
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
  }

  .bottomsheet-header span{
    display: flex;
    align-self: start;
    align-items: center;
    gap: 8px;
  }

  .bottomsheet-header .bs-icon {
    width: 12px;
    height: 12px;
    margin-right: 8px;
  }

  .bottomsheet-close {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .bottomsheet-close svg {
    width: 16px;
    height: 16px;
  }

  .bottomsheet-sep {
    height: 1px;
    background: var(--grey-3); /* #948F8D */
    margin-bottom: 16px;
  }

  .popup-bottomsheet dl {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: var(--font-pretendard);
    font-size: 14px;
    margin: 0;
  }

  .popup-bottomsheet .bs-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .popup-bottomsheet dt {
    color: var(--grey-3); /* #948F8D */
    font-weight: 400;
  }

  .popup-bottomsheet dd {
    color: var(--white);
    margin: 0;
    font-weight: 400;
  }

  /* ── 인트로: 모바일 대응 ── */
  .intro-card-grid {
    gap: 8px;
    padding: 0 8px;
  }
  .intro-col {
    flex: 0 0 calc((100vw - 32px) / 4);
    gap: 8px;
  }
  .intro-col--offset {
    padding-top: 80px;
  }
  .intro-card {
    border-radius: 8px;
  }
  .intro-title-container{
    padding: 0 16px;
  }
  .intro-main-title {
    top: 50%;
    left: 24px;
    right: 24px;
    width: auto;
    font-size: 2.5em;
    line-height: 140%;
  }
  .intro-main-title span{
    display: block;
  }
  .intro-blur-top,
  .intro-blur-bottom {
    height: 25vh;
    height: 25dvh;
  }
  .intro-subtitle{
    font-size: 18px;
    line-height: 32px;
    word-break: keep-all;
  }
}
