:root {
  --paper: #1c1b19;    /* 차콜 종이 */
  --paper-2: #24231f;
  --line: #3b3934;
  --ivory: #efe8d8;    /* 글자 */
  --ivory-2: #b8b0a0;  /* 보조 글자 */
  --photo: #f1ebde;    /* 인화지 */
  --ink: #2a2925;      /* 인화지 위 손글씨 */
  --date: #f2883a;     /* 날짜 인쇄에만 */
  --sans: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --mark: "DM Serif Display", Georgia, serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --hand: "Nanum Pen Script", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
html::-webkit-scrollbar { width: 6px; }
html::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
body {
  margin: 0; color: var(--ivory); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  /* 낮은 대비의 종이 결 */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .96 0 0 0 0 .9 0 0 0 .055 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(ellipse at 50% 0%, #26241f, var(--paper) 70%) fixed,
    var(--paper);
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ivory); outline-offset: 3px; border-radius: 4px; }
h1, h2, p, figure, ol { margin: 0; }
ol { padding: 0; list-style: none; }
img { display: block; }

.sheet { max-width: 1160px; margin: 0 auto; padding: 32px 40px 48px; }

/* ── 머리 ───────────── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.who { display: flex; align-items: center; gap: 22px; }
/* 작은 인화 사진 한 장 */
.avatar { flex: none; width: 96px; height: 96px; padding: 5px; background: var(--photo); border-radius: 2px; object-fit: cover; transform: rotate(-3deg); box-shadow: 0 8px 18px rgba(0,0,0,.45); }
.mark { font: 400 64px/.95 var(--mark); letter-spacing: -.02em; }
.intro { margin-top: 10px; font-size: 16px; color: var(--ivory); word-break: keep-all; }
.nav { display: flex; gap: 8px; flex: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--ivory); color: var(--paper); }

.label { display: flex; align-items: baseline; gap: 10px; font: 700 13px/1 var(--sans); letter-spacing: .02em; color: var(--ivory); }
.label small { font-weight: 400; color: var(--ivory-2); }

/* ── 장면 ───────────── */
.scene { padding: 22px 0 8px; }
.scene .label { margin-bottom: 16px; }
.stage { display: grid; grid-template-columns: minmax(0, 680px) minmax(240px, 1fr); gap: 0 44px; align-items: start; }
.picks { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.picks button {
  display: grid; grid-template-columns: 72px 2.6ch minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 12px;
  width: 100%; min-height: 72px; padding: 10px 10px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ivory);
  font: inherit; text-align: left; cursor: pointer; transition: background .15s, color .15s;
}
.picks .thumb { grid-row: span 2; width: 72px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; opacity: .55; transition: opacity .15s; }
.picks .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.picks .n { grid-row: span 2; font: 700 12px var(--mono); color: var(--ivory-2); }
.picks .t { font-size: 17px; font-weight: 700; line-height: 1.25; word-break: keep-all; }
.picks .k { font-size: 12px; color: var(--ivory-2); }
.picks button:hover { background: var(--paper-2); }
.to-works { grid-column: 2; grid-row: 1; align-self: end; justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--ivory-2); text-underline-offset: 4px; }
.to-works:hover { color: var(--ivory); }
.picks button:hover .thumb { opacity: .85; }
.picks button[aria-selected="true"] { background: var(--ivory); color: var(--paper); }
.picks button[aria-selected="true"] .thumb { opacity: 1; }
.picks button[aria-selected="true"] .n, .picks button[aria-selected="true"] .k { color: #5d584e; }

/* 인화지 한 장 */
.print {
  grid-column: 1; grid-row: 1; position: relative; padding: 32px 16px 0; background: var(--photo); color: var(--ink);
  border-radius: 2px; transform: rotate(-1deg);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 18px 40px rgba(0,0,0,.45), 0 2px 4px rgba(0,0,0,.3);
}
.print .no { position: absolute; left: 16px; top: 9px; font: 700 11px/1 var(--mono); letter-spacing: .06em; color: #6d675b; white-space: pre; }
.pic { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #111; }
.pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pic time {
  position: absolute; right: 12px; bottom: 9px; font: 700 15px/1 var(--mono); letter-spacing: .08em; color: var(--date);
  text-shadow: 0 0 6px rgba(242, 136, 58, .55), 0 0 1px rgba(0,0,0,.6);
}
.pic time[hidden] { display: none; }
.print figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 6px 2px 8px; }
.memo { font: 27px/1.1 var(--hand); color: var(--ink); word-break: keep-all; }
.go {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--paper); color: var(--ivory); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.go:hover { background: #000; }
.go:focus-visible { outline-color: var(--paper); }
/* 사진을 갈아 끼울 때 아주 짧게 */
.print .pic, .print figcaption, .print .no { transition: opacity .14s ease, transform .14s ease; }
.print.swap .pic, .print.swap figcaption, .print.swap .no { opacity: 0; transform: translateY(4px); }

/* ── 만든 것 ───────────── */
.works { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.works-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.all { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; color: var(--ivory-2); text-underline-offset: 4px; }
.all:hover { color: var(--ivory); }
.list li a {
  display: grid; grid-template-columns: 88px 2.6ch 11em 4.5em minmax(0, 1fr) 10.5em; align-items: center; column-gap: 16px;
  min-height: 72px; padding: 10px 8px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .15s;
}
.list li:first-child a { border-top: 1px solid var(--line); }
.list .thumb { width: 88px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 2px; opacity: .8; }
.list .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.list .n { font: 700 12px var(--mono); color: var(--ivory-2); }
.list .t { font-size: 16px; font-weight: 700; line-height: 1.3; word-break: keep-all; }
.list .k { font-size: 12px; color: var(--ivory-2); }
.list .d { font-size: 14px; color: var(--ivory-2); line-height: 1.5; word-break: keep-all; }
.list .c { justify-self: end; font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.list a:hover { background: var(--paper-2); }
.list a:hover .thumb { opacity: 1; }
.list a:hover .c { text-decoration-color: var(--ivory); }
.wip { margin-top: 18px; font-size: 13px; color: var(--ivory-2); word-break: keep-all; }
.wip b { margin-right: 6px; color: var(--ivory); font-weight: 700; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 56px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ivory-2); }

/* ── 좁은 화면: 목록을 사진 위로 ───────────── */
@media (max-width: 860px) {
  .sheet { padding: 22px 16px 40px; }
  .head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .mark { font-size: 52px; }
  .who { gap: 16px; }
  .avatar { width: 72px; height: 72px; padding: 4px; }
  .intro { font-size: 15px; }
  .stage { grid-template-columns: 1fr; gap: 16px; }
  .picks { grid-column: 1; grid-row: 1; flex-direction: row; gap: 6px; border-top: 0; }
  .picks button {
    flex: 1; grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 2px; min-height: 64px; padding: 8px 6px;
    border: 1px solid var(--line); border-radius: 8px; text-align: center; justify-items: center;
  }
  .picks .thumb { display: none; }
  .picks .n, .picks .t, .picks .k { grid-row: auto; }
  .picks .t { font-size: 15px; }
  .print { grid-row: 2; padding: 28px 10px 0; transform: rotate(-.6deg); }
  .to-works { grid-column: 1; grid-row: 3; }
  .print .no { left: 10px; top: 8px; }
  .print figcaption { flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px 2px 12px; }
  .memo { font-size: 24px; }
  .works { margin-top: 44px; }
  .works-head { flex-direction: column; gap: 8px; }
  .list li a { grid-template-columns: 76px minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 12px 4px; align-items: start; }
  .list .thumb { width: 76px; grid-row: 1 / span 4; margin-top: 3px; }
  .list .n { display: none; }
  .list .k { grid-column: 2; grid-row: 1; }
  .list .t { grid-column: 2; grid-row: 2; }
  .list .d { grid-column: 2; grid-row: 3; font-size: 13px; }
  .list .c { grid-column: 2; grid-row: 4; display: inline-flex; align-items: center; min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .print .pic, .print figcaption, .print .no, .picks button, .nav a { transition: none; }
}
