/* stack — 세로 고리를 도는 휜 카드 기둥 + 최소 사이드바 (인스포라 P015 재현). 머리줄 아래까지 화면 전체를 쓴다. */
:root[data-mode="stack"] { --stk-bg: #f0f0f0; --stk-ink: #181818; --stk-link: #5a5a5a; --stk-lab: #3a3a3a; --stk-glow: 255,255,255; }
:root[data-mode="stack"][data-theme="dark"] { --stk-bg: #0c0c0d; --stk-ink: #ececee; --stk-link: #a2a2a9; --stk-lab: #c9c9cf; --stk-glow: 150,150,165; }
:root[data-mode="stack"], :root[data-mode="stack"] body { overflow: hidden; height: 100%; }
:root[data-mode="stack"] body { background: var(--stk-bg); }
:root[data-mode="stack"] .intro, :root[data-mode="stack"] .bar, :root[data-mode="stack"] .about, :root[data-mode="stack"] .foot { display: none; }
:root[data-mode="stack"] main { margin: 0; }
:root[data-mode="stack"] .top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; pointer-events: none; }
:root[data-mode="stack"] .top > * { pointer-events: auto; }
:root[data-mode="stack"] .modeview.mode-stack { width: 100%; max-width: none; margin: 0; }
.mode-stack { position: fixed; inset: 0; z-index: 1; height: auto; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; background: var(--stk-bg); }

/* 고리: 칸(.stk-card)은 원통 축에서 rotateX 만, 가로 띠(.stk-st)는 rotateX(띠 각) translateZ(반지름)으로 원통 면에 붙는다 */
.stk-stage { position: absolute; inset: 0; }
.stk-rig { position: absolute; width: 0; height: 0; transform-style: preserve-3d; }
.stk-card { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.mode-stack.drag .stk-card { cursor: grabbing; }
.stk-card > span { position: absolute; left: 0; top: 0; width: 0; height: 0; display: block; transform-style: preserve-3d; }
.stk-st > span { position: absolute; display: block; overflow: hidden; background-color: var(--bg-c, #222); background-repeat: no-repeat;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.stk-st > .b { transform: rotateY(180deg); }   /* 고리 뒤쪽에서는 그림이 180° 돌아가 보인다(레퍼런스와 같음) */
/* 어둡게 하는 막에 will-change 를 주면 크롬이 띠 그림을 낮은 해상도로 굳혀 흐려진다 → 주지 않는다 */
.stk-st .dim { position: absolute; inset: 0; display: block; background: none; pointer-events: none; }
.stk-st > .b .dim { background: #000; opacity: .54; }
.stk-gl .gi { position: absolute; display: block; opacity: 0; pointer-events: none; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 0 calc(var(--cw) * .05) calc(var(--cw) * .012) rgba(var(--stk-glow), .92); }
.stk-lw .lab { position: absolute; top: calc(var(--lab) * -.5); font: 500 var(--lab)/1 "Pretendard Variable", Pretendard, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.005em; white-space: nowrap; color: var(--stk-lab); backface-visibility: hidden; -webkit-backface-visibility: hidden; pointer-events: none; }

/* 사이드바: 이름(넓은 그로테스크 대문자) + 회색 링크 세 줄. 위치 · 크기는 stack.js 가 화면 높이로 맞춘다 */
.stk-side { position: absolute; left: 22.7%; top: 0; z-index: 3; pointer-events: none; }
.stk-name { position: absolute; left: 0; top: 0; font-family: "Archivo", "Helvetica Neue", Arial, sans-serif; font-stretch: 118%; font-weight: 560; font-size: 15px;
  letter-spacing: .065em; line-height: 1; color: var(--stk-ink); white-space: nowrap; text-transform: uppercase; font-synthesis: none; }
.stk-links { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; font-size: 14px; line-height: 17.5px;
  transition: opacity .12s ease; }
.stk-links.sw { opacity: .82; }
.stk-l { font: inherit; font-weight: 400; letter-spacing: -.003em; color: var(--stk-link); white-space: nowrap; margin: 0; padding: 0; border: 0; background: none;
  text-align: left; pointer-events: auto; cursor: default; max-width: var(--side-w, 420px); overflow: hidden; text-overflow: ellipsis; }
button.stk-l { cursor: pointer; transition: color .15s ease; }
button.stk-l:hover, button.stk-l:focus-visible { color: var(--stk-ink); outline: none; }
.stk-l .nw { white-space: nowrap; }
.mode-stack.empty .stk-stage { display: none; }

/* 폰: 사이드바는 왼쪽 세로 가운데, 기둥은 오른쪽 */
.mode-stack.narrow .stk-name { position: static; font-size: 11px; letter-spacing: .06em; line-height: 1.3; }
.mode-stack.narrow .stk-links { position: static; margin-top: 18px; gap: 8px; font-size: 12px; line-height: 1.4; }
.mode-stack.narrow .stk-l { white-space: normal; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; max-width: 100%; overflow: visible; }
