/* seesawseen studio — 공통 스타일 (2026-11-22, aperture 시안 이식)
   출처: design/homepage/aperture.html (B안 〈조리개 내비〉)
   체계:
   · 글자 16px 1가지 · 행 24px · 세로 간격 = 24px의 배수
   · 앞 축 xF = min(W/3, W − 16 − 256), 뒤 축 xB = W − xF
   · 홈: 구멍이 첫 화면 세로 가운데 → 스크롤하면 맨 위 띠(y=24)에 붙는다
   · 하위 페이지: 구멍이 처음부터 맨 위 띠에 있다 (body.sub)
   · 구멍을 누르면 구멍 중심에서 원이 퍼지며 뒷면 목록이 열린다 (assets/aperture.js)
   · JS가 없으면 구멍 = #index 링크, 뒷면 = 문서 끝 검정 구역 */
:root {
  --ink:#000; --paper:#fff; --photo:#8c8c8c; --todo:#d0002a;
  --W:100vw;
  --xF:min(calc(var(--W) / 3), calc(var(--W) - 272px));
  --k:4;
  --hy:max(calc((var(--k) + 7) * 24px), 360px);
  --oy:24px;
  --line:min(36em, calc(var(--W) - var(--xF) - 16px));
}
@supports (top: round(50svh, 24px)) {
  :root { --hy:max(calc((var(--k) + 7) * 24px), round(50svh, 24px)); }
}
@media (min-width:768px) { :root { --k:6; } }
body.sub { --hy:24px; }

* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--paper); color:var(--ink);
       font:400 16px/24px "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
       letter-spacing:0; font-feature-settings:"tnum"; -webkit-font-smoothing:antialiased; }
h1, h2, h3, p, ul, ol, dl { margin:0; padding:0; font:inherit; }
ul, ol { list-style:none; }
strong { font-weight:inherit; }
.la { letter-spacing:.02em; }
.pre { white-space:pre; }
.todo { color:var(--todo); }

a, .tx { color:inherit; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:5px; }
.tx { font:inherit; letter-spacing:inherit; background:none; border:0; padding:0; margin:0;
      text-align:inherit; cursor:pointer; min-height:24px; }
a:focus-visible, .tx:focus-visible, summary:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.skip { position:absolute; left:16px; top:-48px; z-index:50; background:var(--paper); }
.skip:focus { top:12px; }

/* ── 앞면(흰 종이) ───────────────────────── */
#page { position:relative; }
.band { position:fixed; top:0; left:0; right:0; height:48px; background:var(--paper); z-index:5; }

.track { position:absolute; top:0; bottom:0; left:var(--xF); width:0; z-index:6; }
.holebox { position:sticky; top:16px; margin-top:calc(var(--hy) - 8px); width:0; height:16px; }
.hole { position:absolute; left:-8px; top:0; width:16px; height:16px; border-radius:50%;
        background:var(--photo); border:0; padding:0; margin:0; cursor:pointer; display:block; }
.hole::after { content:""; position:absolute; inset:-16px; border-radius:50%; }
.hole:focus-visible { outline:2px solid var(--ink); outline-offset:4px; }
.word { position:absolute; top:-4px; white-space:nowrap; pointer-events:none; }
.brand { position:fixed; z-index:6; left:calc(var(--xF) + 16px); top:12px; text-decoration:none; }

/* 홈 첫 화면. 높이 2·hy − 12: 뒤따르는 글줄이 구멍과 같은 행 격자에 놓인다 */
.cover { position:relative; height:calc(var(--hy) * 2 - 12px); }
.cover .up, .cover .dn { position:absolute; left:var(--xF); width:var(--line); word-break:keep-all; }
.cover .up { bottom:calc(var(--hy) * 2 - 12px - (var(--hy) - var(--k) * 24px + 12px)); }
.cover .up a { white-space:pre; }
.cover .dn { top:calc(var(--hy) + (var(--k) + 1) * 24px - 12px); }
.cover h1 { position:absolute; left:calc(var(--xF) + 16px); top:calc(var(--hy) - 12px); margin:0; }

/* 본문 구역: 앞 축에서 시작하는 한 단 */
.sec { margin-left:var(--xF); max-width:var(--line); padding-top:96px; scroll-margin-top:36px;
       word-break:keep-all; overflow-wrap:anywhere; }
main > .sec:last-child, footer.sec { padding-bottom:192px; }
.gap { margin-top:24px; }
.sec h2:focus { outline:none; }
.more::after, .button::after { content:" →"; }
.flow > .button { display:table; }

/* 하위 페이지 긴 글: 한 덩어리마다 한 행 띄우고, 제목 앞은 세 행 */
.flow > * + * { margin-top:24px; }
.flow > h2 { margin-top:72px; }
.flow > h2 + * { margin-top:0; }
.flow > h1 + .lead { margin-top:24px; }
.flow .items > li + li { margin-top:24px; }
.flow ol { counter-reset:n; }
.flow ol > li { counter-increment:n; display:grid; grid-template-columns:3em 1fr; }
.flow ol > li::before { content:counter(n, decimal-leading-zero); letter-spacing:.02em; }
.flow > details + details { margin-top:0; }
.flow > details:first-of-type, .flow > h2 + details { margin-top:0; }
.flow > details:last-of-type + * { margin-top:72px; }
summary { cursor:pointer; list-style:none; display:grid; grid-template-columns:1fr 1.5em; }
summary::-webkit-details-marker { display:none; }
summary::after { content:"+"; text-align:right; }
details[open] > summary::after { content:"−"; }
details > p { margin-bottom:24px; }
.price ul { margin-top:24px; }
.price .small { margin-top:24px; }

/* ── 뒷면(검정 종이): 목록 ───────────────── */
.back { background:var(--ink); color:var(--paper); font-weight:500; }
.back .hole:focus-visible { outline-color:var(--paper); }
.back a[aria-current="page"] { text-decoration-thickness:3px; }

/* JS 없을 때: 문서 끝 검정 구역 */
#index { padding:96px var(--xF) 192px 16px; text-align:right; word-break:keep-all; }
.no-js #index > .hole, .no-js #index > .word { display:none; }

/* JS 있을 때: 구멍에서 열리는 화면 */
.js .dlg { position:fixed; inset:0; z-index:20; visibility:hidden; clip-path:circle(0px at 0 0);
           overflow-y:auto; overscroll-behavior:contain; }
.js .dlg.open { visibility:visible; }
.js #index { padding:calc(var(--oy) + 60px) var(--xF) 96px 16px; }
.js .dlg > .hole { display:block; left:auto; right:calc(var(--xF) - 8px); top:calc(var(--oy) - 8px); }
.js .dlg > .word { display:block; right:calc(var(--xF) + 16px); top:calc(var(--oy) - 12px); }
.no-js .brand { position:absolute; }
