/* ─────────────────────────────────────────────────────────────────────────────
   37-projects-hub.css — 프로젝트 상세 = 도구 위젯 허브 (#3916, 2026-09-14, 원준 결정)

   원안(안 5 「허브」)의 카드 문법(아이콘 타일 30 · 이름 · 수 · 열기 → · 바닥 줄)을 그대로 두고, 카드를 **위젯**으로 만든다.
    · 격자 3열 × 260px 행(dense) — S 1×1 «한눈» · M 2×1 «목록» · L 2×2 «조작» · XL 3×1 «띠». 크기가 곧 뷰다.
    · L·XL 은 기존 섹션 렌더러(태스크 표·세션·본문·폴더·지식 흐름·타임라인)를 카드 안에 그대로 앉힌다 — 카드 크롬만 벗긴다.
    · 배치 편집(안 A): 손잡이(⋮⋮)·숨기기(×)·크기 단추 [S M L XL] · 「＋ 위젯」 슬롯 · 프리셋. 저장은 web/projects/detail-hub.ts.
    · ≤900px: 한 열, L→M · XL→M 강등(격자 span 만 바뀌고 뷰는 JS 가 고른다).
   토큰만 쓴다(01-base/90-dark). 그림자는 떠 있는 것(끌리는 카드·프리셋 창)에만.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── 머리: 뒤로 줄은 기존(.proj-detail-back) · 제목(h1) 아래 «속성 띠» — 2열 표 대신 칩 한 줄 ── */
.pjh-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 18px; }
.pjh-fact { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 6px 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.pjh-fact > svg.pjh-ic { color: var(--muted-2); }
.pjh-fact-k { font-size: 12px; font-weight: 600; color: var(--muted-2); }
/* 칩 안에 기존 컨트롤(상태 알약·리스트·팀원·기간·우선순위·태그·선행/후속)이 그대로 앉는다 — 그 컨트롤의 자체 테두리는 걷는다. */
.pjh-fact .pjv-tm-statuspill { border: 0; padding: 0 2px; letter-spacing: .2px; }
.pjh-fact .pjv-tm-valbtn, .pjh-fact .pjv-tm-datebtn { padding: 2px 4px; font-size: 13px; }
.pjh-fact .pjv-tm-dates { gap: 2px; }
.pjh-fact .pjv-tm-tags { gap: 4px; }
.pjh-fact .pjv-proj-edges { display: inline-flex; align-items: center; gap: 4px; }
.pjh-fact .pjv-edge-add { border: 0; padding: 0 4px; }
.pjh-fact .pjv-tm-field-val { min-width: 0; }
.pjh-fact.empty { border-style: dashed; }
.pjh-fact.empty .pjh-fact-k { color: var(--muted-3); }

/* ── 격자 ── */
.pjh-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 260px; gap: 16px; grid-auto-flow: dense; margin-bottom: 24px; }
.pjh-w { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 18px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pjh-w.s { grid-column: span 1; grid-row: span 1; }
.pjh-w.m { grid-column: span 2; grid-row: span 1; }
.pjh-w.l { grid-column: span 2; grid-row: span 2; }
.pjh-w.xl { grid-column: span 3; grid-row: span 1; }
.pjh-w:hover { border-color: var(--line-net); }

/* 머리 */
.pjh-wh { display: flex; align-items: center; gap: 8px; flex: none; min-width: 0; }
.pjh-wh-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--bg-tint-2); color: var(--ink-sub); }
.pjh-wh-ic.blue { background: var(--bg-punch); color: var(--blue); }
.pjh-wh-ic.mint { background: var(--bg-success); color: var(--mint-deep); }
.pjh-wh-ic.amber { background: var(--warn-bg); color: var(--warn-deep); }
.pjh-wh-ic > svg { width: 16px; height: 16px; }
.pjh-wh-name { font-size: 15px; font-weight: 800; letter-spacing: -.2px; white-space: nowrap; color: var(--ink); }
.pjh-wh-sub { min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pjh-wh-acts { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; flex: none; }
.pjh-open { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 4px 6px; border-radius: 7px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--blue); cursor: pointer; opacity: 0; transition: opacity 120ms ease; }
.pjh-w:hover .pjh-open, .pjh-open:focus-visible { opacity: 1; }
.pjh-open:hover { background: var(--bg-punch); }
@media (hover: none) { .pjh-open { opacity: 1; } }

/* 몸통 · 바닥 */
.pjh-wb { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 6px; }
.pjh-wb.fade::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.pjh-wf { margin-top: auto; flex: none; display: flex; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-row); font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.pjh-wf > .btn { margin-left: auto; flex: none; }
.pjh-wf-txt { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pjh-wf .pjh-ic { color: var(--muted-2); }
.pjh-ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* S «한눈» — 수 하나 + 상태 한 줄 */
.pjh-big { display: flex; align-items: baseline; gap: 2px; font-size: 26px; font-weight: 800; letter-spacing: -.9px; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.pjh-big small { margin-left: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--muted-2); }
.pjh-big .pjh-arrow { margin: 0 5px; font-size: 18px; color: var(--muted-3-line); }
.pjh-big .pjh-pulse { align-self: center; margin-right: 8px; }
.pjh-stat { font-size: 12.5px; line-height: 1.5; color: var(--ink-sub); }
.pjh-stat b { color: var(--ink); }
.pjh-stat-t { font-size: 15px; font-weight: 800; letter-spacing: -.3px; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pjh-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pjh-fig { display: flex; align-items: center; gap: 12px; padding-top: 2px; }
.pjh-ring { flex: none; }
.pjh-tail { margin-top: auto; }

/* 작은 행(M·S 공용): 상태 점/글리프 · 이름 · 메타 · 오른쪽 배지 */
.pjh-row { display: flex; align-items: center; gap: 9px; padding: 6px 2px; border-bottom: 1px solid var(--line-row); font-size: 13px; color: var(--ink); min-width: 0; }
.pjh-row:last-child { border-bottom: 0; }
.pjh-row-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjh-row-n.b { font-weight: 600; }
.pjh-row-m { flex: none; font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.pjh-row-l { flex: none; max-width: 42%; font-size: 12px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjh-row .pjv-ava { width: 18px; height: 18px; font-size: 9px; }
.pjh-row .pjv-status-dot { width: 15px; height: 15px; font-size: 9px; cursor: default; }
.pjh-due { flex: none; padding: 2px 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700; color: var(--warn-ink); background: var(--warn-bg); font-variant-numeric: tabular-nums; }
.pjh-due.over { color: var(--danger-ink); background: var(--danger-bg); }
.pjh-due.done { color: var(--ok-ink); background: var(--ok-bg); }
.pjh-row .pjv-flag { font-size: 12.5px; }
.pjh-row .pjv-flag-label { font-size: 12.5px; }
.pjh-row-link { text-decoration: none; color: inherit; }
.pjh-row-link:hover .pjh-row-n { color: var(--blue); }

/* 세션 — 점 어휘(새 셸 .v2-dot 과 같은 셋: 도는 중 파랑 펄스 · 확인 앰버 · 끝남 민트 · 쉬는 중 빈 점) */
.pjh-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-3-line); }
.pjh-dot.busy { background: var(--blue); animation: pjh-busy 1.1s ease-in-out infinite; }
.pjh-dot.wait { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.pjh-dot.done { background: var(--mint); }
.pjh-dot.off { background: none; border: 1.5px solid var(--muted-3-line); }
.pjh-pulse { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.pjh-pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--mint); opacity: .18; animation: pjh-breathe 2.8s ease-in-out infinite; }
@keyframes pjh-busy { 50% { opacity: .35; } }
@keyframes pjh-breathe { 50% { inset: -6px; opacity: .07; } }
@media (prefers-reduced-motion: reduce) { .pjh-dot.busy, .pjh-pulse::after { animation: none; } }
.pjh-live { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--ok-line-2); border-radius: 12px; background: var(--bg-success); }
.pjh-live-t { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--ink); min-width: 0; }
.pjh-live-t > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjh-live-l { font-size: 12.5px; line-height: 1.5; color: var(--ink-sub); }
.pjh-live-a { display: flex; gap: 6px; margin-top: 2px; }
.pjh-hb { flex: none; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; color: var(--ink-note); background: var(--bg-note); }
/* XL «함대» — 세션마다 카드 */
.pjh-fleet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pjh-fl { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.pjh-fl.live { border-color: var(--ok-line-2); background: var(--bg-success); }
.pjh-fl-t { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink); min-width: 0; }
.pjh-fl-t > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjh-fl-l { font-size: 12.5px; line-height: 1.5; color: var(--ink-sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pjh-fl-m { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pjh-fl-a { display: flex; gap: 6px; margin-top: 2px; }

/* 본문 발췌 · 코멘트 조각 */
.pjh-excerpt { font-size: 13px; line-height: 1.55; color: var(--ink-sub); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
.pjh-excerpt b { color: var(--ink); }
.pjh-cmt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.pjh-cmt-b { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pjh-cmt-h { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.pjh-cmt-h b { font-weight: 700; }
.pjh-cmt-h span { font-size: 12px; color: var(--muted-2); }
.pjh-cmt-t { font-size: 12.5px; line-height: 1.55; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pjh-cmt .pjv-cmt-mini-ava { flex: none; }

/* 폴더 — 낱장 격자(M)·목록(S 한 줄) */
.pjh-files { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; padding-top: 2px; }
.pjh-files .proj-file-card { flex: 0 0 100px; padding: 8px 4px 6px; gap: 5px; }
.pjh-files .proj-file-card-ic { height: 52px; }
.pjh-files .proj-file-card-ic .ft-file { width: 40px; height: 48px; }
.pjh-files .proj-file-card-ic .ft-folder { width: 54px; }
.pjh-files .proj-file-card-ic .ft-img { width: 48px; height: 48px; }
.pjh-files .proj-file-card-nm { font-size: 11.5px; }
.pjh-drop { display: grid; place-items: center; gap: 4px; flex: 0 0 100px; padding: 8px 6px; border: 1.5px dashed var(--line-net-2); border-radius: 10px; font-size: 12px; color: var(--muted-2); text-align: center; }
.pjh-drop.wide { flex: 1 1 auto; }
.pjh-w.drop-active { outline: 2px dashed var(--line-net-2); outline-offset: -4px; background: var(--bg-tint); }
.pjh-thumbs { display: inline-flex; align-items: flex-end; gap: 4px; }
.pjh-thumbs .ft { width: 22px; height: auto; }

/* 지식 흐름 — 세로(L) */
.pjh-kn-col { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--bg); }
.pjh-kn-col.req { background: var(--bg-tint); border-color: var(--line-net); }
.pjh-kn-col.prod { background: var(--bg-success); border-color: var(--ok-line-2); }
.pjh-kn-mid { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 0; font-size: 12px; color: var(--muted); }
.pjh-kn-rel { flex: none; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; color: var(--mint-deep); background: var(--bg-success); }
.pjh-kn-pct { flex: none; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.pjh-kn-link { flex: none; border: 0; background: none; padding: 2px 6px; border-radius: 6px; font: inherit; font-size: 12px; font-weight: 700; color: var(--blue); cursor: pointer; }
.pjh-kn-link:hover { background: var(--bg-punch); }

/* 타임라인 원장 행(#1756 문법) */
.pjh-lg { display: grid; grid-template-columns: 62px 1fr 18px; gap: 0 12px; align-items: start; padding: 8px 2px; border-bottom: 1px solid var(--line-row); text-decoration: none; color: inherit; }
.pjh-lg:last-child { border-bottom: 0; }
.pjh-lg:hover .pjh-lg-title { color: var(--blue); }
.pjh-lg-t { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 10.5px; line-height: 1.4; color: var(--muted); text-align: right; padding-top: 2px; font-variant-numeric: tabular-nums; }
.pjh-lg-b { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pjh-lg-title { font-size: 13px; font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pjh-lg-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pjh-lg-r { color: var(--muted-2); padding-top: 2px; }
.pjh-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pjh-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; min-height: 0; }
.pjh-two > * { min-width: 0; }
.pjh-act-d { display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-tint); font-size: 12.5px; line-height: 1.5; color: var(--ink-sub); overflow: hidden; }
.pjh-act-d b { color: var(--ink); }

/* L·XL — 기존 섹션(.card)을 카드 안에 앉힌다: 카드 크롬을 벗기고 그 섹션의 머리(제목)는 숨긴다(동작 단추는 JS 가 위젯 머리로 옮긴다). */
.pjh-wb > .card { flex: 1; min-height: 0; margin: 0 !important; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: auto; }
.pjh-wb > .card > .card-head { display: none; }
.pjh-wb > .card.proj-term-card { padding-bottom: 0; }
.pjh-wb > .card .pjv-tgroup:first-of-type { margin-top: 4px; }
.pjh-wb > .card .proj-tl-note { display: none; }
.pjh-wb > .card .proj-tl-filter { margin: 4px 0 8px; }
.pjh-wb > .card .pjk-flow { margin-top: 4px; }
.pjh-wb > .card .proj-people-grid { padding-top: 0; }
.pjh-wb > .card .proj-file-crumb { padding-top: 0; }
.pjh-wh-acts .card-head-actions { display: inline-flex; gap: 4px; }
.pjh-wh-acts .card-head-actions .btn-sm { padding: 3px 10px; font-size: 12.5px; }
.pjh-wb > .proj-body-card { flex: 1; min-height: 0; overflow: auto; }
/* 본문 L·XL — 곁칸 코멘트(절대배치 28%)는 카드 폭 680 에선 머리글이 세로로 꺾인다 → 좁은 폭 규칙(13-projects.css @media)과 같이 아래로 내린다. */
.pjh-wb > .proj-body-card.has-inset-cmt .proj-body-collapse { padding-right: 0; }
.pjh-wb > .proj-body-card .proj-body-cmt { position: static; width: auto; margin-top: 12px; box-shadow: none; display: block; }
.pjh-wb > .proj-body-card .proj-body-cmt .pjv-cmt-strip { flex-direction: row; overflow-x: auto; overflow-y: visible; }
.pjh-wb > .proj-body-card .proj-body-cmt .pjv-cmt-mini { width: 232px; }
/* 폴더 L·XL — 낱장 카드는 섹션 원본(아이콘 72)보다 한 단 작게, 260px 띠 안에 이름까지 들어오게. */
.pjh-wb > .card .proj-file-card { padding: 8px 4px 6px; gap: 5px; }
.pjh-wb > .card .proj-file-card-ic { height: 52px; }
.pjh-wb > .card .proj-file-card-ic .ft-file { width: 40px; height: 48px; }
.pjh-wb > .card .proj-file-card-ic .ft-folder { width: 54px; }
.pjh-wb > .card .proj-file-card-ic .ft-img { width: 48px; height: 48px; }
.pjh-wb > .card .proj-file-card-nm { font-size: 11.5px; }

/* ── 열기 = 도구 전폭(XL 의 확장) ── */
.pjh-focus-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-sub); }
.pjh-focus-bar b { color: var(--ink); font-weight: 800; }
.pjh-focus { margin-bottom: 24px; }

/* ── 배치 편집(안 A) ── */
.pjh-edbar { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; padding: 9px 12px 9px 14px; border: 1px solid var(--line-note); border-radius: 10px; background: var(--bg-note); font-size: 13px; color: var(--ink-note); }
.pjh-edbar b { font-weight: 800; }
.pjh-edbar-r { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex: none; }
.pjh-sw { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-sub); cursor: pointer; white-space: nowrap; }
.pjh-sw i { position: relative; display: inline-block; width: 34px; height: 20px; border-radius: 999px; background: var(--muted-3-line); transition: background 150ms ease; }
.pjh-sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform 150ms ease; }
.pjh-sw[aria-checked="true"] i { background: var(--blue-fill); }
.pjh-sw[aria-checked="true"] i::after { transform: translateX(14px); }
.pjh-preset { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.pjh-preset:hover { border-color: var(--blue); }
.pjh-grid.edit .pjh-w { padding-top: 44px; outline: 1.5px dashed var(--line-net-2); outline-offset: -1px; cursor: grab; }
.pjh-grid.edit .pjh-w.dragging { opacity: .45; }
.pjh-grid.edit .pjh-w.over { outline: 2px solid var(--blue); }
.pjh-grid.edit .pjh-open { display: none; }
.pjh-grid.edit .pjh-w * { pointer-events: none; }
.pjh-grid.edit .pjh-edtools, .pjh-grid.edit .pjh-edtools * { pointer-events: auto; }
.pjh-edtools { position: absolute; left: 12px; right: 12px; top: 10px; display: flex; align-items: center; gap: 6px; }
.pjh-grip { flex: none; width: 20px; height: 22px; border-radius: 5px; color: var(--muted-2); background-image: radial-gradient(currentColor 1.3px, transparent 1.3px); background-size: 6px 6px; background-position: 4px 5px; cursor: grab; }
.pjh-grip:hover { background-color: var(--bg-tint-2); }
.pjh-edtools-sp { flex: 1; }
.pjh-hide { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted-2); cursor: pointer; }
.pjh-hide:hover { background: var(--danger-bg); color: var(--coral-text); }
.pjh-sizes { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--bg); }
.pjh-sizes button { border: 0; border-right: 1px solid var(--line); background: none; padding: 3px 8px; font: inherit; font-size: 11px; font-weight: 700; line-height: 1.4; color: var(--muted-2); cursor: pointer; }
.pjh-sizes button:last-child { border-right: 0; }
.pjh-sizes button:hover { background: var(--bg-tint); color: var(--ink); }
.pjh-sizes button[aria-pressed="true"] { background: var(--bg-punch); color: var(--blue); }
.pjh-slot { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; min-height: 56px; margin: 0 0 24px; padding: 8px 12px; border: 1.5px dashed var(--line-net-2); border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--muted-2); }
.pjh-slot .btn-sm { padding: 3px 10px; }

/* 프리셋 팝오버 — 격자 미니어처 */
.pjh-preset-pop { min-width: 300px; padding: 6px; }
.pjh-preset-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: 13px; text-align: left; color: var(--ink); cursor: pointer; }
.pjh-preset-row:hover { background: var(--bg-tint-2); }
.pjh-preset-row.on { background: var(--bg-sel); font-weight: 700; }
.pjh-pm { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 8px; gap: 2px; width: 48px; flex: none; }
.pjh-pm i { display: block; border-radius: 2px; background: var(--muted-3-line); }
.pjh-pm i.a { background: var(--blue); opacity: .7; }
.pjh-pm .c2 { grid-column: span 2; } .pjh-pm .c3 { grid-column: span 3; } .pjh-pm .r2 { grid-row: span 2; }

/* ── 좁은 폭: 한 열 · 편집 숨김 ── */
@media (max-width: 900px) {
  .pjh-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .pjh-w, .pjh-w.s, .pjh-w.m, .pjh-w.l, .pjh-w.xl { grid-column: span 1; grid-row: span 1; min-height: 200px; }
  .pjh-fleet { grid-template-columns: minmax(0, 1fr); }
  .pjh-two { grid-template-columns: minmax(0, 1fr); }
  .pjh-edit-btn, .pjh-edbar { display: none; }
}

/* 상세 모달(.pjv-pm 1100) 안에서도 3열이 선다 — 폭 1048 ≈ 열 330(별도 규칙 없음). */

/* ── 뒤로 줄 오른쪽 = [배치 편집] + [⚙ 세부 설정] · 편집 중엔 단추가 눌린 채로 ── */
.proj-detail-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.pjh-edit-btn { display: inline-flex; align-items: center; gap: 5px; }
.pjh-edit-btn.active { background: var(--bg-punch); color: var(--blue); border-color: var(--blue); }
.pjh-wf-acts .btn-sm { padding: 3px 10px; font-size: 12.5px; }
.pjh-wf-acts { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.pjh-hidden-sec { display: none !important; }
.pjh-slot.over { border-color: var(--blue); background: var(--bg-punch); }
.pjh-w.dragging { opacity: .45; }
