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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

/* ── 헤더 ── */
.site-header {
  position: fixed;
  bottom: 10%; left: 0%;
  height: 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 14px;
  z-index: 100;
  max-width: 60%;
}


.row {
  display: flex;
}

.label {
  cursor: pointer;
}

.content {
  display: none;
  text-decoration: none;
}

.attentive {
  color: red;
  text-decoration: underline;
}

#a {
  color: red;
}

.bibliography {
  color: blue;
  text-decoration: underline;
}

#b {
  color: blue;
}

.cyl {
  color: green;
  text-decoration: underline;
}

#c {
  color: green;
}

/* ── 분할 레이아웃 ── */
.split-layout {
  display: flex;
  height: 100vh;
}

.pane {
  height: 100%;
  overflow-y: auto;
  flex-shrink: 0;
}

/* ── 왼쪽 ── */
.pane-left {
  width: 50%;
}

.filter-bar {
  padding: 10px 10px;
  position: sticky;
  top: 0;
  background: #ffffff00;
  z-index: 10;
}

#projectMenu {
  font-family: Arial, sans-serif;
  font-size: 13px;
  min-width: 260px;
}

/* ── 체크박스 필터 ── */
.type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 10px 10px;
}

.type-filters label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* ── 테이블 ── */
.project-table {
  table-layout: auto;
  width: 100%;
  border-collapse: collapse;
  font-weight: 100;
}

.project-table colgroup {
  display: none;
}

.project-table th {
  text-align: left;
  padding: 2px 10px;
  font-weight: normal;
  font-size: 13px;
  color: rgb(0, 0, 0);
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: solid 1px black;
}

/* title, type, year는 내용만큼만, desc는 나머지 전부 */
.td-title, .project-table th:nth-child(1) { white-space: nowrap; width: 1%; }
.td-type,  .project-table th:nth-child(2) { white-space: nowrap; width: 1%; }
.td-year,  .project-table th:nth-child(3) { white-space: nowrap; width: 1%; }
.td-desc,  .project-table th:nth-child(4) { width: auto; }

.table-row {
  cursor: pointer;
  border-bottom: 1px solid rgb(0, 0, 0);
}

.table-row:hover {
  background: #fdffc2;
  color: blue;
}

.table-row td {
  padding: 2px 10px;
  vertical-align: top;
  line-height: 1.2;
}

.td-title {
  white-space: nowrap;
  font-weight: 100;
  width: 1%;
}

.td-type {
  white-space: nowrap;
  color: black;
  width: 1%;
}

.td-year {
  white-space: nowrap;
  color: black;
  width: 1%;
}

.td-desc {
  color: black;
  width: auto;
}

/* ── 프로젝트 상세 ── */
.project-detail {
  padding: 10px 10px;
}

.detail-images img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 4px;
}

.detail-caption {
  margin-bottom: 20px;
  line-height: 1.2;
}

.detail-body {
  margin-bottom: 30px;
  line-height: 1.2;
}

.preview-empty {
  padding: 40px 14px;
  font-size: 24px;
}

/* ── 구분선: 화면 전체 높이 ── */
.divider {
  position: fixed;
  top: 0;
  left: 50%;
  width: 1px;
  height: 100vh;
  background: #ff0000;
  cursor: col-resize;
  z-index: 99;
  transition: background 0.15s;
}

.divider:hover {
  background: blue;
}

/* ── 오른쪽 ── */
.pane-right {
  flex: 1;
}

.interest-item {
  border-bottom: solid 1px black;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 8px;
  padding-top: 10px;
}

.interest-item img {
  margin-bottom: 4px;
  display: block;
  width: 100%;
  height: auto;
}

.interest-item p {
  line-height: 1.2;
}

/* ── All projects 목록 ── */
.project-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  border-bottom: 1px solid #000;
  cursor: pointer;
}

.project-row:first-child {
  border-top: 1px solid #000;
}

.project-row:hover {
  background: #f5f5f5;
}

.row-title {
  font-size: 13px;
}

.row-meta {
  font-size: 11px;
  color: #999;
}

/* ── 스크롤바 숨김 ── */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

*::-webkit-scrollbar {
  display: none;
}


/* ════════════════════════════════════════
   pane-left 너비 기반 컨테이너 쿼리
   JS로 pane-left에 data-width 속성을 달아
   CSS [data-width] 셀렉터로 단계별 대응
   ════════════════════════════════════════ */

/* 기본: 모든 컬럼 표시 */
.pane-left .project-table col.col-type,
.pane-left .project-table col.col-year,
.pane-left .project-table col.col-desc,
.pane-left .project-table th.th-type,
.pane-left .project-table th.th-year,
.pane-left .project-table th.th-desc,
.pane-left .project-table td.td-type,
.pane-left .project-table td.td-year,
.pane-left .project-table td.td-desc {
  display: table-cell;
}

/* ── 단계 1: pane 좁음 (< 400px) → Type 숨김 ── */
.pane-left[data-narrow="1"] .project-table th.th-type,
.pane-left[data-narrow="1"] .project-table td.td-type {
  display: none;
}

/* ── 단계 2: pane 더 좁음 (< 280px) → Type + Year 숨김, Description 유지 ── */
.pane-left[data-narrow="2"] .project-table th.th-type,
.pane-left[data-narrow="2"] .project-table td.td-type,
.pane-left[data-narrow="2"] .project-table th.th-year,
.pane-left[data-narrow="2"] .project-table td.td-year {
  display: none;
}

/* ── 단계 3: 카드 모드 (< 180px) ── */
.pane-left[data-narrow="3"] .project-table,
.pane-left[data-narrow="3"] .project-table thead {
  display: none;
}

.pane-left[data-narrow="3"] .card-list {
  display: block;
}

/* 카드 리스트: 기본엔 숨김 */
.card-list {
  display: none;
}

.card-item {
  border-bottom: 1px solid #000;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1.3;
}

.card-item:hover {
  background: #fdffc2;
  color: blue;
}

.card-item .card-title {
  font-size: 13px;
  font-weight: 400;
  display: block;
}

.card-item .card-meta {
  font-size: 11px;
  color: #0008ff;
  display: block;
  margin-top: 1px;
}


/* ════════════════════════════════════════
   반응형: 태블릿 / 모바일 (뷰포트 기준)
   ════════════════════════════════════════ */
   @media (max-width: 800px) {
    .site-header { position: fixed; height: auto; padding: 4px 10px; flex-wrap: wrap; }
    .split-layout { flex-direction: column; height: auto; padding-top: 0; overflow: visible; }
    .pane { width: 100% !important; height: auto; overflow-y: visible; flex-shrink: 1; }
    .pane-left { height: 50vh; overflow-y: auto; }
    .divider { position: static; width: 100%; height: 4px; left: auto; cursor: row-resize; background-color: #ff0000; }
    #allView { overflow-x: auto; }
    html, body { overflow: visible; height: auto; }
  
    /* ── 테이블 모바일 레이아웃 ── */
    .project-table thead { display: none; }
  
    .project-table tbody tr {
      display: block;
      border-bottom: 1px solid #000;
      padding: 0 0px;
    }
  
    .project-table tbody td.td-type,
    .project-table tbody td.td-year {
      display: none;
    }
  
    .project-table tbody td.td-title {
      display: block;
      white-space: nowrap;
    }
  
    .project-table tbody td.td-desc {
      display: block;
      margin-top: 2px;
      white-space: normal;
      width: auto;
    }
  }



/* ── 스티커 ── */
.sticker {
  position: fixed;
  z-index: 9999;
  cursor: grab;
}

#sticker img {
  width: 140px;
  pointer-events: none;
}

.multi-frame {
  border: 1px solid #000;
  padding: 3px;
  background-color: #f5f5f5;
  box-sizing: border-box;
}

.multi-frame.outer {
  position: relative;
}

button.x {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

button.x svg {
  width: 11px;
  height: 11px;
  position: absolute;
  top: 0px;
  right: 0px;
  stroke: #000;
  background-color: #ffffff;
  fill: none;
  pointer-events: none;
  display: block;
}

.clock-content {
  font-family: monospace;
  font-size: 12px;
  color: #000;
  padding: 6px 10px;
  user-select: none;
  white-space: nowrap;
}

.desc-ellipsis {
  cursor: pointer;
  color: rgb(255, 0, 0);
  text-decoration: none;
}



.detail-header {
  margin-bottom: 0px;
}

.detail-title {
  font-size: 13px;
  margin-bottom: 0px;
}

.detail-meta {
  font-size: 13px;
  margin-bottom: 4px;
}

.detail-rule {
  border: none;
  border-top: 1px solid #000;
  margin: 0 0 2px 0;
}

.detail-body {
  line-height: 1.2;
}