:root {
  --blue: #0000ff;
  --black: #050505;
  --white: #ffffff;
  --line: rgba(5, 5, 5, 0.18);
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --appbar: 54px;
  --dock: 72px;
  --inspector: 286px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--black);
  background: var(--white);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.04;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.appbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--appbar);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  border-bottom: 1px solid var(--black);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  padding: 0 20px 0 13px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  transform: rotate(-12deg);
}

.app-status {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 0, 255, 0.12);
}

.clock {
  min-width: 56px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.desktop {
  position: relative;
  height: 100svh;
  padding-top: var(--appbar);
  display: grid;
  grid-template-columns: var(--dock) minmax(0, 1fr) var(--inspector);
}

.dock {
  position: relative;
  z-index: 20;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--black);
  background: var(--white);
}

.dock-top {
  display: grid;
}

.dock-button {
  min-height: 69px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--black);
  background: var(--white);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.dock-button:hover,
.dock-button:focus-visible,
.dock-button.active {
  background: var(--blue);
  color: var(--white);
}

.dock-icon {
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.08em;
}

.dock-contact {
  border-top: 1px solid var(--black);
  border-bottom: 0;
  background: var(--black);
  color: var(--white);
}

.dock-brand {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.workspace {
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: 28px 34px 100px;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--white);
  scrollbar-color: var(--blue) var(--white);
  scrollbar-width: thin;
}

.workspace-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.workspace::before {
  content: "ARCHIVE";
  position: absolute;
  z-index: 0;
  right: -3vw;
  top: 110px;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0, 0, 255, 0.1);
  font-size: clamp(130px, 19vw, 320px);
  font-weight: 800;
  line-height: 0.75;
  letter-spacing: -0.1em;
  pointer-events: none;
}

.workspace-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(310px, 1.4fr) minmax(200px, 0.6fr);
  align-items: end;
  gap: 40px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--black);
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(54px, 7vw, 102px);
  font-weight: 700;
  line-height: 0.78;
  letter-spacing: -0.09em;
}

h1 i {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.workspace-note {
  justify-self: end;
  max-width: 240px;
}

.workspace-note p {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.55;
  word-break: keep-all;
}

.shuffle-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid var(--black);
  background: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.shuffle-button b {
  font-size: 17px;
  line-height: 0.6;
  transition: transform 520ms var(--ease);
}

.shuffle-button:hover,
.shuffle-button:focus-visible {
  background: var(--blue);
  color: var(--white);
}

.shuffle-button:hover b {
  transform: rotate(160deg);
}

.desk-meta {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 1px 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.year-board {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 44px;
  align-items: start;
  padding-top: 16px;
  transition: transform 660ms var(--ease);
}

/* 2025 포커스: 보드를 왼쪽으로 밀어 2025를 좌측으로 (2026은 화면 밖으로) */
.desktop[data-focus="2025"] .year-board {
  transform: translateX(calc(-50% - 22px));
}

.year-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: opacity 460ms ease;
}

/* 선택 안 한 연도 칸은 제자리에서 자연스럽게 페이드아웃 */
.desktop[data-focus="2026"] .year-column[data-year="2025"],
.desktop[data-focus="2025"] .year-column[data-year="2026"] {
  opacity: 0;
  pointer-events: none;
}

.year-column-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 22px;
  padding-top: 26px;
}

/* 타이포그래픽 섹션 타이틀 — 박스/선택 강조 없이 두 연도가 나란히 존재 */
.year-head {
  display: grid;
  gap: 7px;
  padding: 2px 2px 14px;
  border-bottom: 2px solid var(--black);
  text-align: left;
}

.year-head span {
  font-size: 46px;
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.06em;
}

.year-head strong {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  word-break: keep-all;
}

.year-head small {
  color: rgba(5, 5, 5, 0.5);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.active-filter-label {
  color: var(--blue);
}

/* ── Entrance reveal (로드/스크롤 시 떠오르며 등장) ── */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(calc(var(--shift) + 34px)) rotate(var(--tilt));
  }
  to {
    opacity: 1;
    transform: translateY(var(--shift)) rotate(var(--tilt));
  }
}

.reveal {
  opacity: 0;
}

.reveal.shown {
  animation: rise-in 620ms var(--ease-out) both;
}

.folder-card.reveal.shown {
  animation: card-rise 680ms var(--ease-out) both;
}

.folder-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 42px 30px;
  padding: 40px 6px 0;
}

.folder-card {
  --tilt: 0deg;
  --shift: 0px;
  position: relative;
  min-width: 0;
  height: 264px;
  display: block;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transform: translateY(var(--shift)) rotate(var(--tilt));
  transform-origin: center bottom;
  transition:
    transform 420ms var(--ease),
    opacity 300ms ease,
    filter 300ms ease;
}

.folder-card:nth-child(4n + 1) {
  --tilt: -1.4deg;
}

.folder-card:nth-child(4n + 2) {
  --shift: 12px;
  --tilt: 0.8deg;
}

.folder-card:nth-child(4n + 3) {
  --shift: -4px;
  --tilt: -0.5deg;
}

.folder-card:nth-child(4n) {
  --shift: 7px;
  --tilt: 1.2deg;
}

.folder-card:hover,
.folder-card:focus-visible {
  z-index: 8;
  outline: 0;
  transform: translateY(calc(var(--shift) - 9px)) rotate(0deg);
}

.folder-card[hidden] {
  display: none;
}

.folder-tab {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 62%;
  height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border: 1px solid var(--black);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: var(--folder-color, var(--blue));
  color: var(--folder-ink, var(--white));
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.planning-file .folder-tab {
  background: var(--blue);
  color: var(--white);
}

.folder-body {
  position: absolute;
  inset: 25px 0 0;
  z-index: 2;
  display: grid;
  grid-template-rows: 1fr auto;
  border: 1px solid var(--black);
  background: var(--white);
  box-shadow: 7px 7px 0 var(--blue);
  overflow: hidden;
  transition: box-shadow 300ms var(--ease);
}

.folder-card:hover .folder-body,
.folder-card:focus-visible .folder-body,
.folder-card.selected .folder-body {
  box-shadow: 11px 11px 0 var(--black);
}

.folder-card.selected .folder-tab {
  background: var(--blue);
  color: var(--white);
}

.folder-visual {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-image: var(--pattern);
  background-size: 130% 130%;
  background-position: center;
  transition: background-size 650ms var(--ease);
}

.folder-card:hover .folder-visual,
.folder-card:focus-visible .folder-visual {
  background-size: 155% 155%;
}

.folder-visual::before {
  content: attr(data-letter);
  position: absolute;
  left: 8px;
  top: 6px;
  color: var(--visual-ink, var(--black));
  font-size: 72px;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.1em;
  mix-blend-mode: normal;
}

.folder-year {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 4px 6px;
  border: 1px solid currentColor;
  color: var(--visual-ink, var(--black));
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.folder-visual::after {
  content: "OPEN ↗";
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 4px 5px;
  border: 1px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 180ms ease, transform 240ms var(--ease);
}

.folder-card:hover .folder-visual::after,
.folder-card:focus-visible .folder-visual::after {
  opacity: 1;
  transform: translateY(0);
}

.folder-copy {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 9px 9px 8px;
  border-top: 1px solid var(--black);
  background: var(--white);
}

.folder-title {
  display: block;
  margin: 0;
  font-size: 21px;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.folder-type {
  display: block;
  margin: 5px 0 0;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.folder-date {
  font-size: 9px;
  font-weight: 700;
  writing-mode: vertical-rl;
}

.empty-state {
  position: relative;
  z-index: 3;
  margin-top: 60px;
  padding: 50px;
  border: 1px dashed var(--black);
  text-align: center;
}

.empty-state span {
  color: var(--blue);
  font-size: 90px;
  font-weight: 700;
}

.empty-state p {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.inspector {
  position: absolute;
  top: var(--appbar);
  right: 0;
  bottom: 0;
  width: var(--inspector);
  z-index: 22;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(180px, 33vh) auto auto auto 1fr;
  border-left: 1px solid var(--black);
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  transition: width 660ms var(--ease);
}

/* 포커스 시 인스펙터가 2025 자리 위로 밀고 들어옴 (파일 칸과 여백을 둠) */
.desktop[data-focus="2026"] .inspector,
.desktop[data-focus="2025"] .inspector {
  width: 54%;
}

.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 37px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.inspector-index {
  color: var(--blue);
}

/* 포커스 시 좌상단에 뜨는 → 화살표 태그 (두 연도 보기로 복귀) */
.inspector-back {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 37px;
  padding: 0 15px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateX(-26px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 500ms var(--ease),
    background-color 160ms ease;
}

.inspector-back:hover,
.inspector-back:focus-visible {
  background: var(--blue);
}

/* 포커스 시 화살표가 부드럽게 등장 */
.desktop[data-focus="2026"] .inspector-back,
.desktop[data-focus="2025"] .inspector-back {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* 라벨 ↔ 화살표가 뚝 끊기지 않고 교차되도록 라벨은 페이드아웃 */
.inspector-label {
  transition: opacity 260ms ease;
}

.desktop[data-focus="2026"] .inspector-label,
.desktop[data-focus="2025"] .inspector-label {
  opacity: 0;
}

.inspector-preview {
  position: relative;
  overflow: hidden;
  background-image: var(--preview-pattern);
  background-size: 140% 140%;
  background-position: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: background-image 300ms ease;
}

.inspector-letter {
  position: absolute;
  left: 12px;
  top: 5px;
  color: var(--preview-ink, var(--white));
  font-size: clamp(84px, 10vw, 150px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.11em;
}

.scan-line {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 5px,
    rgba(255, 255, 255, 0.12) 5px 6px
  );
  mix-blend-mode: overlay;
}

.inspector-copy {
  padding: 16px 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.inspector-category {
  margin: 0 0 9px;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.inspector-title {
  margin: 0;
  font-size: 37px;
  line-height: 0.86;
  letter-spacing: -0.07em;
}

.inspector-summary {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.5;
  word-break: keep-all;
}

.inspector-data {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.inspector-data div {
  min-width: 0;
  padding: 10px 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.35);
}

.inspector-data div:last-child {
  border-right: 0;
}

.inspector-data dt {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.inspector-data dd {
  margin: 5px 0 0;
  font-size: 11px;
  font-weight: 700;
}

.inspector-open {
  min-height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: var(--blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.inspector-open b {
  font-size: 20px;
}

.inspector-open:hover,
.inspector-open:focus-visible {
  background: var(--white);
  color: var(--black);
}

.inspector-foot {
  align-self: end;
  margin: 0;
  padding: 14px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  line-height: 1.55;
  letter-spacing: 0.08em;
}

.file-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: calc(var(--appbar) + 26px) 34px 28px calc(var(--dock) + 34px);
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 640ms;
}

.file-viewer.open {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s;
}

/* 배경 어둠 + blur를 값 자체로 부드럽게 트랜지션 (순간적으로 켜지지 않게) */
.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  transition: background-color 480ms ease, backdrop-filter 480ms ease,
    -webkit-backdrop-filter 480ms ease;
}

.file-viewer.open .viewer-backdrop {
  background: rgba(5, 5, 5, 0.76);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.paper-stack {
  position: absolute;
  width: min(920px, calc(100vw - 150px));
  height: min(650px, calc(100svh - 115px));
  border: 1px solid var(--black);
  background: var(--blue);
  opacity: 0;
  transform: translate(12px, 12px) rotate(1.1deg);
  transition: opacity 400ms ease;
}

.file-viewer.open .paper-stack {
  opacity: 1;
}

.paper-stack::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--black);
  background: var(--white);
  transform: translate(-7px, -6px) rotate(-1.6deg);
}

.viewer-document {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100vw - 150px));
  height: min(650px, calc(100svh - 115px));
  display: grid;
  grid-template-columns: 94px 1fr;
  border: 1px solid var(--black);
  background: var(--white);
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: transform 600ms var(--ease), opacity 440ms ease;
}

.file-viewer.open .viewer-document {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.viewer-spine {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-right: 1px solid var(--black);
  background: var(--blue);
  color: var(--white);
  overflow: hidden;
}

.viewer-number,
.viewer-spine > span:last-child {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.viewer-spine-title {
  max-height: 65%;
  font-size: 38px;
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.07em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.viewer-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

/* 페이지 무대: 작품 내부의 여러 아카이브 형태가 여기에 렌더됨 */
.viewer-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.viewer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 18px 15px;
  border-bottom: 1px solid var(--black);
}

.viewer-kicker {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.viewer-header h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.82;
  letter-spacing: -0.08em;
}

.viewer-close {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--black);
  border-radius: 50%;
  background: var(--white);
  font-size: 23px;
  cursor: pointer;
  transition: transform 280ms var(--ease), background-color 180ms ease, color 180ms ease;
}

.viewer-close:hover,
.viewer-close:focus-visible {
  transform: rotate(90deg);
  background: var(--black);
  color: var(--white);
}

.viewer-art {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background-image: var(--viewer-pattern);
  background-position: center;
  background-size: cover;
}

.viewer-art::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid currentColor;
  color: var(--viewer-ink, var(--black));
  transform: rotate(-1.4deg);
}

.viewer-word {
  position: absolute;
  z-index: 2;
  left: 4%;
  top: 5%;
  max-width: 86%;
  color: var(--viewer-ink, var(--black));
  font-size: clamp(80px, 13vw, 190px);
  line-height: 0.71;
  letter-spacing: -0.12em;
  word-break: break-all;
}

.viewer-stamp {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 14px;
  padding: 8px 10px;
  border: 1px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

.viewer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 14px;
  border-top: 1px solid var(--black);
}

.viewer-pagelabel {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* ── 아카이브 페이지 형태 (작품 내부에서 화살표로 넘김) ── */
.page {
  position: absolute;
  inset: 0;
  z-index: 1;
  animation: page-in 560ms var(--ease-out) both;
}

/* 새 페이지가 위로 부드럽게 떠오르고, 이전 페이지는 그 아래에 잠깐 남아 빈 프레임을 막음 */
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-prev {
  animation: none;
  z-index: 0;
}

/* 표지: 작품 대표 이미지 */
.page-cover {
  background-image: var(--viewer-pattern);
  background-position: center;
  background-size: cover;
}

.page-cover::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid currentColor;
  color: var(--viewer-ink, var(--black));
  transform: rotate(-1.4deg);
}

.page-word {
  position: absolute;
  z-index: 2;
  left: 4%;
  top: 5%;
  max-width: 86%;
  color: var(--viewer-ink, var(--black));
  font-size: clamp(80px, 13vw, 190px);
  line-height: 0.71;
  letter-spacing: -0.12em;
  word-break: break-all;
}

.page-stamp {
  position: absolute;
  z-index: 3;
  right: 16px;
  bottom: 14px;
  padding: 8px 10px;
  border: 1px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

/* 페이지 형태 이름 태그 */
.page-tag {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: 16px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* 이미지 페이지 */
.page-image {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 30px;
  background: var(--black);
  color: var(--white);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 11px,
    rgba(255, 255, 255, 0.05) 11px 12px
  );
  text-align: center;
}

.page-image .page-big {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.page-image .page-hint {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  letter-spacing: 0.05em;
}

/* 문서 페이지 (텍스트 자리) */
.page-doc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 38px clamp(24px, 6vw, 70px);
  background: var(--white);
  color: var(--black);
  overflow-y: auto;
}

.page-doc h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.doc-lines {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.doc-lines span {
  height: 10px;
  background: rgba(5, 5, 5, 0.12);
}

.doc-lines span:nth-child(3n) {
  width: 72%;
}

.doc-lines span:nth-child(4n) {
  width: 88%;
}

/* 갤러리 페이지 (썸네일 여러 개) */
.page-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 10px;
  padding: 22px;
  background: var(--black);
}

.page-gallery .thumb {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 700;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 9px,
    rgba(255, 255, 255, 0.05) 9px 10px
  );
}

/* 노트 페이지 (큰 인용/메모) */
.page-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px clamp(28px, 7vw, 90px);
  background: var(--blue);
  color: var(--white);
}

.note-quote {
  margin: 0;
  font-size: clamp(20px, 2.6vw, 30px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.note-by {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.viewer-navigation {
  display: flex;
  align-items: center;
  gap: 9px;
}

.viewer-navigation button {
  padding: 7px 8px;
  border: 1px solid var(--black);
  background: var(--white);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.viewer-navigation button:hover,
.viewer-navigation button:focus-visible {
  background: var(--blue);
  color: var(--white);
}

.viewer-progress {
  min-width: 43px;
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

body.viewer-active {
  overflow: hidden;
}

@media (max-width: 1100px) {
  :root {
    --inspector: 245px;
  }

  .appbar {
    grid-template-columns: var(--dock) minmax(120px, 1fr) auto minmax(170px, 0.7fr);
  }

  .file-total {
    display: none;
  }

  .workspace {
    padding-inline: 25px;
  }

  .folder-grid {
    grid-template-columns: repeat(auto-fill, minmax(208px, 1fr));
  }

  .inspector-title {
    font-size: 31px;
  }
}

@media (max-width: 820px) {
  :root {
    --appbar: 50px;
    --dock: 0px;
  }

  body {
    overflow: auto;
  }

  .appbar {
    grid-template-columns: 1fr auto;
  }

  .brand {
    grid-column: 1;
  }

  .app-status {
    grid-column: 2;
  }

  .desktop {
    height: auto;
    min-height: 100svh;
    display: block;
  }

  .dock {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    height: 57px;
    display: grid;
    grid-template-columns: 1fr auto;
    border-top: 1px solid var(--black);
    border-right: 0;
  }

  .dock-top {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dock-button {
    min-height: 56px;
    border-right: 1px solid var(--black);
    border-bottom: 0;
  }

  .dock-contact {
    min-width: 60px;
    border-top: 0;
  }

  .dock-icon {
    font-size: 16px;
  }

  .workspace {
    min-height: calc(100svh - var(--appbar));
    padding: 24px 20px 100px;
    overflow: visible;
  }

  .workspace-header {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  h1 {
    font-size: clamp(55px, 13vw, 90px);
  }

  .workspace-note {
    justify-self: stretch;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 160px;
    align-items: end;
    gap: 20px;
  }

  .archive-ledger {
    grid-template-columns: 1fr;
  }

  .workspace-note p {
    margin: 0;
  }

  .year-board {
    grid-template-columns: 1fr;
    gap: 46px 0;
  }

  .year-column-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 18px;
  }

  .inspector {
    display: none;
  }

  .file-viewer {
    padding: 22px 18px 78px;
  }

  .paper-stack,
  .viewer-document {
    width: calc(100vw - 42px);
    height: calc(100svh - 112px);
  }

  .viewer-document {
    grid-template-columns: 70px 1fr;
  }

  .viewer-spine-title {
    font-size: 29px;
  }
}

@media (max-width: 520px) {
  .app-status {
    padding-right: 10px;
  }

  .status-light {
    display: none;
  }

  .workspace {
    padding-inline: 14px;
  }

  .workspace-header {
    padding-bottom: 20px;
  }

  .eyebrow {
    margin-bottom: 10px;
  }

  h1 {
    font-size: 54px;
  }

  .workspace-note {
    grid-template-columns: 1fr;
  }

  .workspace-note p {
    max-width: 270px;
  }

  .shuffle-button {
    width: 160px;
  }

  .desk-meta span:last-child {
    display: none;
  }

  .year-column-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 14px;
  }

  .folder-card {
    height: 194px;
  }

  .folder-tab {
    width: 70%;
  }

  .folder-body {
    box-shadow: 5px 5px 0 var(--blue);
  }

  .folder-title {
    font-size: 15px;
  }

  .folder-visual::before {
    font-size: 48px;
  }

  .dock-button {
    font-size: 7px;
  }

  .dock-icon {
    font-size: 14px;
  }

  .file-viewer {
    padding: 10px 8px 67px;
  }

  .paper-stack {
    display: none;
  }

  .viewer-document {
    width: 100%;
    height: calc(100svh - 77px);
    grid-template-columns: 1fr;
    grid-template-rows: 48px 1fr;
  }

  .viewer-spine {
    flex-direction: row;
    padding: 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--black);
  }

  .viewer-number,
  .viewer-spine > span:last-child {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .viewer-spine-title {
    max-height: none;
    font-size: 18px;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .viewer-header {
    padding: 12px;
  }

  .viewer-header h2 {
    font-size: 38px;
  }

  .viewer-close {
    width: 31px;
    height: 31px;
  }

  .page-word {
    font-size: 72px;
  }

  .viewer-footer {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }

  .viewer-navigation {
    width: 100%;
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
