/* 리딩룸 '사람' 칸 인물 액자(person-shelf.js). 쪽 넘기기는 장소 도장첩(.pp-book)과 같은 손 느낌. 상세 팝업은 스크린샷 팝업(.ce-pop, capture-explorer.css) 그대로. */
.ps, .ps * { box-sizing: border-box; }
.ps-book { position: relative; overflow: hidden; height: 460px; touch-action: pan-y; }
.ps-book-loading .lens-message { height: 100%; min-height: 0; }
.ps-track { display: flex; height: 100%; will-change: transform; }
.ps-spread { flex: none; width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; padding: 10px 10px 22px; }
.ps-page { display: grid; gap: 8px; justify-content: center; align-content: center; }
.ps-frame { padding: 0; border: 0; background: none; line-height: 0; border-radius: 4px; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: transform .16s, opacity .16s, box-shadow .16s; }
.ps-frame:active { transform: scale(.97); }
.ps-stage { display: block; aspect-ratio: 3 / 4; }
.ps-frame { position: relative; }
.ps-stage .pt-theater { width: 100%; }
.ps-fail { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 4px; background: var(--pt-board, #e6dac4); color: #8a7552; font: 700 12px/1.2 "Nanum Myeongjo", serif; }
.ps-folio { position: absolute; right: 12px; bottom: 4px; font: 500 10px "IBM Plex Mono", ui-monospace, monospace; color: var(--muted, #9a907e); }
/* 끌어 합치기: 든 액자는 자리에서 흐려지고, 작고 살짝 투명한 사본이 손가락을 따라온다. 놓을 액자는 테두리로 표시. */
.ps-frame.is-lifted { opacity: .28; }
.ps-frame.is-drop { transform: scale(1.06); box-shadow: 0 0 0 3px var(--accent, #007aff); }
.ps-ghost { position: fixed; left: 0; top: 0; z-index: 2200; pointer-events: none; opacity: .72; transform-origin: 50% 50%; transition: none; filter: drop-shadow(0 10px 16px rgba(0,0,0,.35)); }
/* 상세 팝업 고르기 줄: 공유 · 장수 · 맨 앞장 · 빼기 · 삭제 */
.ps-pop .ce-photo { position: relative; }
.ps-hero-mark { position: absolute; left: 4px; top: 4px; padding: 2px 5px; border-radius: 6px; background: rgba(0,0,0,.6); color: #fff; font: 600 10px/1.2 -apple-system, system-ui, sans-serif; font-style: normal; pointer-events: none; }

/* 받지 못한 미리보기는 깨진 그림 대신 빈 칸 */
.ps-pop .ce-photo img.is-missing { visibility: hidden; }

/* 이름 없는 묶음 팝업 맨 위: 이름 붙이기(2026-10-15 deneb) */
.ps-pop .ps-name { display: flex; gap: 8px; margin: 10px 10px 0; }
.ps-pop .ps-name input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid #d1d1d6; border-radius: 10px; background: #fff; color: #111; }
.ps-pop .ps-name button { font: inherit; font-size: 15px; font-weight: 700; padding: 9px 14px; border: 0; border-radius: 10px; background: #0a84ff; color: #fff; }
.ps-note { margin: 0 0 6px; font-size: 12px; color: var(--muted, #8a8a8e); text-align: center; }
/* 안내가 없을 때도 줄 자리는 남긴다 — 분류 상태에 따라 안내가 생겼다 사라질 때마다 아래 MY LIBRARY 가 한 줄씩 오르내렸다(2026-10-21 홈 글리치). */
.ps-note[hidden] { display: block; visibility: hidden; }
.ps-note:empty::before { content: "\00a0"; }
html.ps-lifting, html.ps-lifting body { overflow: hidden; overscroll-behavior: none; touch-action: none; }
/* 고르기: 오른쪽 위 삭제·공유·빼기, 아래 앞 5겹 칸(고른 순서, 2026-10-15 deneb) */
.ps-acts { justify-self: end; display: flex; gap: 2px; }
.ps-acts button { width: 36px; height: 44px; padding: 0; border: 0; background: none; color: var(--ce-blue, #007aff); }
.ps-acts button.is-danger { color: #ff3b30; }
.ps-acts button:disabled { opacity: .35; }
.ps-acts svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ps-pop .ce-pop-tools.ps-front { grid-template-columns: auto 1fr; gap: 8px; }
.ps-front-label { font-size: 12px; color: var(--ce-label2, #8a8a8e); }
.ps-slots { display: grid; grid-template-columns: repeat(5, 40px); gap: 6px; justify-content: start; }
.ps-pop .ce-pop-tools .ps-slot { position: relative; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: rgba(120,120,128,.12); }
.ps-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-slot.is-empty { display: block; border: 1px dashed rgba(120,120,128,.45); box-sizing: border-box; }
.ps-slot b { position: absolute; left: 2px; bottom: 1px; font: 700 10px/1 -apple-system, system-ui, sans-serif; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.8); }
.ps-slot.is-empty b { color: var(--ce-label2, #8a8a8e); text-shadow: none; }

/* 사람 상세 창: 후보 확인 · 다른 묶음 찾기 단추(2026-10-16 deneb·GPT) */
.ps-pop .ps-review { display: flex; gap: 8px; margin: 10px 10px 0; }
.ps-pop .ps-review[hidden] { display: none; }
.ps-pop .ps-review button { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: var(--ce-fill, #e5e5ea); color: var(--ce-blue, #007aff); font: 600 14px/1 inherit; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 확인 시트(person-review.js): 한 화면에 들어가는 만큼만 격자, 스크롤 없음(POPUP_DESIGN_RULES) */
.pr-pop .ce-pop-card { overflow: hidden; }
.pr-pop [data-pr-next][hidden] { visibility: hidden; display: block; }
.pr-info { flex: none; margin: 8px 12px 0; min-height: 16px; font-size: 12px; line-height: 1.35; color: var(--ce-label2); }
.pr-grid { flex: 1; min-height: 0; overflow: hidden; display: grid; gap: 6px; justify-content: center; align-content: start; padding: 8px 10px; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
/* 좌우로 쓸어 쪽을 넘길 때 살짝 밀려 들어온다 */
.pr-grid.is-from-right { animation: pr-in-right .18s ease-out; }
.pr-grid.is-from-left { animation: pr-in-left .18s ease-out; }
@keyframes pr-in-right { from { transform: translateX(28px); opacity: .35; } }
@keyframes pr-in-left { from { transform: translateX(-28px); opacity: .35; } }
.pr-tile { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 4px; border: 0; border-radius: 10px; background: var(--ce-fill, #e5e5ea); color: var(--ce-label); text-align: left; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.pr-tile.is-part { padding: 0; border-radius: 6px; overflow: hidden; }
.pr-tile.is-part canvas { width: 100%; height: 100%; display: block; }
.pr-faces { display: flex; gap: 3px; }
.pr-faces canvas, .pr-faces img { flex: none; display: block; border-radius: 6px; background: rgba(120,120,128,.18); object-fit: cover; pointer-events: none; }
/* 후보 확인(사진 미리보기, 2026-10-18 deneb): 칸 없이 사진만 촘촘히, 고른 사진만 파란 테두리, 위아래로 굴려 본다(사진 목록 = 열람 본문). 크게 보기는 사진 전체 */
.pr-grid.pr-photo-grid { gap: 2px; padding: 6px 8px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
.pr-photo { position: relative; display: block; cursor: pointer; outline: none; min-width: 0; padding: 0; border: 0; border-radius: 0; background: rgba(120,120,128,.18); overflow: hidden; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.pr-photo img { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; }
.pr-photo.is-picked::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--ce-blue, #007aff); pointer-events: none; }
.pr-grid.pr-photo-grid.pr-photo-big { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.pr-photo.is-big { width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; background: none; }
.pr-photo.is-big img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.pr-photo.is-big.is-picked::after { display: none; }
.pr-big-frame { position: relative; display: block; }
.pr-big-frame img { display: block; width: 100%; height: 100%; }
.pr-ring { position: absolute; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.25); pointer-events: none; }
.pr-photo.is-big.is-picked img { box-shadow: 0 0 0 4px var(--ce-blue, #007aff); }
.pr-photo { transition: transform .12s ease-out; }
.pr-photo.is-pinch { transform: scale(1.12); z-index: 1; }
.pr-photo.is-big.is-pinch { transform: scale(.92); }
.pr-grid.is-zoom-in { animation: pr-zoom-in .18s ease-out; }
.pr-grid.is-zoom-out { animation: pr-zoom-out .18s ease-out; }
@keyframes pr-zoom-in { from { transform: scale(.88); opacity: .3; } }
@keyframes pr-zoom-out { from { transform: scale(1.1); opacity: .3; } }
.pr-bar.is-tight button { font-size: 13px; }
/* 장면 칸: 셋째 사진 위 '+남은 장수'(답할 범위) */
.pr-more-wrap { position: relative; flex: none; display: block; }
.pr-more { position: absolute; right: 3px; bottom: 3px; padding: 0 5px; border-radius: 8px; background: rgba(0,0,0,.62); color: #fff; font: 700 11px/16px -apple-system, system-ui, sans-serif; font-style: normal; pointer-events: none; }
.pr-cap { display: block; min-width: 0; padding: 0 2px; font-size: 11px; line-height: 16px; color: var(--ce-label2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-cap b { color: var(--ce-label); font-weight: 700; }
.pr-open { position: absolute; right: 2px; bottom: 0; width: 28px; height: 22px; display: grid; place-items: center; font-style: normal; font-size: 14px; color: var(--ce-blue, #007aff); }
.pr-check { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #fff; background: rgba(0,0,0,.18); box-shadow: 0 0 2px rgba(0,0,0,.4); pointer-events: none; }
.pr-tile.is-picked { box-shadow: 0 0 0 3px var(--ce-blue, #007aff); }
.pr-tile.is-picked .pr-check { background: var(--ce-blue, #007aff); }
.pr-tile.is-picked .pr-check::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pr-undo { flex: none; display: flex; align-items: center; gap: 8px; margin: 0 12px; font-size: 12px; color: var(--ce-label2); }
.pr-undo[hidden] { display: none; }
.pr-undo span { flex: 1; min-width: 0; }
.pr-undo button { flex: none; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--ce-blue, #007aff); font: 600 13px inherit; font-family: inherit; }
.pr-bar { flex: none; display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 6px; padding: 8px 10px 10px; border-top: .5px solid var(--ce-sep); }
.pr-bar button { height: 44px; min-width: 0; padding: 0 4px; border: 0; border-radius: 12px; background: var(--ce-fill, #e5e5ea); color: var(--ce-label); font: 600 14px/1 inherit; font-family: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-bar button.is-yes { background: var(--ce-blue, #007aff); color: #fff; }
.pr-bar button:disabled { opacity: .4; }
.pr-refs { flex: none; display: flex; align-items: center; gap: 6px; margin: 6px 10px 0; padding: 6px 8px; border-radius: 10px; background: var(--ce-fill, #e5e5ea); font-size: 12px; color: var(--ce-label2); }
.pr-refs[hidden] { display: none; }
.pr-refs canvas { width: 44px; height: 44px; border-radius: 8px; background: rgba(120,120,128,.18); }
.pr-refs small { margin-left: auto; font-size: 11px; }
.pr-doubt { position: absolute; left: 3px; bottom: 3px; padding: 1px 4px; border-radius: 5px; background: rgba(0,0,0,.55); color: #fff; font: 600 10px/1.2 -apple-system, system-ui, sans-serif; font-style: normal; pointer-events: none; }
.pr-bar button[hidden] { display: none; }
.pr-refs.is-choices { gap: 6px; padding: 6px; }
.pr-choice { flex: 1 1 0; min-width: 40px; max-width: 96px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; border: 0; border-radius: 10px; background: var(--ce-sheet, #fff); color: var(--ce-label); font: inherit; }
.pr-choice canvas { width: 100%; max-width: 64px; height: auto; aspect-ratio: 1; border-radius: 8px; background: rgba(120,120,128,.18); }
.pr-choice b { max-width: 100%; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-choice:disabled { opacity: .55; }
.pr-choice:not(:disabled) { box-shadow: 0 0 0 2px var(--ce-blue, #007aff); }
.pr-choice.is-new i { display: grid; place-items: center; width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 8px; border: 1.5px dashed rgba(120,120,128,.5); font-style: normal; font-size: 22px; color: var(--ce-blue, #007aff); }
.pr-day { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; }
.pr-small { padding: 3px 7px; border: 1px solid var(--ce-sep, rgba(0,0,0,.2)); border-radius: 999px; background: none; color: var(--ce-label2); font: 600 11px inherit; font-family: inherit; }
.pr-small[aria-pressed="true"] { background: var(--ce-blue, #007aff); border-color: transparent; color: #fff; }
.pr-doubt.is-small { background: rgba(0,0,0,.4); }

/* 인물 상세 세 쪽(2026-10-18 deneb): 사진 · 후보 · 커버, 맨 아래 책갈피 모양 탭 */
.ps-pop .ce-pop-card { position: relative; }
.ps-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ps-pane[hidden], .ps-pop [data-ps-pane][hidden] { display: none; }
.pr-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ps-tabs { flex: none; display: flex; gap: 6px; padding: 0 14px 8px; background: var(--ce-fill, #e5e5ea); border-top: .5px solid var(--ce-sep, rgba(0,0,0,.12)); }
.ps-tabs button { flex: 1; min-width: 0; height: 40px; margin-top: -.5px; padding: 0 6px; border: 0; border-radius: 0 0 12px 12px; background: transparent; color: var(--ce-label2, #8a8a8e); font: 600 14px/1 -apple-system, system-ui, sans-serif; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.ps-tabs button small { font-size: 12px; font-weight: 500; }
.ps-tabs button[aria-selected="true"] { background: var(--ce-sheet, #fff); color: var(--ce-blue, #007aff); box-shadow: 0 3px 6px rgba(0,0,0,.08); }
/* 커버 쪽: 큰 상자에 커버, 아래 줄 = 왼쪽 끝 사진 전체 상자(세션표처럼) + 레이어 1~5 — 여섯 칸 모두 같은 크기(정사각) */
.ps-cover { position: relative; }
.ps-cover-box { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px; }
.ps-cover-frame { position: relative; line-height: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.18); background: rgba(120,120,128,.12); }
.ps-cover-frame .ps-stage { width: 100%; height: 100%; aspect-ratio: auto; }
.ps-cover-bar { flex: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 8px 10px; border-top: .5px solid var(--ce-sep, rgba(0,0,0,.12)); }
.ps-sheet-box { position: relative; aspect-ratio: 1; min-width: 0; padding: 0; overflow: hidden; border: 1.5px solid rgba(120,120,128,.45); border-radius: 12px; background: rgba(120,120,128,.14); box-sizing: border-box; }
.ps-sheet-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-caret { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; border-radius: 50%; background: #000000a6; }
.ps-caret::before { content: ""; position: absolute; left: 5px; top: 4px; width: 6px; height: 6px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); }
.ps-sheet-box[aria-expanded="true"] { border-color: var(--ce-blue, #007aff); }
.ps-sheet-box[aria-expanded="true"] .ps-caret::before { top: 7px; transform: rotate(-135deg); }
.ps-layers { display: contents; }
.ps-layer { position: relative; aspect-ratio: 1; min-width: 0; padding: 0; overflow: hidden; border: 1.5px solid transparent; border-radius: 12px; background: rgba(120,120,128,.14); box-sizing: border-box; }
.ps-layer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-layer.is-empty { display: block; border: 1.5px dashed rgba(120,120,128,.45); box-sizing: border-box; }
.ps-layer b { position: absolute; left: 4px; top: 3px; font: 700 12px/1 -apple-system, system-ui, sans-serif; color: #fff; text-shadow: 0 0 3px rgba(0,0,0,.8); }
.ps-layer.is-empty b { color: var(--ce-label2, #8a8a8e); text-shadow: none; }
/* 펼친 사진 전체: 커버 상자 자리를 덮는다(어두운 덮개 위) */
.ps-cover-sheet { position: absolute; left: 0; right: 0; top: 0; bottom: 66px; z-index: 2; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: rgba(20,20,22,.88); }
.ps-cover-sheet[hidden] { display: none; }
.ps-cover-hint { margin: 10px 12px 0; font-size: 12px; line-height: 1.35; color: #fff; }
.ps-cover-sheet .ce-photos { padding-bottom: 10px; }
.ps-cover-sheet .ce-photo.is-layer { box-shadow: inset 0 0 0 3px var(--ce-blue, #007aff) !important; }
.ps-cover-sheet .ce-photo.is-layer img { opacity: .85; }
.ps-layer-no { position: absolute; left: 4px; top: 4px; z-index: 1; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--ce-blue, #007aff); color: #fff; font: 700 11px/18px -apple-system, system-ui, sans-serif; font-style: normal; text-align: center; }

/* 선반 맨 끝 '인물 검색' 칸(2026-10-18 deneb) — 액자 모양, 돋보기 + 숨은 인물 수 */
.ps-frame.is-search .ps-search-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed rgba(120,120,128,.55); border-radius: 4px; background: rgba(120,120,128,.08); line-height: 1.2; box-sizing: border-box; }
.ps-search-stage b { font: 700 14px/1.2 -apple-system, system-ui, sans-serif; color: var(--text, #2b2b2b); }
.ps-search-stage small { font: 500 11px/1.2 -apple-system, system-ui, sans-serif; color: var(--muted, #8a8a8e); }
.ps-search-icon { position: relative; width: 30px; height: 30px; }
.ps-search-icon::before { content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border: 3px solid currentColor; border-radius: 50%; color: var(--muted, #8a8a8e); }
.ps-search-icon::after { content: ""; position: absolute; left: 20px; top: 19px; width: 10px; height: 3px; border-radius: 2px; background: var(--muted, #8a8a8e); transform: rotate(45deg); transform-origin: left center; }
/* 인물 검색 창: 숨은 인물 대표 사진 3줄 격자(누르면 고르기), 아래 줄 숨기기 · 이름 · 묶기 */
.ps-ss-grid { gap: 4px; }
.ps-ss-tile { border-radius: 8px; }
.ps-ss-cap { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 1px; padding: 14px 6px 5px; background: linear-gradient(to top, rgba(0,0,0,.62), transparent); color: #fff; font: 600 11px/1.2 -apple-system, system-ui, sans-serif; pointer-events: none; }
.ps-ss-cap em { font-style: normal; font-weight: 500; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-ss-bind { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; padding: 8px 10px 10px; border-top: .5px solid var(--ce-sep, rgba(0,0,0,.12)); }
.ps-ss-bind button { height: 44px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--ce-fill, #e5e5ea); color: var(--ce-label); font: 600 14px/1 -apple-system, system-ui, sans-serif; white-space: nowrap; }
.ps-ss-bind button.is-yes { background: var(--ce-blue, #007aff); color: #fff; }
.ps-ss-bind button:disabled { opacity: .4; }
.ps-ss-bind input { min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--ce-sep, rgba(0,0,0,.15)); border-radius: 12px; background: var(--ce-sheet, #fff); color: var(--ce-label); font: 400 16px/1 -apple-system, system-ui, sans-serif; }
