/* room v01 (2026-10-17) — dang v25 css에서 룩·입은 사진·바인더·크게 보기를 뺌. 첫 화면 한 줄(.hero__line) 더함.
   (아래는 dang에서 이어 온 규칙) 흰 바탕·Pretendard.
   DANG만의 차이: 타자기 모노 글자(대문자, 양끝 정렬), 옛 웹 링크 파랑 한 색, 픽셀 커서, 1px 선·작은 번호.
   규칙: 격자는 단정하게, 칸마다 딱 한 번만 깬다. 소품 흉내(종이·테이프·손글씨)는 쓰지 않는다. */

@font-face {
  font-family: 'Pretendard';
  src: url('fonts/PretendardVariable.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
/* 로고 시안 폰트(2026-10-14 당니님). 개인용만 무료 — 배포 전 라이선스 구매 또는 교체. 40_자산/폰트/출처.md */
:root {
  --paper: #FFFFFF;
  --ink: #000000;
  --muted: #8A8A8A;
  --empty: #F1F1F1;
  --link: #0000EE;          /* 옛 웹 링크 파랑. 이 페이지의 유일한 색 */

  --font: 'Pretendard', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --logo: 'Quentin';   /* 로고 폰트: Quentin 32px로 결정(2026-10-14 당니님). 다른 안 'High Spirited' 42px | 'Amsterdam' 30px — 주소 끝 ?logo=high 처럼 바꿔 볼 수 있음(js 맨 위) */
  --logo-size: 32px;
  --mono: 'Courier New', Courier, ui-monospace, monospace;   /* 시스템 타자기 글꼴. 설치·CDN 없음 */
  --xs: 10.5px;
  --sm: 12px;

  --side: clamp(12px, 1.7vw, 24px);
  --gap: clamp(8px, 1vw, 14px);
  --bar: 52px;
  --section: clamp(120px, 14vw, 220px);
  --col: min(1120px, 100vw - var(--side) * 2);   /* 모든 칸이 같은 폭 안에 선다 */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; cursor: var(--cur, auto); }
a, button, [role="button"], .words__hole { cursor: var(--cur-link, pointer); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--sm);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--link); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
ol, ul { list-style: none; margin: 0; padding: 0; }
h1, h2, p, figure { margin: 0; }
:focus-visible { outline: 1px solid var(--link); outline-offset: 3px; }

.mono { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0; }

/* ── 상단 바: 메뉴 / dang / 서울 시각 ── */
.bar {
  position: sticky; top: 0; z-index: 20;
  height: var(--bar);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--side);
  background: var(--paper);
  font-size: var(--xs);
}
.bar__nav { display: flex; gap: 22px; text-transform: uppercase; letter-spacing: .02em; }
.bar__mark { font-family: var(--logo), var(--font); font-size: var(--logo-size); font-weight: 400; letter-spacing: 0; line-height: 1; padding-bottom: 0; }   /* 예전: Pretendard 23px 300, 자간 -.035em, 아래 3px */
.bar__mark:hover { color: var(--ink); }
.bar__clock { justify-self: end; font-size: 11px; font-variant-numeric: tabular-nums; }
.bar__clock span:first-child { color: var(--muted); }

/* ── 칸 머리: 1px 선 위에 왼쪽 모노 제목, 오른쪽 작은 읽기 ── */
.sec { padding: var(--section) 0 0; }

/* ═════ 1. 소개 글: 모니터 방에서 내려온 뒤 Words 앞 빈 곳 (v21) ═════ */
.intro { padding: clamp(16px, 2vw, 32px) var(--side) 0; /* 위 모니터 방 아래쪽이 이미 흰 바탕으로 사라지는 여백이라 칸 간격은 거의 안 둠(2026-10-16 당니님) */
  /* 휴대폰은 그림이 납작해 붙는 칸(pin) 안 그림 아래가 비므로, 그 빈 높이만큼 글을 끌어올린다. 계산 = (pin 높이 - 위 20px - 그림 높이) / 2 */
  margin-top: calc(-1 * max(0px, (100svh - var(--bar) - 20px - (100vw - var(--side) * 2) * 1533 / 1928) / 2));
  display: flex; justify-content: center; }
.intro__type { width: clamp(150px, 15vw, 210px); font-weight: 400; display: flex; flex-direction: column; gap: .1em; }
.intro + .words { padding-top: var(--section); }
.type-line { display: flex; justify-content: space-between; font-family: var(--mono); text-transform: uppercase; font-size: clamp(13px, 1.4vw, 19px); line-height: 1.25; }
.type-line[data-al="c"] { justify-content: center; }
.type-line[data-al="r"] { justify-content: flex-end; }
.type-line--small { font-size: 10px; line-height: 1.4; color: var(--muted); margin-top: 1.4em; }
.sec__head {
  width: var(--col); margin: 0 auto clamp(28px, 3.4vw, 52px);
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 7px;
  border-top: 1px solid var(--ink);
  font-size: 11px;
}
.sec__head h2 { font-size: inherit; font-weight: 700; }
.sec__head p { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }


/* 커서가 흩뿌리는 단어 */
.scatter { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }   /* 페이지 어디서나 커서를 따라다닌다 */
.scatter span {
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-size: 11px; white-space: nowrap;
  animation: drift 1.3s cubic-bezier(.2, .6, .3, 1) forwards;
}
.scatter span.is-blue { color: var(--link); }
@keyframes drift {
  0%   { opacity: 1; transform: translate(var(--x), var(--y)); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))); }
}

/* ═════ 2. 문장 속 괄호 썸네일 + 뚫린 사진 ═════ */
.words__line {
  width: min(var(--col), 900px); margin: 0 auto;
  font-size: clamp(15px, 1.75vw, 24px); line-height: 1.9;
  text-align: center; text-wrap: balance;
}
/* v23 받아 적기: 괄호 = 버튼. 겉 단어는 연한 회색, 바뀐 속 단어는 잉크색 */
.words__label { width: min(var(--col), 900px); margin: 0 auto 1.2em; text-align: center; font-size: 11px; color: var(--muted); }
.words__br {
  white-space: nowrap;
  font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; margin: 0;
  -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
.words__w { color: var(--muted); }
.words__br.is-done .words__w { color: var(--ink); }
.words__last { width: min(var(--col), 900px); margin: 1.6em auto 0; text-align: center; font-size: clamp(13px, 1.3vw, 17px); }
.words__last:empty { display: none; }
.scatter .words__fly { animation: none; color: var(--link); will-change: transform; }
.words__thumb {
  display: inline-block; vertical-align: -.28em;
  height: 1.3em; margin: 0 .12em;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px transparent;
  transition: box-shadow .15s;
}
.words__br.is-on .words__thumb { box-shadow: 0 0 0 1px var(--link); }
.words__photo {
  position: relative;
  width: min(var(--col), 900px); margin: clamp(48px, 6vw, 96px) auto 0;
  background-size: 100% 100%;
}
.words__hole {
  position: absolute;
  background: var(--paper);
  transition: background-color .25s ease;
}
.words__hole.is-on { background-color: transparent; box-shadow: inset 0 0 0 1px var(--link); }
.words__hole span {
  position: absolute; left: 3px; top: 2px;
  font-family: var(--mono); font-size: 10px; line-height: 1; color: var(--muted);
}
.words__hole.is-on span { color: var(--link); }


/* ═════ 5. 모니터 방: 회전 장면 위에 화면 18칸을 % 로 얹는다. 꺼진 화면은 장면 그대로(검정) ═════ */
.desk__stage {
  position: relative; overflow: hidden;
  width: min(100vw - var(--side) * 2, 1100px); margin: 0 auto;   /* 위 모니터 띠가 붙어 키가 커져서 폭을 줄임 → 사람(영상 화질)이 덜 크게 보인다 */
  cursor: var(--cur, default);
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.desk__bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.desk__room { position: absolute; left: 0; width: 100%; }
.desk__top { position: absolute; z-index: 1; left: 0; top: 0; width: 100%; pointer-events: none; }
/* 위 모니터 3대. 주사선은 셋 다 옅게 */
.scr--up { z-index: 2; }   /* 위 띠(z 1) 위에 */
.tv { position: absolute; z-index: 2; overflow: hidden; container-type: size; background: #050508; color: #fff; pointer-events: none; }
.tv::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px); }
.tv--rec { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }   /* gap 은 cq 단위를 쓰면 안 됨: 자기 자신이 아니라 바깥(없으면 화면) 기준이 된다 */
.tv--rec b { font-weight: 400; font-size: 13cqh; letter-spacing: .08em; display: flex; align-items: center; gap: .5em; }
.tv--rec b::before { content: ''; width: .62em; height: .62em; border-radius: 50%; background: var(--link); box-shadow: 0 0 .5em var(--link); animation: tv-blink 1.2s steps(1) infinite; }
.tv__tc { font-size: 15cqh; font-variant-numeric: tabular-nums; }
@keyframes tv-blink { 50% { opacity: 0; } }
.tv--ticker { background: var(--link); display: flex; align-items: center; }
.tv__run { white-space: pre; font-size: 14cqh; text-transform: uppercase; letter-spacing: .02em; animation: tv-run 40s linear infinite; }
@keyframes tv-run { to { transform: translateX(-50%); } }
.tv--radar { background: #050508 linear-gradient(rgba(0, 0, 238, .22) 1px, transparent 1px) 0 0 / 12.5cqw 12.5cqh, linear-gradient(90deg, rgba(0, 0, 238, .22) 1px, transparent 1px) 0 0 / 12.5cqw 12.5cqh; }
.tv__dot { position: absolute; left: 50%; top: 50%; width: 6cqw; height: 6cqw; margin: -3cqw 0 0 -3cqw; background: var(--link); box-shadow: 0 0 0 1cqw rgba(0, 0, 238, .35); transition: left .12s linear, top .12s linear; animation: tv-blink 1s steps(1) infinite; }
.tv--radar.is-live .tv__dot { animation: none; }
.tv__xy { position: absolute; left: 7cqw; bottom: 7cqh; font-size: 9cqh; color: rgba(255, 255, 255, .7); }
.desk__over { position: absolute; z-index: 3; pointer-events: none; }
.desk__front { position: absolute; z-index: 2; background-repeat: no-repeat; pointer-events: none; }
.scr { position: absolute; z-index: 1; overflow: hidden; container-type: size; cursor: var(--cur-link, pointer); }
.scr__in { position: absolute; inset: 0; opacity: 0; }
.scr.is-found .scr__in { opacity: 1; }
/* 켜질 때: 가운데 가로줄이 펴지며 한 번 깜빡(지지직 없이) */
.scr.is-flick .scr__in { animation: scr-on .32s ease-out both; }
@keyframes scr-on {
  0% { transform: scaleY(.02); filter: brightness(3); opacity: 1; }
  40% { transform: scaleY(1); filter: brightness(1.6); }
  55% { opacity: .55; }
  70% { opacity: 1; }
  100% { transform: none; filter: none; }
}
/* 주사선은 모든 켜진 화면에 아주 옅게 */
.scr__in::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 3px); }
.scr__in--code {
  background: var(--link); color: #fff;
  padding: 9cqh 8cqw; white-space: pre; font-size: 10.5cqh; line-height: 1.35; text-transform: none;
}
.scr__in--code::before { content: ''; }
.scr.is-found .scr__in--code { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.scr__in--word {
  display: grid; place-items: center; align-content: center; gap: 2cqh;
  background: var(--link); color: #fff; font-size: 26cqh; letter-spacing: .04em;
}
.scr__in--word small { font-size: 9cqh; opacity: .75; }
.scr__in--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.scr__in--cursor { background: var(--link); display: grid; place-items: center; }
.scr__in--cursor img { height: 62%; image-rendering: pixelated; }
.scr__in--wall { background-repeat: no-repeat; transition: opacity .4s ease; }

/* ── 푸터 ── */
.foot {
  display: flex; justify-content: space-between; gap: 24px;
  width: var(--col); margin: var(--section) auto 0;
  padding: 8px 0 22px;
  border-top: 1px solid var(--ink);
  font-size: var(--xs);
}
.foot .mono { font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .words__hole, .words__thumb { transition: none; }
  .scr.is-flick .scr__in, .tv__run, .tv--rec b::before, .tv__dot { animation: none; }
}

/* ── 휴대폰: 3열 x 5줄. 가운데 칸은 그대로 가운데 ── */
@media (max-width: 700px) {
  :root { --bar: 48px; }
  .bar { grid-template-columns: auto 1fr; }
  .bar__mark { order: -1; }
  .bar__nav { justify-content: flex-end; gap: 12px; font-size: 9.5px; }
  .bar__clock { display: none; }
  .bar__mark { font-size: calc(var(--logo-size) * .9); }
  .foot { flex-direction: column; gap: 4px; }
}

/* ═════ 0. 첫 화면 모니터 방: 화면에 붙어 있는 동안 스크롤로 다가간다 ═════ */
.hero { height: 210svh; }
.hero__pin {
  position: sticky; top: var(--bar);
  height: calc(100svh - var(--bar));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero__note { position: absolute; top: 12px; right: var(--side); z-index: 5; font-size: var(--xs); color: var(--muted); }
.is-rolling .desk__over, .is-rolling .desk__front, .is-rolling .scr:not(.scr--up) { visibility: hidden; }
.hero .desk__stage {
  /* 아래쪽은 흰 바탕으로 서서히 사라진다(딱 잘린 끝이 안 보이게) */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%); mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  width: min(100vw - var(--side) * 2, (100svh - var(--bar) - 40px) * 1928 / 1533); margin: 20px auto 0; }

/* ═════ 소개 글 모임 모션(v24, 2026-10-16 당니님): 흩어진 단어가 날아와 글자가 된다. 움직임은 dang-v24.js introGather ═════ */
.intro { position: relative; overflow-x: clip; }   /* 출발한 단어가 화면 옆으로 삐져나가도 가로 스크롤이 안 생기게 */
.intro__ch { display: inline-block; }
.intro__fly {
  position: absolute; left: 0; top: 0; pointer-events: none;
  font-family: var(--mono); font-size: 11px; white-space: nowrap;
  will-change: transform, opacity;
}
.intro__fly.is-blue { color: var(--link); }

/* ═════ room v01: 첫 화면 한 줄 + 제목 ═════
   한 줄은 모니터 방 왼쪽 위(오른쪽 위 안내 글과 마주 봄). 보자마자 읽히게 모노 대문자가 아닌 Pretendard 보통 글자 */
.bar__mark--room { font-family: var(--font); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.hero__line {
  position: absolute; top: 10px; left: var(--side); z-index: 5;
  max-width: min(34ch, 46vw);
  font-size: clamp(14px, 1.25vw, 18px); line-height: 1.35; font-weight: 500; letter-spacing: -.01em;
}
.hero__line::before { content: ''; display: inline-block; width: .5em; height: .5em; margin: 0 .45em .1em 0; background: var(--link); }
@media (max-width: 700px) {
  .hero__line { top: 12px; right: var(--side); max-width: none; font-size: 15px; }
  .hero__note { top: auto; bottom: 14px; }
}
