/* 한 줄 요약: 프로그램 전체 모양 — 색·글자·입체감·화면 배치·문서(보고서) 인쇄 모양
 *
 * [역할]   모든 화면의 생김새를 정한다
 * [하는 일] 색과 간격을 변수(:root)로 정해 두고, 부품(버튼·카드·칩·문서)마다 모양을 입힌다
 * [원리]   공통 화면에 반응형 규칙을 적용하고 960px부터 PC 작업용 넓은 배치와 옆 메뉴를 사용한다
 * [이유]   PC에서 자료를 검토하고 보고서를 작성하며 휴대폰에서도 현장 입력을 이어갈 수 있게 한다
 * [관계]   index.html 이 불러오고, 클래스 이름은 public/js/*.js 의 h() 호출과 짝을 이룬다
 *
 * 디자인 개념 — "장비 랙과 라벨 테이프"
 *   통신실의 랙 장비처럼 눌리는 입체 버튼(아래 테두리가 두껍고 누르면 내려감)과,
 *   케이블에 붙이는 노란 라벨 테이프를 상호·강조 표시에 사용. 색은 남색 잉크 + 신호 파랑 + 라벨 노랑.
 */
:root {
  --bg: #E9EEF4;         /* 바탕: 차가운 패널 회색 */
  --surface: #FFFFFF;
  --ink: #12213A;        /* 글자·머리: 남색 잉크 */
  --muted: #55657F;
  --line: #D3DCE8;
  --blue: #1F56E0;       /* 주 동작: 신호 파랑 */
  --blue-d: #153C9E;
  --tape: #FFC83A;       /* 라벨 테이프 노랑 */
  --ok: #128A54; --ok-bg: #E2F5EC;
  --bad: #D0342A; --bad-bg: #FDEBE9;
  --fix: #B86E00; --fix-bg: #FFF1D6;
  --na: #6C7A90; --na-bg: #E8ECF2;
  --r: 14px;
  --lift: 0 1px 0 #fff inset, 0 1px 2px rgba(18,33,58,.08), 0 10px 24px -14px rgba(18,33,58,.35);
  --font: "Pretendard Variable", Pretendard, -apple-system, "Noto Sans KR", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); word-break: keep-all; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent; }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: 1.06rem; margin: 0 0 .6rem; font-weight: 750; }
h3 { font-size: .95rem; margin: 1.1rem 0 .4rem; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--tape); outline-offset: 2px; }
[hidden] { display: none !important; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem; border: 1.5px solid var(--line); border-radius: 11px; background: #fff;
  box-shadow: inset 0 2px 3px rgba(18,33,58,.06);
}
textarea { min-height: 48px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(31,86,224,.18); }

/* ── 화면 틀 ─────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .55rem max(1rem, env(safe-area-inset-left)); background: var(--ink); color: #fff; box-shadow: 0 6px 16px -8px rgba(18,33,58,.6); }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: #fff; min-width: 0; }
.brand-sub { font-size: .8rem; color: #B9C6DC; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 라벨 테이프: 살짝 기울어진 노란 띠 + 아래 그림자로 붙어 있는 느낌 */
.tape { display: inline-block; background: var(--tape); color: var(--ink); font-weight: 800; padding: .12rem .55rem; border-radius: 3px; letter-spacing: -.01em;
  box-shadow: 0 2px 0 #C99400, 0 4px 8px rgba(0,0,0,.25); transform: rotate(-1.2deg); white-space: nowrap; }
.release-label { font-size: .83rem; }
.tape.big { font-size: 1.3rem; padding: .2rem .8rem; }
.top-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.who { font-size: .82rem; color: #B9C6DC; }
.sync { border: 0; border-radius: 99px; padding: .32rem .7rem; font-size: .78rem; font-weight: 700; cursor: pointer; background: #1E3558; color: #BFE9D3; min-height: 32px; }
.sync::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #35D07F; margin-right: .4rem; box-shadow: 0 0 6px #35D07F; }
.sync.wait { color: #FFE4A1; } .sync.wait::before { background: var(--tape); box-shadow: 0 0 6px var(--tape); }
.sync.busy::before { background: #6FA2FF; box-shadow: 0 0 6px #6FA2FF; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25; } }

#view { max-width: 860px; margin: 0 auto; padding: 1rem 1rem calc(6.5rem + env(safe-area-inset-bottom)); outline: none; }
.stack { display: grid; gap: 1.1rem; } .stack-s { display: grid; gap: .6rem; }
.loading { padding: 3rem 1rem; text-align: center; color: var(--muted); }

/* 하단 메뉴: 화면에서 떠 있는 판 */
.tabs { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(.6rem + env(safe-area-inset-bottom)); width: min(96vw, 520px);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--ink); border-radius: 20px; padding: .3rem;
  box-shadow: 0 2px 0 #060D1A, 0 14px 30px -8px rgba(18,33,58,.65), 0 1px 0 rgba(255,255,255,.12) inset; }
.tabs a { display: grid; justify-items: center; gap: .05rem; padding: .42rem 0 .34rem; color: #9FB0CB; text-decoration: none; font-size: .68rem; font-weight: 650; border-radius: 15px; }
.tabs a.on { color: var(--ink); background: var(--tape); box-shadow: 0 2px 0 #C99400; }
.ico svg { width: 22px; height: 22px; display: block; }

/* ── 부품 ─────────────────────────────── */
.card { background: var(--surface); border-radius: var(--r); padding: 1rem; box-shadow: var(--lift); }
.card.empty { text-align: center; color: var(--muted); padding: 1.6rem 1rem; display: grid; gap: .8rem; justify-items: center; }
.hint { font-size: .84rem; color: var(--muted); }
.lead { font-size: 1.02rem; margin-bottom: 1rem; }
.txt-bad { color: var(--bad); } .txt-warn { color: var(--fix); font-weight: 650; }

/* 입체 버튼: 아래 테두리가 두껍고, 누르면 그만큼 내려간다 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .55rem 1.05rem; border-radius: 12px; cursor: pointer;
  font-weight: 700; text-decoration: none; color: var(--ink); background: linear-gradient(#fff, #F3F6FA); border: 1.5px solid #C4CFDE;
  box-shadow: 0 3px 0 #B4C0D2, 0 6px 12px -6px rgba(18,33,58,.3); transition: transform .06s, box-shadow .06s; white-space: nowrap; }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 #B4C0D2; }
.btn.primary { color: #fff; background: linear-gradient(#3A70F2, var(--blue)); border-color: var(--blue-d); box-shadow: 0 3px 0 var(--blue-d), 0 10px 18px -8px rgba(31,86,224,.7); }
.btn.primary:active { box-shadow: 0 0 0 var(--blue-d); }
.btn.danger { color: #fff; background: linear-gradient(#E4574D, var(--bad)); border-color: #9C231B; box-shadow: 0 3px 0 #9C231B; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.big { min-height: 60px; font-size: 1.12rem; padding: .8rem 1.6rem; border-radius: 16px; }
.btn.small { min-height: 38px; padding: .3rem .8rem; font-size: .84rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; }
.icon-btn:disabled { opacity: .35; }

.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; } .row.end { justify-content: flex-end; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.back { display: inline-block; font-size: .86rem; text-decoration: none; color: var(--muted); padding: .2rem 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 420px) { .grid2.form-wide, .form .grid2 { grid-template-columns: 1fr; } }
.form { display: grid; gap: .75rem; }
.field { display: grid; gap: .25rem; } .field-label { font-size: .84rem; font-weight: 650; color: var(--muted); }
.check { display: flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--blue); flex-shrink: 0; }

/* 홈 */
.hero { background: var(--ink); color: #fff; border-radius: 20px; padding: 1.3rem 1.2rem 1.4rem; display: grid; gap: .9rem; justify-items: start;
  background-image: repeating-linear-gradient(0deg, transparent 0 26px, rgba(255,255,255,.045) 26px 27px); box-shadow: 0 3px 0 #060D1A, 0 18px 30px -16px rgba(18,33,58,.8); }
.hero-date { color: var(--tape); font-weight: 700; font-size: .9rem; }
.hero h1 { font-size: 1.45rem; }

.row-card { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; background: var(--surface); border: 0; border-radius: var(--r); padding: .85rem 1rem; margin-bottom: .55rem;
  text-decoration: none; color: inherit; box-shadow: var(--lift); cursor: pointer; }
.row-card:active { transform: translateY(1px); }
.row-main { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.row-title { font-weight: 720; } .row-sub { font-size: .84rem; color: var(--muted); }
.chev { font-size: 1.5rem; color: #A9B6C9; }
.bar { height: 6px; border-radius: 3px; background: #E3E9F1; overflow: hidden; margin-top: .25rem; box-shadow: inset 0 1px 2px rgba(18,33,58,.15); }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #35B0FF); border-radius: 3px; }
/* 상태 도장 */
.stamp { flex-shrink: 0; font-size: .76rem; font-weight: 800; padding: .2rem .55rem; border-radius: 6px; border: 2px solid currentColor; transform: rotate(-3deg); background: #fff; }
.stamp.draft { color: var(--fix); } .stamp.done { color: var(--blue); } .stamp.submitted { color: var(--ok); }

.alert { display: grid; gap: .1rem; padding: .7rem .9rem .7rem 1.1rem; border-radius: 12px; margin-bottom: .5rem; text-decoration: none; color: var(--ink); background: var(--fix-bg);
  border-left: 6px solid var(--fix); box-shadow: 0 1px 2px rgba(18,33,58,.08); font-size: .92rem; }
.alert.bad { background: var(--bad-bg); border-left-color: var(--bad); } .alert.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.link-card { display: grid; gap: .15rem; text-decoration: none; color: var(--ink); } .link-card span { font-size: .86rem; color: var(--muted); }

.chips { display: flex; gap: .4rem; overflow-x: auto; padding: .15rem .1rem .45rem; scrollbar-width: none; } .chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip { flex-shrink: 0; min-height: 40px; padding: .3rem .85rem; border-radius: 99px; border: 1.5px solid #C4CFDE; background: #fff; font-weight: 650; font-size: .88rem; cursor: pointer; box-shadow: 0 2px 0 #C4CFDE; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 2px 0 #060D1A; }
.chip.add { border-style: dashed; color: var(--muted); box-shadow: none; }
.date-head { margin: .9rem 0 .45rem; color: var(--muted); font-size: .86rem; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0 0 .7rem; font-size: .93rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; }
.diag { font-size: .9rem; font-weight: 650; padding: .55rem .8rem; border-radius: 10px; background: var(--na-bg); color: var(--na); }
.diag.on { background: #E3ECFF; color: var(--blue-d); } .diag.off { background: var(--ok-bg); color: var(--ok); }
.stat { background: var(--surface); border-radius: var(--r); padding: .8rem .9rem; display: grid; gap: .1rem; box-shadow: var(--lift); border-top: 5px solid var(--fix); }
.stat.ok { border-top-color: var(--ok); } .stat b { font-size: .84rem; } .stat span { font-size: 1.15rem; font-weight: 800; } .stat.ok span { color: var(--ok); } .stat.todo span { color: var(--fix); }
.stat small { color: var(--muted); font-size: .76rem; }

/* 안내 5단계: 실제 순서가 있는 내용이라 번호를 붙인다 */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: .6rem; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 54px 1fr; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--lift); }
.steps li::before { content: counter(s); background: var(--ink); color: var(--tape); font-weight: 800; font-size: 1.5rem; display: grid; place-items: center; }
.steps li > div { padding: .8rem .9rem; display: grid; gap: .25rem; } .steps p { font-size: .92rem; } .steps .note { font-size: .82rem; color: var(--muted); }
.table-wrap { overflow-x: auto; border-radius: var(--r); box-shadow: var(--lift); background: #fff; }
.tbl { border-collapse: collapse; width: 100%; font-size: .85rem; min-width: 640px; }
.tbl th { background: var(--ink); color: #fff; text-align: left; padding: .55rem .7rem; white-space: nowrap; } .tbl td { padding: .55rem .7rem; border-top: 1px solid var(--line); vertical-align: top; }
.list { margin: 0; padding-left: 2rem; font-size: .92rem; }

/* 설비 고르기 */
.equip-pick fieldset { border: 1.5px solid var(--line); border-radius: 12px; margin: 0 0 .6rem; padding: .3rem .8rem .5rem; min-width: 0; }
.equip-pick legend { font-weight: 750; font-size: .86rem; padding: 0 .4rem; color: var(--blue-d); }
.equip-row + .equip-row { border-top: 1px dashed var(--line); }
.equip-detail { display: grid; grid-template-columns: 1.3fr .7fr 1fr 40px; gap: .35rem; padding: .35rem 0 .45rem 2.2rem; align-items: center; }
.equip-detail .wide { grid-column: 1 / 4; } .equip-detail .icon-btn { grid-column: 4; grid-row: 1; }
.sec-row + .sec-row { border-top: 1px dotted var(--line); }
.sec-add { margin: 0 0 .6rem 2.2rem; min-height: 36px; } .equip-detail input { min-height: 40px; font-size: .88rem; }
.equip-row > .chips { padding-left: 2.2rem; }
.step h2 { display: flex; align-items: center; gap: .5rem; }
.big-select { min-height: 56px; font-weight: 700; font-size: 1.05rem; }
.kind-pick { display: grid; gap: .55rem; }
.kind { text-align: left; display: grid; gap: .1rem; padding: .8rem 1rem; border-radius: 13px; border: 1.5px solid #C4CFDE; background: #fff; cursor: pointer; box-shadow: 0 3px 0 #C4CFDE; }
.kind small { color: var(--muted); font-size: .82rem; } .kind .formno { font-size: .76rem; }
.kind.on { border-color: var(--blue); background: #EDF3FF; box-shadow: 0 3px 0 var(--blue), 0 0 0 3px rgba(31,86,224,.15); }
.pick-count { text-align: right; color: var(--blue-d); }

/* ── 현장 작업 ─────────────────────────────── */
.job-meta { font-size: .88rem; color: var(--muted); margin-top: .35rem; }
.equip { background: var(--surface); border-radius: var(--r); box-shadow: var(--lift); overflow: hidden; }
.equip summary { display: flex; align-items: center; gap: .55rem; padding: .85rem 1rem; cursor: pointer; list-style: none; font-weight: 750; background: linear-gradient(#fff, #F4F7FB); min-height: 56px; }
.equip summary::-webkit-details-marker { display: none; }
.equip summary::before { content: ""; width: 6px; align-self: stretch; border-radius: 3px; background: var(--tape); flex-shrink: 0; }
.equip summary small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.equip-name { flex: 1; min-width: 0; }
.count { font-size: .82rem; font-weight: 800; padding: .12rem .55rem; border-radius: 99px; background: var(--na-bg); color: var(--na); }
.count.full { background: var(--ok-bg); color: var(--ok); }
.equip-body { padding: .2rem .8rem .9rem; display: grid; gap: .7rem; border-top: 1px solid var(--line); }
.item { border: 1.5px solid var(--line); border-radius: 13px; padding: .75rem; display: grid; gap: .55rem; background: #FBFCFE; }
.item-title { font-weight: 720; }
/* 결과 버튼: 장비의 누름 스위치처럼 — 선택되면 눌려 들어가고 색이 켜진다 */
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.res { min-height: 52px; border-radius: 11px; border: 1.5px solid #C4CFDE; background: linear-gradient(#fff, #EEF2F7); font-weight: 750; font-size: .92rem; cursor: pointer; box-shadow: 0 3px 0 #B4C0D2; padding: 0 .2rem; }
.res.on { transform: translateY(3px); box-shadow: inset 0 2px 4px rgba(0,0,0,.25); color: #fff; }
.res.r-0.on { background: var(--ok); border-color: #0B5E38; } .res.r-1.on { background: var(--bad); border-color: #8E1F18; }
.res.r-2.on { background: var(--na); border-color: #4A566A; }
.photos { display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .2rem; align-items: stretch; }
.thumb { flex-shrink: 0; width: 76px; height: 76px; padding: 0; border: 2px solid #fff; border-radius: 10px; overflow: hidden; cursor: pointer; box-shadow: 0 2px 6px rgba(18,33,58,.3); background: #DDE4EE; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shoot { flex-shrink: 0; min-width: 76px; height: 76px; border-radius: 10px; border: 0; background: var(--ink); color: #fff; font-weight: 750; cursor: pointer; display: grid; place-content: center; gap: .1rem; box-shadow: 0 3px 0 #060D1A; padding: 0 .7rem; }
.shoot small { color: var(--tape); font-size: .74rem; } .shoot:active { transform: translateY(3px); box-shadow: none; }
.shoot.alt { background: #fff; color: var(--muted); border: 1.5px dashed #B4C0D2; box-shadow: none; font-size: .82rem; font-weight: 650; }
.job-bar { position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(4.6rem + env(safe-area-inset-bottom)); padding: 0 .6rem; pointer-events: none; }
.job-bar-in { pointer-events: auto; max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: .45rem; background: rgba(255,255,255,.96); border-radius: 16px; padding: .5rem .6rem; box-shadow: 0 2px 0 #C4CFDE, 0 12px 28px -8px rgba(18,33,58,.45); }
.job-bar .btn { min-height: 44px; padding: .4rem .8rem; font-size: .9rem; }
.prog { flex: 1; min-width: 0; font-size: .8rem; font-weight: 700; color: var(--muted); }
.job { padding-bottom: 4.5rem; }
.viewer-img { width: 100%; border-radius: 10px; background: #DDE4EE; min-height: 160px; display: block; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
/* 사진첩 카드: 워터마크 박힌 사진 + 아래 글자 정보 */
.ph-group { background: var(--surface); border-radius: var(--r); padding: .8rem; box-shadow: var(--lift); margin-bottom: .8rem; }
.ph-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin-bottom: .6rem; padding-left: .6rem; border-left: 5px solid var(--tape); }
.ph-head b { font-size: 1rem; flex-basis: 100%; } .ph-head span { font-size: .84rem; color: var(--muted); flex: 1; } .ph-head a { font-size: .84rem; font-weight: 700; }
.ph-card { display: grid; gap: .15rem; text-align: left; padding: 0 0 .45rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; overflow: hidden; box-shadow: 0 2px 0 var(--line); }
.ph-card:active { transform: translateY(2px); box-shadow: none; }
.ph-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #DDE4EE; }
.ph-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-old { position: absolute; top: .3rem; left: .3rem; font-style: normal; font-size: .68rem; background: rgba(18,33,58,.75); color: #fff; padding: .1rem .35rem; border-radius: 5px; }
.ph-what { font-size: .84rem; font-weight: 720; padding: .3rem .55rem 0; line-height: 1.3; }
.ph-meta { font-size: .76rem; color: var(--muted); padding: 0 .55rem; }
.ph-cap { font-size: .76rem; padding: 0 .55rem; color: var(--ink); }
.raw-switch { padding: .3rem 1rem; } .raw-switch span { font-weight: 700; }
.wm-box summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.wm-box[open] summary { margin-bottom: .4rem; }
.thumb.lg { width: 100%; height: auto; aspect-ratio: 1; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

/* 워터마크 편집 */
.wm-preview { width: 100%; height: auto; border-radius: 12px; box-shadow: var(--lift); display: block; }
.wm-field { display: grid; grid-template-columns: minmax(8.5rem, 1fr) 1.2fr 40px 40px; gap: .4rem; align-items: center; }
.signpad { width: 100%; height: auto; border: 2px dashed #B4C0D2; border-radius: 12px; background: #fff; touch-action: none; }

/* 시트(아래에서 올라오는 창) · 토스트 */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(10,18,34,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(100%, 520px); max-height: 92dvh; background: var(--bg); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(0,0,0,.35); animation: up .18s ease-out; }
.sheet.wide { width: min(100%, 760px); }
@keyframes up { from { transform: translateY(24px); opacity: .5; } }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1rem .6rem; } .sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sheet-body { padding: .2rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); overflow-y: auto; }
#toasts { position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(13rem + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: .4rem; pointer-events: none; padding: 0 1rem; }
.toast { background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 12px; font-size: .9rem; font-weight: 600; box-shadow: 0 8px 20px rgba(18,33,58,.4); border-left: 5px solid var(--tape); }
.toast.bad { border-left-color: #FF6B5E; } .toast.ok { border-left-color: #35D07F; }

/* 로그인 */
.login { min-height: 100dvh; display: grid; align-content: center; gap: 1.4rem; padding: 1.5rem 1.2rem; max-width: 460px; margin: 0 auto; }
.login-brand { display: grid; gap: .8rem; justify-items: start; } .login-brand h1 { font-size: 2.1rem; } .login-brand p { color: var(--muted); }
.login-card { display: grid; gap: .8rem; }

/* ── 문서(보고서·현황표): 관공서 서식 모양 ─────────────────────────────── */
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; }
/* [역할] 보고서 작업 도구 [하는 일] 기능별로 제목과 단추를 배치한다.
   [원리] 넓은 화면에 제목 열을 두고 좁은 화면에서는 위로 옮긴다.
   [이유] 메뉴가 접히지 않고 단추가 화면 폭에 맞게 줄바꿈된다.
   [관계] views-report.js의 toolGroup과 drawHead. */
.report-tools { display: grid; background: var(--card, #fff); border: 1px solid #cbd6e4; border-radius: 14px; overflow: hidden; }
.report-tool-group { display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: start; gap: .65rem; padding: .8rem 1rem; }
.report-tool-group + .report-tool-group { border-top: 1px solid #dbe3ed; }
.report-tool-group h2 { margin: .5rem 0 0; font-size: .94rem; }
.report-tool-buttons, .report-management { display: flex; flex-wrap: wrap; gap: .5rem; }
.report-management { justify-content: flex-end; }
.report-management:empty { display: none; }
.report-tools .btn, .report-management .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; padding: .55rem .7rem; font-size: .9rem; }
.report-tools [aria-pressed="true"] { background: #dce8ff; }
/* [역할] 보고서 작업 화면 [하는 일] 장 목록과 미리보기를 나란히 배치한다.
   [원리] 화면에만 두 열을 적용하고 폭이 좁으면 한 열로 쌓는다.
   [이유] 화면 배치와 인쇄용 A4 서식을 분리한다.
   [관계] views-report.js의 report-workspace. */
@media screen {
  .report-workspace-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; align-items: start; }
  .report-workspace .head-row { align-items: center; }
  .report-workspace .report-management { margin-inline-start: auto; }
  .report-workspace .report-tool-group { padding-block: .55rem; align-items: center; }
  .report-workspace .report-tool-group h2 { margin-block: 0; }
  .report-chapters, .report-preview { min-width: 0; background: #fff; border: 1px solid #cbd6e4; border-radius: 12px; }
  .report-panel-title, .report-preview-bar { margin: 0; padding: .8rem 1rem; border-bottom: 1px solid #dbe3ed; }
  .report-panel-title, .report-preview-bar h2 { font-size: 1rem; }
  .report-preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
  .report-preview-bar h2 { margin: 0; }
  .report-preview-warning { margin: .65rem; padding: .55rem .75rem; font-size: .85rem; }
  .report-chapter-list { list-style: none; padding: 0 .65rem; margin: 0; }
  .report-chapter-list li + li { border-top: 1px solid #e1e8f0; }
  .report-chapter-action, .report-chapter-attach { font: inherit; cursor: pointer; border: 0; background: transparent; text-align: start; color: inherit; }
  .report-chapter-action { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .65rem .35rem; font-size: .88rem; font-weight: 650; overflow-wrap: anywhere; }
  .report-chapter-action:hover, .report-chapter-attach:hover { background: #eef4ff; }
  .report-chapter-number { flex: none; border-radius: 5px; padding: .12rem .3rem; color: #224a8b; background: #e6efff; font-variant-numeric: tabular-nums; }
  .report-chapter-attach { margin: 0 0 .4rem 1.9rem; padding: .3rem; color: #1749a9; font-size: .82rem; }
  .report-preview .report-scroll { max-width: none; border-radius: 0 0 11px 11px; box-shadow: none; background: #dde3ec; }
  .report-preview .doc.paged { margin-inline: auto; }
}
@media screen and (min-width: 961px) {
  #view:has(> .report-workspace) { max-width: 1560px; }
  .report-workspace-body:has(.report-chapters:not([hidden])) { grid-template-columns: minmax(230px, 26%) minmax(0, 1fr); }
}

@media screen and (max-width: 760px) {
  .report-tool-group { grid-template-columns: minmax(0, 1fr); padding: .65rem; }
  .report-tool-group h2 { margin: 0; }
  .report-management { justify-content: flex-start; }
}

/* [역할] 보고서 미리보기 폭 [하는 일] A4 영역을 가운데 배치한다. [원리] 화면에서만 814px로 제한한다. [이유] 바깥 흰 띠를 없앤다. [관계] views-report.js fit. */
@media screen { .report-scroll { width: 100%; max-width: 814px; margin-inline: auto; } }
.doc-scroll { overflow-x: auto; border-radius: 6px; box-shadow: var(--lift); background: #fff; }
.doc { position: relative; background: #fff; color: #000; padding: 1.4rem 1.2rem; font-size: .82rem; line-height: 1.5; min-width: 560px; font-family: "Pretendard Variable", "Malgun Gothic", sans-serif; }
.doc.pdf { width: 718px; min-width: 718px; max-width: 718px; padding: 0; font-size: 12px; }
.doc-no { font-size: .78em; color: #333; margin-bottom: .4rem; }
.doc h1 { text-align: center; font-size: 1.55em; letter-spacing: .12em; margin: .5rem 0 1rem; font-weight: 800; }
.doc-tbl { width: 100%; border-collapse: collapse; margin-bottom: .8rem; table-layout: fixed; }
.doc-tbl th, .doc-tbl td { border: 1px solid #333; padding: .35rem .5rem; vertical-align: middle; text-align: left; }
.doc-tbl th { background: #EEF1F5; font-weight: 700; text-align: center; }
.doc-tbl th, .doc-tbl td { overflow-wrap: anywhere; word-break: keep-all; }
.doc-tbl thead th { background: #DDE3EB; }
.doc .center { text-align: center; } .doc .pre { white-space: pre-wrap; min-height: 3.2em; vertical-align: top; }
.doc .res-1 { color: #C0261C; font-weight: 800; }
.doc-decl { text-align: center; margin: 1rem 0 .4rem; } .doc-date { text-align: center; font-weight: 700; margin-bottom: .8rem; }
.sign-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.sign { border: 1px solid #333; padding: .5rem .7rem; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .2rem .6rem; min-height: 72px; }
.sign span { font-weight: 700; } .sign i { grid-column: 1 / -1; color: #888; font-size: .85em; text-align: right; } .sign img { grid-column: 1 / -1; justify-self: end; height: 46px; }
.doc-foot { font-size: .8em; color: #333; }
.doc-stamp { position: absolute; top: 1.2rem; right: 1.4rem; width: 62px; height: 62px; border: 3px solid #C0261C; color: #C0261C; border-radius: 50%; display: grid; place-content: center; text-align: center; font-weight: 800; transform: rotate(-12deg); line-height: 1.1; }
.doc-stamp small { font-size: .5rem; font-weight: 700; }
.doc-photos-head { font-size: 1.1em; border-bottom: 2px solid #333; padding-bottom: .3rem; margin: 1.2rem 0 .7rem; break-before: page; page-break-before: always; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.photo-cell { margin: 0; border: 1px solid #333; break-inside: avoid; } .photo-cell img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; background: #F0F2F5; }
.photo-cell.tappable { cursor: pointer; } .photo-cell.tappable:hover { outline: 3px solid #FFC83A; }
@media print { .photo-cell.tappable:hover { outline: 0; } }
.photo-cell figcaption { padding: .3rem .5rem; border-top: 1px solid #333; font-size: .86em; min-height: 2.2em; }

/* 넓은 화면(PC): 하단 메뉴를 왼쪽 세로 메뉴로 */
@media (min-width: 960px) {
  .tabs { left: 1rem; top: 5rem; bottom: auto; transform: none; width: 104px; grid-template-columns: 1fr; gap: .2rem; }
  .tabs a { padding: .7rem 0; font-size: .76rem; }
  #view { padding: 1.4rem 1.5rem 3rem 9rem; max-width: 1080px; }
  .job-bar { bottom: 1rem; padding-left: 8rem; } #toasts { bottom: 5.5rem; }
  .sheet-wrap { align-items: center; } .sheet { border-radius: 22px; }
  .kind-pick { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* 인쇄: 문서만 남긴다 */
@media print {
  body { background: #fff; }
  .top, .tabs, .no-print, .head-row, .toolbar, #toasts, .hint, .actions, .alert { display: none !important; }
  #view { padding: 0; max-width: none; } .doc-scroll { box-shadow: none; overflow: visible; } .doc { min-width: 0; padding: 0; }
  @page { size: A4; margin: 12mm 12mm 14mm; @bottom-center { content: "- " counter(page) " / " counter(pages) " -"; font-size: 9pt; color: #555; } }
}

/* 구간 머리줄 · 별첨 */
.sec-head { display: flex; align-items: center; gap: .5rem; margin: .5rem 0 0; font-size: .92rem; }
.sec-head span { font-size: .72rem; font-weight: 800; background: var(--ink); color: var(--tape); padding: .1rem .45rem; border-radius: 5px; }
.sec-head.att span { background: #E3ECFF; color: var(--blue-d); }
.att-wrap { border-top: 1px dashed var(--line); padding-top: .4rem; }
.att-box { display: grid; gap: .4rem; justify-items: start; }
.att-row { width: 100%; display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; }
.att-kind { flex-shrink: 0; min-width: 3.2rem; text-align: center; font-size: .72rem; font-weight: 800; padding: .3rem .3rem; border-radius: 7px; background: var(--na-bg); color: var(--na); }
.att-kind.k-PDF { background: #FDE7E5; color: #B3261E; } .att-kind.k-한글 { background: #E3ECFF; color: var(--blue-d); } .att-kind.k-엑셀 { background: var(--ok-bg); color: var(--ok); } .att-kind.k-이미지 { background: var(--fix-bg); color: var(--fix); }
.att-name { flex: 1; min-width: 0; display: grid; text-decoration: none; color: var(--ink); } .att-name small { color: var(--muted); font-size: .76rem; }
.mini-label { font-size: .72rem; font-weight: 800; color: var(--muted); align-self: center; margin-right: .2rem; }
.equip-pick-body { padding: 0 0 .6rem 2.2rem; display: grid; gap: .2rem; } .equip-pick-body .chips { padding-left: 0; }
.chip.sec.on { background: var(--blue); border-color: var(--blue-d); box-shadow: 0 2px 0 var(--blue-d); }

/* 보고서 쪽 나눔: 종합 점검표 다음부터 대상설비마다 새 쪽 */
.doc-page + .doc-page { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 2px dashed #B8C3D4; }
.doc.pdf .doc-page + .doc-page { margin-top: 0; padding-top: 0; border-top: 0; }
.doc-page:not(.first) { break-before: page; page-break-before: always; }
.doc h1.equip-title { letter-spacing: .04em; }
.doc-h2 { font-size: 1.05em; margin: 1rem 0 .5rem; padding-left: .5rem; border-left: 4px solid #12213A; }

/* 점검항목 구분 표시(외관·기능·안전) */
.cat { display: inline-block; font-size: .7rem; font-weight: 800; padding: .05rem .4rem; border-radius: 5px; margin-right: .4rem; vertical-align: 1px; background: var(--na-bg); color: var(--na); }
.cat.c-외관 { background: #E3ECFF; color: var(--blue-d); } .cat.c-기능 { background: var(--ok-bg); color: var(--ok); } .cat.c-안전 { background: var(--bad-bg); color: var(--bad); }
.chip.chk { text-align: left; white-space: normal; line-height: 1.3; padding: .35rem .75rem; flex-shrink: 1; }
.chip.chk i { font-style: normal; font-size: .68rem; font-weight: 800; opacity: .7; margin-right: .3rem; }
.action-in { border-color: var(--bad) !important; background: #FFF8F7 !important; }
/* 측정값 칸 (공모전용 jbtongsin-ai, measure.js) — [측정값] [숫자] [단위] [AI 판독 표시] 한 줄 */
.measure { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.measure-k { font-weight: 700; font-size: .95em; color: var(--ink, #222); min-width: 4em; }
.measure .measure-v { width: auto; flex: 1 1 8em; max-width: 14em; font-size: 1.15em; font-variant-numeric: tabular-nums; text-align: right; }
.measure .measure-u { width: auto; flex: 0 0 7.5em; }   /* 공용 select 의 width:100% 를 이 줄에서만 풀어 한 줄에 놓는다 */
.measure-src { font-size: .82em; font-weight: 700; color: #1E5BD8; background: #EEF3FF; border-radius: 999px; padding: 2px 10px; }
.measure-src:empty { display: none; }
.measure-src.low { color: #8A5A00; background: #FFF4D6; }
.measure-read { flex: 0 0 auto; }
/* 측정값 판독 창 (meter-read.js) — 사진 위에 네모를 그려 읽는다 */
.meter-read { display: flex; flex-direction: column; gap: 12px; }
.meter-cv { display: block; margin: 0 auto; max-width: 100%; max-height: 58vh; width: auto; height: auto; border-radius: 12px; touch-action: none; cursor: crosshair; background: #111; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.meter-cv[hidden] { display: none; }
.meter-guide { margin: 0; font-size: 1.02em; }
.meter-guide.bad { color: var(--bad, #C62828); font-weight: 700; }
.meter-result { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding: 14px 16px; border-radius: 14px; background: linear-gradient(180deg, #F4F8FF, #E9F0FF); border: 1px solid #C9D8FF; box-shadow: 0 4px 14px rgba(47,107,255,.12), inset 0 1px 0 #fff; }
.meter-result.low { background: linear-gradient(180deg, #FFFAEB, #FFF1CC); border-color: #F0D58A; box-shadow: 0 4px 14px rgba(180,130,0,.12), inset 0 1px 0 #fff; }
.meter-crop { grid-row: span 2; max-width: 46vw; height: 64px; width: auto; border-radius: 8px; border: 1px solid rgba(0,0,0,.15); }
.meter-val b { font-size: 2.1em; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.meter-val span { font-size: 1.2em; font-weight: 700; }
.meter-conf { font-weight: 700; color: #1E5BD8; }
.meter-result.low .meter-conf { color: #8A5A00; }
.meter-conf small { font-weight: 400; color: #667; }
.meter-keep { display: flex; align-items: center; gap: 8px; }
.meter-keep input { width: 22px; height: 22px; }
.meter-models summary { display: none; }   /* 펼치기는 창 위 「지원 측정기」 단추로 */
.meter-models[open] { padding: 12px 14px; border: 1px solid #DCE3F0; border-radius: 12px; background: #FAFBFE; }
.meter-models-btn { margin-left: auto; }
.meter-models-btn[aria-expanded="true"] { background: #EEF3FF; border-color: #9DB7FF; color: #1E5BD8; }
.meter-models ul { list-style: none; margin: 4px 0 10px; padding: 0; }
.meter-models li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 5px 0; border-bottom: 1px solid #EEF0F4; }
.meter-models li span { flex: 1 1 14em; }
.meter-models li small { color: #667; }
.meter-models li em { font-style: normal; font-size: .82em; font-weight: 700; border-radius: 999px; padding: 1px 9px; background: #EEF3FF; color: #1E5BD8; }
.meter-models li em.st-sample { background: #E5F6EA; color: #1B7A3A; }
.meter-models li em.st-screen { background: #E8F2FF; color: #1E5BD8; }
.meter-models li em.st-limited { background: #FFF4D6; color: #8A5A00; }
.meter-models li em.st-no { background: #F1F1F3; color: #777; }
.res b { font-size: 1.05rem; }

/* 법정 서식 모양 */
.doc-pg { text-align: right; font-size: .85em; margin: -.6rem 0 .5rem; }
.doc .mark { font-weight: 800; font-size: 1.1em; } .doc .eq { font-size: .95em; }
.doc .pre-th { white-space: pre-line; line-height: 1.2; }
.cover-sign { text-align: right; margin: 1rem 0; display: grid; gap: .4rem; }
.cover-sign img { height: 40px; vertical-align: middle; margin-left: .5rem; } .sig-ph { margin-left: 2.5rem; color: #555; }
.howto { font-size: .82em; border-top: 1px solid #333; margin-top: .4rem; padding-top: .4rem; } .howto b { display: block; text-align: center; letter-spacing: .3em; }
.howto ol { margin: .2rem 0 0; padding-left: 1.4rem; }
.doc .cat-td { font-weight: 700; }
.doc .photo-td { padding: .4rem; } .doc .muted { color: #777; font-size: .9em; }
.doc .photo-grid { gap: .4rem; }

.ph-equip + .ph-equip { margin-top: .8rem; }
.ph-equip h4 { margin: 0 0 .45rem; font-size: .9rem; display: flex; align-items: center; gap: .3rem; }
.ph-equip h4::before { content: ""; width: 4px; height: 1em; border-radius: 2px; background: var(--blue); }
.ph-equip h4 small { color: var(--muted); font-weight: 600; }

.diagram-box { border: 1px solid #333; min-height: 140px; display: grid; place-items: center; color: #888; font-size: .9em; margin-bottom: .3rem; }
/* 현황표 2쪽 「설비 계통 상세도」 칸 — 이미지 첨부 (site-sheet.js). 표 바로 아래 붙고, 화면용 단추는 인쇄되지 않음 */
.doc-page .diagram-box { min-height: 380px; }
.diagram-box { position: relative; border-top: 0; padding: .4rem; box-sizing: border-box; overflow: hidden; }
.diagram-box .diagram-ph { font-style: italic; letter-spacing: .2em; }
.diagram-box.has-img { place-items: stretch; }
/* 이미지는 틀 안에 절대 위치로 깔아서 이미지 크기가 틀(=쪽) 높이를 절대 늘리지 못하게 — 틀 크기에 맞춰 비율 유지 자동 맞춤 */
.diagram-box.has-img .diagram-imgs { position: absolute; inset: .4rem; display: flex; gap: .4rem; }
.diagram-fig { position: relative; margin: 0; flex: 1 1 0; min-width: 0; height: 100%; display: flex; justify-content: center; align-items: center; }
.diagram-fig img { width: 100%; height: 100%; object-fit: contain; }
.doc-page .diagram-box.has-img { height: 460px; }
/* 현황표 상세도 아래 사진 2칸 + 설명 */
.doc .sheet-photos { margin-top: 0; }
.doc .sheet-photos td.ph-cell { height: calc(var(--sheet-photo-height, 222px) + 8px); padding: 4px; text-align: center; vertical-align: middle; }
.doc .sheet-photos td.ph-cell img { width: 100%; height: var(--sheet-photo-height, 222px); object-fit: contain; display: block; }
.doc .sheet-photos tr.ph-cap td { font-weight: 700; }
.ss-empty { width: 140px; height: 100px; display: grid; place-items: center; border: 1px dashed #aab; border-radius: 8px; color: #889; }
.ss-img input[type=text] { width: 180px; }
.diagram-del { position: absolute; top: .3rem; right: .3rem; }
.diagram-add { position: absolute; bottom: .4rem; right: .4rem; cursor: pointer; }
.doc .fix-tbl td.fx-line { font-size: .85em; color: #333; height: 1.6em; }
.doc .doc-tbl.dg-head, .pg-body > .doc-tbl.dg-head, .fm-img .doc-tbl.dg-head { margin-bottom: 0; }
/* 양식 이미지 틀 (form-blocks.js imgFrame) — 높이는 블록 크기로 고정, 이미지는 틀 안에서 비율 유지 자동 맞춤 */
.fm-img { margin-bottom: 9px; }
.fm-img .fm-img-box { min-height: 0; }
/* 「현황표 고치기」 창 (site-sheet.js sheetEditor) — 한 줄 = 입력칸 묶음, 좁은 화면에서는 자동 줄바꿈 */
.ss-editor h3 { margin: .6rem 0 .2rem; font-size: 1rem; }
.ss-rows { display: flex; flex-direction: column; gap: .5rem; }
.ss-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: flex-end; padding: .55rem; border-radius: 12px; background: var(--card, #fff); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 4px 14px rgba(15,30,60,.08); }
.ss-cell { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 110px; min-width: 90px; font-size: .8rem; color: var(--muted, #556); }
.ss-cell.wide { flex: 2 1 220px; }
.ss-cell input { width: 100%; box-sizing: border-box; }
.ss-imgs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ss-img { margin: 0; display: flex; flex-direction: column; gap: .3rem; align-items: center; padding: .4rem; border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(15,30,60,.1); }
.ss-img img { width: 140px; height: 100px; object-fit: contain; }
.ss-add { cursor: pointer; }
.doc-size { text-align: right; font-size: .72em; color: #555; margin: .2rem 0 0; }

/* 별첨 서류 쪽: A4 비율 상자에 서류 그림을 맞춰 넣음 */
.att-cap { font-weight: 700; font-size: .95em; margin: 0 0 .4rem; padding-left: .5rem; border-left: 4px solid #12213A; }
.att-sheet { width: 100%; aspect-ratio: 210 / 297; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #C9D1DC; overflow: hidden; }
.att-sheet img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.att-none { text-align: center; display: grid; gap: .4rem; color: #333; }
.doc.pdf .att-sheet { aspect-ratio: auto; height: 960px; border: 0; }
@media print { .att-sheet { aspect-ratio: auto; height: 250mm; border: 0; } }

/* 사진 편집: 보고서 칸(4:3) 미리보기 — 끌어서 위치 조정 */
.cell-edit { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 10px; border: 2px solid var(--ink); touch-action: none; cursor: grab; background: #fff; }
.zoom-row { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: .88rem; } .zoom-row input { flex: 1; accent-color: var(--blue); }
.viewer-img { max-height: 60dvh; object-fit: contain; }

.doc-actions { display: flex; justify-content: flex-end; margin-top: .6rem; font-family: var(--font); }
.doc.pdf .doc-actions { display: none; }

/* 사진첩: 단계별 묶음 + 체크박스 + 아래 선택 막대 */
.ph-proj { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; font-size: 1.05rem; } .ph-proj small { color: var(--muted); }
.ph-job + .ph-job { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.ph-job .ph-head { align-items: center; }
.ph-item { margin: .3rem 0 .7rem; } .ph-item-h { display: flex; align-items: center; gap: .3rem; font-size: .84rem; font-weight: 700; margin: .2rem 0 .35rem; color: var(--ink); } .ph-item-h small { color: var(--muted); }
.ph-check { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; cursor: pointer; }
.ph-check input { width: 20px; height: 20px; accent-color: var(--blue); }
.ph-card { position: relative; display: block; }
.ph-card .ph-open { display: grid; gap: .15rem; width: 100%; text-align: left; padding: 0 0 .45rem; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.ph-card .ph-check { position: absolute; top: .3rem; right: .3rem; background: rgba(255,255,255,.92); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.ph-card.picked { outline: 3px solid var(--blue); outline-offset: -1px; }
.ph-card .ph-meta { padding-top: .35rem; }
.pick-bar { position: sticky; bottom: calc(5rem + env(safe-area-inset-bottom)); z-index: 15; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; background: rgba(255,255,255,.97); border-radius: 16px; padding: .55rem .7rem; box-shadow: 0 2px 0 #C4CFDE, 0 12px 28px -8px rgba(18,33,58,.45); }
.pick-n { font-weight: 800; font-size: .88rem; margin-right: auto; } .pick-status { font-size: .8rem; color: var(--blue-d); font-weight: 700; width: 100%; order: 9; }
.pick-status:empty { display: none; }
@media (min-width: 960px) { .pick-bar { bottom: 1rem; } }

/* 같이 작업하기: 참여자·실시간·담당·입력자·덮어쓰기 확인 */
.team-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-top: .4rem; }
.members { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .82rem; } .members b { color: var(--muted); }
.mem { background: #fff; border: 1.5px solid var(--line); border-radius: 99px; padding: .05rem .55rem; font-weight: 700; } .mem.me { border-color: var(--blue); color: var(--blue-d); }
.live { font-size: .76rem; font-weight: 700; color: var(--muted); } .live.on::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #35D07F; margin-right: .3rem; box-shadow: 0 0 6px #35D07F; }
.live.off { color: var(--fix); }
.mine-only { min-height: 36px; font-size: .88rem; }
.sec-head { flex-wrap: wrap; } .sec-head b { font-size: .92rem; } .sec-head select.assign { width: auto; min-height: 34px; padding: .15rem .5rem; font-size: .82rem; margin-left: auto; border-radius: 8px; }
.assign-badge { font-size: .7rem; font-weight: 800; margin-left: .45rem; color: var(--muted); } .assign-badge:empty { display: none; } .assign-badge.me { color: var(--blue-d); }
.item-title { display: flex; align-items: baseline; gap: .3rem; } .item-title .t { flex: 1; }
.who { font-size: .7rem; font-weight: 700; color: var(--muted); white-space: nowrap; } .who.other { color: #8A3FD1; }
.item.flash { animation: flash 1.6s ease-out; } @keyframes flash { 0% { background: #F1E6FF; } 100% { background: #FBFCFE; } }
.conflict { display: grid; gap: .5rem; } .conflict > div { border: 1.5px solid var(--line); border-radius: 12px; padding: .6rem .8rem; background: #fff; } .conflict .mine { border-color: var(--blue); }
.conflict p { margin-top: .2rem; font-size: .92rem; }

/* 사용설명서: 화면에서는 카드, 인쇄·PDF 에서는 A4 한 장씩 */
.man-dls { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.man-dl { display: grid; gap: .15rem; padding: .9rem 1rem; border-radius: var(--r); background: var(--ink); color: #fff; text-decoration: none; box-shadow: 0 3px 0 #060D1A, 0 10px 20px -10px rgba(18,33,58,.6); }
.man-dl b { font-size: 1rem; } .man-dl b::after { content: ' ↓'; color: var(--tape); } .man-dl small { color: #B9C6DC; }
.man { display: grid; gap: 1.2rem; }
.man-page { background: #fff; border-radius: 8px; box-shadow: var(--lift); padding: 1.4rem 1.4rem 1.6rem; }
.man-top { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--muted); margin-bottom: 1rem; }
.man-title { font-size: 1.6rem; margin: 0; } .man-where { color: var(--blue-d); font-weight: 700; font-size: .88rem; margin: .2rem 0 .7rem; }
.man-lead { font-size: 1rem; margin-bottom: 1rem; max-width: 60ch; }
.man-body { display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 220px) 1fr; align-items: start; }
.man-body.two { grid-template-columns: minmax(0, 380px) 1fr; }
.man-shots { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .6rem; }
.man-shots img { width: 100%; border-radius: 14px; border: 3px solid var(--ink); box-shadow: 0 8px 18px -8px rgba(18,33,58,.5); background: #EEF2F6; }
.man-text h3 { font-size: .9rem; margin: 0 0 .4rem; }
.man-steps { margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: st; display: grid; gap: .55rem; }
.man-steps li { counter-increment: st; display: grid; grid-template-columns: 1.8rem 1fr; gap: .5rem; font-size: .92rem; line-height: 1.5; }
.man-steps li::before { content: counter(st); width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: var(--tape); font-weight: 800; display: grid; place-items: center; font-size: .82rem; }
.man-tips { background: #FFF8E1; border-radius: 10px; padding: .7rem .9rem; } .man-tips ul { margin: 0; padding-left: 1.1rem; font-size: .86rem; display: grid; gap: .25rem; }
.man-cover { padding: 2rem 0 1.4rem; } .man-cover h1 { font-size: 2.1rem; } .man-cover p { font-size: 1.3rem; font-weight: 800; color: var(--blue-d); margin-top: .5rem; } .man-cover .man-sub { font-size: .95rem; color: var(--muted); font-weight: 500; }
.man-toc { margin: 0; padding-left: 1.4rem; display: grid; gap: .3rem; } .man-toc li { font-size: .95rem; } .man-toc span { color: var(--muted); font-size: .8rem; margin-left: .5rem; }
@media (max-width: 640px) { .man-body, .man-body.two { grid-template-columns: 1fr; } .man-shots { max-width: 420px; } }
@media print {
  .man { gap: 0; } .man-page { box-shadow: none; border-radius: 0; padding: 0; break-after: page; page-break-after: always; }
  .man-body.two { grid-template-columns: 82mm 1fr; } .man-body { grid-template-columns: 48mm 1fr; }
}

/* ───────── 쪽 단위 보고서 (2026-11-11) ─────────
   [역할] 보고서를 A4 한 장씩 고정 크기 상자(.pg)로 그린다: 머릿말 / 본문 / 아랫말
   [이유] 점검표 한 장 꽉 채우기, 사진 1쪽 6장, 점검표·사진 분리, 머릿말·아랫말을 화면·PDF·인쇄에서 똑같이 보장하려고
   [관계] views-report.js buildDoc, export.js makePDF(쪽마다 찍음). 현황표(views-project.js)는 예전 .doc-page 방식 그대로 */
.doc-measure { position: absolute; left: -99999px; top: 0; width: 794px; visibility: hidden; pointer-events: none; }
.doc.paged { padding: 10px; min-width: 0; width: max-content; background: #DDE3EC; display: grid; gap: 12px; font-size: 12px; line-height: 1.45; }
.doc-measure .doc.paged { padding: 0; }
.pg { position: relative; width: 794px; height: 1123px; box-sizing: border-box; background: #fff; padding: 34px 45px 30px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 2px 10px rgba(18,33,58,.18); }
.pg-head, .pg-foot { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; font-size: 10px; color: #333; min-height: 16px; }
.pg-head { border-bottom: 1.5px solid #12213A; padding-bottom: 5px; font-weight: 700; }
.pg-foot { border-top: 1px solid #555; padding-top: 5px; }
.pg-head span:nth-child(2), .pg-foot span:nth-child(2) { text-align: center; } .pg-head span:last-child, .pg-foot span:last-child { text-align: right; }
.pg-head span, .pg-foot span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 12px 0 10px; }
.pg-body > * { flex: none; }
.pg-body > .doc-tbl { margin-bottom: 9px; }
.pg .doc-tbl th, .pg .doc-tbl td { padding: 4px 6px; }
.pg h1 { font-size: 20px; margin: 4px 0 12px; } .pg h1.wide { letter-spacing: .5em; font-size: 24px; margin: 30px 0 34px; }
.pg .doc-pg { margin: -8px 0 6px; }
.pg-title { display: flex; justify-content: space-between; align-items: baseline; border-left: 5px solid #12213A; padding: 2px 0 2px 9px; margin-bottom: 10px; }
.pg-title b { font-size: 15px; } .pg-title span { font-size: 11px; color: #444; }
.pg tr.blank td { color: transparent; }
.pg .para { margin: 0 0 7px; font-size: 13.5px; line-height: 1.9; white-space: pre-wrap; } .pg .para.gap { min-height: 12px; margin: 0; }
.pg.p-letter .para { font-size: 15px; line-height: 2.1; } .pg.p-letter .pg-body { padding: 40px 30px; }
.pg .grow { flex: 1; min-height: 0; display: flex; } .pg .grow > table { height: 100%; margin: 0; } .pg .grow tr.tall { height: 70%; }
.pg .pre { vertical-align: top; }
.pg-act { position: absolute; top: 58px; right: 10px; z-index: 2; font-family: var(--font); opacity: .9; }
.doc.pdf .pg-act { display: none; }
/* 사진 쪽: 2열 격자가 쪽을 가득 채운다 (n6 = 2×3) */
.photo-sheet { flex: 1 !important; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-sheet.n2 { grid-template-columns: 1fr; grid-template-rows: repeat(2, 1fr); } .photo-sheet.n4 { grid-template-rows: repeat(2, 1fr); }
.photo-sheet.n6 { grid-template-rows: repeat(3, 1fr); } .photo-sheet.n8 { grid-template-rows: repeat(4, 1fr); }
.photo-sheet .photo-cell { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.photo-sheet .photo-cell img { flex: 1; min-height: 0; aspect-ratio: auto; width: 100%; object-fit: cover; }
.photo-sheet .photo-cell figcaption { flex: none; height: 2.9em; min-height: 0; padding: 3px 6px; font-size: 10.5px; line-height: 1.25; overflow: hidden; display: flex; align-items: center; }
/* 별첨 쪽 */
.pg.p-att .att-cap { margin-bottom: 6px; font-size: 11.5px; }
.pg:is(.p-att, .p-diagram) .att-sheet { flex: 1 !important; min-height: 0; aspect-ratio: auto; height: auto; border: 1px solid #C9D1DC; }
/* 표지 */
.pg.p-cover { padding: 0; } .pg.p-cover .pg-body { padding: 0; }
.pg.p-cover .pg-head { margin: 34px 45px 0; } .pg.p-cover .pg-foot { margin: 0 45px 30px; }
/* [역할] 도서관 참고본의 앞부분과 쪽 장식
   [하는 일] 갑지, 제출문, 목차, 머릿말과 꼬릿말의 인쇄 배치를 정한다.
   [원리] 갑지의 유연한 여백과 목차의 실제 행 높이를 사용한다.
   [이유] 흰 배경과 청색 강조선을 유지하면서 긴 제목을 감싼다.
   [관계] views-report.js의 앞부분 렌더러와 PDF 출력. */
.pg.p-cover .pg-body { padding: 34px 9% 12px; }
.library-running { margin: 0; text-align: right; color: #555; }
.library-title { flex: 1 !important; padding-top: clamp(24px, 16%, 145px); text-align: center; color: #214e76; }
.pg .library-title h1 { font-size: 3em; letter-spacing: 0; margin: 0 0 .55em; }
.library-title p { font-size: 2.15em; font-weight: 800; margin: 0; overflow-wrap: anywhere; }
.library-recipient { margin: 0 0 21%; text-align: center; font-size: 2em; font-weight: 700; overflow-wrap: anywhere; }
.pg-head { border-bottom-color: #adc0d0; color: #4c6476; font-weight: 500; }
.pg .pg-foot { display: block; border-top-color: #6a92b4; padding-top: 3px; text-align: right; }
/* [역할] 보고서 꼬릿말 상호 [하는 일] 표지와 본문에 영문 워드마크를 표시한다.
   [원리] 공통 글자 스타일 사용 [이유] 참고 이미지의 색과 자간 적용 [관계] views-report.js 및 내보내기. */
.pg .footer-wordmark { color: #83c5f2; font-family: "Arial", sans-serif; font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.pg.p-letter .pg-body { padding: 18px 4.4% 65px; }
.pg:is(.p-letter, .p-toc, .p-toc-cont) .pg-head { border-bottom: 0; }
.pg:is(.p-letter, .p-toc, .p-toc-cont) .pg-head span:first-child { visibility: hidden; }
.pg.p-letter h1 { font-size: 28px; font-weight: 500; letter-spacing: 0; margin: 0 0 44px; }
.pg.p-letter .para { line-height: 2.35; margin-bottom: 6px; }
.letter-signoff { margin-top: auto; padding-top: 22px; text-align: right; font-size: 15px; }
.letter-signoff p { margin: 0 7% 46px 0; white-space: pre-wrap; }
.letter-signoff .letter-company { margin: 0; text-align: center; font-size: 21px; font-weight: 800; }
.pg.p-toc h1, .pg.p-toc-cont h1 { font-size: 25px; letter-spacing: 0; margin: 0 0 28px; }
.toc-list { display: grid; gap: 22px; padding: 0 4%; align-content: start; }
.toc-row { min-width: 0; overflow-wrap: anywhere; font-size: 17px; font-weight: 700; }
.toc-row.sub { padding-left: 20px; font-size: 13px; font-weight: 400; }
/* PDF 로 찍을 때(쪽 하나씩) · 인쇄 */
.doc.paged.pdf { width: auto; min-width: 0; max-width: none; padding: 0; gap: 0; background: #fff; zoom: 1 !important; font-size: 12px; }
.doc.paged.pdf .pg { box-shadow: none; }
@media print {
  .doc.paged { zoom: 1 !important; padding: 0; gap: 0; background: #fff; display: block; width: auto; }
  .pg { box-shadow: none; width: 210mm; height: 296.6mm; break-after: page; page-break-after: always; break-inside: avoid; }
  .pg-act { display: none !important; }
}
/* 보고서 구성 창 */
.cfg-list { display: grid; gap: .4rem; }
.cfg-row { border: 1.5px solid var(--line); border-radius: 11px; padding: .45rem .6rem; background: #fff; display: grid; gap: .4rem; }
.cfg-row.off { opacity: .55; background: #F4F6F9; }
.cfg-line { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.cfg-line .check { flex: 1; min-width: 12rem; } .cfg-title { min-height: 36px; }
.cfg-btns { display: flex; align-items: center; gap: .25rem; }
.chip.small { min-height: 32px; padding: .15rem .6rem; font-size: .8rem; }
@media (max-width: 560px) { .form .grid3 { grid-template-columns: 1fr; } }
/* 항목별 별첨 (작업 화면 항목 카드 안) */
.item-att { display: grid; gap: .35rem; justify-items: start; margin-top: .35rem; }
.item-att .att-row { padding: .35rem .5rem; }
/* 홈: 작업 시작 옆 새 프로젝트 */
.hero-btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero-new { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); box-shadow: none; }
.hero-new:hover { background: rgba(255,255,255,.12); }
/* 사진 순서 바꾸기 창 (views-job.js orderSheet) */
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; }
.order-cell { display: grid; gap: .3rem; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: .35rem; box-shadow: 0 2px 0 #D5DCE7; }
.order-cell.picked { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,86,224,.25); }
.order-img { position: relative; padding: 0; border: 0; border-radius: 9px; overflow: hidden; aspect-ratio: 1; cursor: grab; background: #DDE4EE; }
.order-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-img b { position: absolute; left: .3rem; top: .3rem; min-width: 1.6rem; height: 1.6rem; border-radius: 99px; background: var(--ink); color: var(--tape); font-size: .82rem; display: grid; place-items: center; }
.order-btns { display: flex; justify-content: space-between; }
.order-btns .icon-btn:disabled { opacity: .3; }

/* ───────── 양식(form-blocks.js) — 보고서 장·별첨 양식 (2026-11-11) ───────── */
/* 꼭 고칠 곳: 문서에서는 빨간 글씨+물결 밑줄, 입력칸에서는 빨간 테두리 */
.req { color: #D0211C; font-weight: 700; text-decoration: underline wavy #D0211C; text-underline-offset: 3px; }
.req-in { border-color: #D0211C !important; background: #FFF4F3 !important; box-shadow: 0 0 0 2px rgba(208,33,28,.15) !important; }
.req-count { font-size: .82rem; font-weight: 800; color: #D0211C; background: #FFECEA; padding: .25rem .6rem; border-radius: 99px; margin-right: auto; }
.req-count.none { color: var(--ok); background: var(--ok-bg); }
.req-badge { font-style: normal; font-size: .7rem; font-weight: 800; color: #fff; background: #D0211C; border-radius: 99px; padding: .05rem .45rem; margin-left: .4rem; }
/* 문서 안 양식 */
.pg h1.chap { text-align: left; letter-spacing: .02em; font-size: 21px; border-bottom: 2px solid #12213A; padding-bottom: 6px; margin: 2px 0 14px; }
.pg .fm-h { font-size: 13.5px; font-weight: 800; margin: 12px 0 6px; }
.pg .fm-p { margin: 0 0 8px; } .pg .fm-p p, .pg .fm-paragraph { margin: 0 0 4px; font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; }
.pg .fm-sign { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 14px; }
.pg .fm-sign > div { border: 1px solid #333; padding: 8px 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; min-height: 58px; align-items: center; }
.pg .fm-sign i { grid-column: 1 / -1; text-align: right; color: #888; font-size: 10px; font-style: normal; }
.pg.p-att-form h1 { margin-top: 2px; }
/* 양식 고치기 창 */
.fm-top { align-items: center; gap: .4rem; }
.fm-list { display: grid; gap: .55rem; }
.fm-block { border: 1.5px solid var(--line); border-radius: 12px; padding: .5rem .6rem; background: #fff; display: grid; gap: .45rem; box-shadow: 0 2px 0 #D5DCE7; }
.fm-block-head { display: flex; justify-content: space-between; align-items: center; }
.fm-tag { font-size: .72rem; font-weight: 800; padding: .15rem .5rem; border-radius: 6px; background: var(--na-bg); color: var(--ink); }
.fm-tag.t-h { background: var(--ink); color: var(--tape); } .fm-tag.t-grid, .fm-tag.t-kv { background: #E3ECFF; color: var(--blue-d); } .fm-tag.t-auto { background: var(--ok-bg); color: var(--ok); }
.fm-kv { display: grid; gap: .35rem; justify-items: start; } .fm-kv .check { justify-self: stretch; }
.fm-kv-row { width: 100%; display: grid; grid-template-columns: minmax(6rem, 1fr) 2fr auto; gap: .35rem; align-items: center; }
.fm-grid-wrap { display: grid; gap: .4rem; }
.fm-grid-scroll { overflow-x: auto; }
.fm-grid { border-collapse: collapse; min-width: 100%; }
.fm-grid th, .fm-grid td { border: 1px solid var(--line); padding: 2px; vertical-align: top; }
.fm-grid th { background: #EEF2F8; } .fm-grid th > input { font-weight: 700; }
.fm-grid input { min-width: 6.5rem; min-height: 36px; padding: .2rem .4rem; font-size: .85rem; border-radius: 6px; }
.fm-grid th { white-space: nowrap; } .fm-grid th .icon-btn { display: inline-grid; }
.icon-btn.tiny { width: 26px; height: 26px; min-height: 26px; font-size: .75rem; }
.fm-auto { display: grid; gap: .35rem; justify-items: start; }
.fm-add { flex-wrap: wrap; }
/* 별첨 추가 창: 양식 고르기 */
.att-sub { margin: .6rem 0 0; font-size: .95rem; }
.att-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .45rem; }
.att-form-btn { display: grid; gap: .1rem; text-align: left; padding: .6rem .7rem; border-radius: 12px; border: 1.5px solid #C4CFDE; background: #fff; cursor: pointer; box-shadow: 0 2px 0 #C4CFDE; }
.att-form-btn small { color: #D0211C; font-size: .72rem; font-weight: 700; }
.att-form-btn:hover { border-color: var(--blue); }
.att-kind.k-양식 { background: #FFF1C9; color: #7A5A00; }
.att-kind.k-파일 { background: #E6F0FF; color: #1D4ED8; }
.att-edit { font-size: .74rem; color: var(--blue-d); font-weight: 700; }
button.att-name { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; font: inherit; }
.lib-pick { width: 100%; }
/* 보고서 직접 고치기(워드처럼) — views-report.js */
.edit-bar { position: sticky; top: 64px; z-index: 30; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; background: #FFF6D6; border: 1.5px solid #F0C64A; border-radius: 14px; padding: .55rem .8rem; box-shadow: 0 6px 18px -8px rgba(18,33,58,.35); }
.edit-bar span { flex: 1; min-width: 12rem; font-size: .86rem; font-weight: 650; color: #5A4300; }
.doc.editing [contenteditable] { outline: 1px dashed rgba(31,86,224,.45); outline-offset: -2px; cursor: text; }
.doc.editing [contenteditable]:hover { background: rgba(31,86,224,.06); }
.doc.editing [contenteditable]:focus { outline: 2px solid #1F56E0; background: #fff; }
.doc.editing .pg-act { display: none; }
.report-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; min-width: 0; max-width: 794px; }
.report-page-actions .pg-act { position: static; opacity: 1; }
.doc.editing .report-page-actions { display: none; }
.doc.editing .pg-head > span { visibility: visible; min-height: 1em; }
.doc.editing .photo-cell.tappable { cursor: default; }
.doc .edited { white-space: pre-wrap; }

.report-folder > summary { cursor: pointer; font-weight: 800; overflow-wrap: anywhere; }
.report-folder > summary .hint { margin-inline-start: .7rem; }
.report-folder[open] > summary { margin-bottom: .75rem; }
.job-bar [role="status"]:empty { display: none; }
@media (max-width: 560px) {
  .job { padding-bottom: 6.5rem; }
  .job-bar-in { flex-wrap: wrap; }
  .job-bar [role="status"] { flex-basis: 100%; }
}

/* 화면 폭에 따라 세로로 재배치한다. 인쇄와 보고서 캡처는 A4 규격을 사용한다. */
@media screen {
  #view, .stack > *, .stack-s > *, .field > *, .sheet-body > * { min-width: 0; }
  input, select, textarea, .btn, .chip, .sec-head select.assign { min-width: 0; max-width: 100%; }
  .btn, .chip { white-space: normal; overflow-wrap: anywhere; text-align: center; }
  .grid2, .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3, .results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chips, .photos { flex-wrap: wrap; overflow: visible; }
  .table-wrap, .fm-grid-scroll { overflow: visible; }
  .tbl, .fm-grid { min-width: 0; width: 100%; table-layout: fixed; }
  .tbl th, .fm-grid th { white-space: normal; }
  .fm-grid input { min-width: 0; }
  .fm-block-head, .item-title { flex-wrap: wrap; gap: .35rem; }
  .cfg-line .check, .edit-bar span { min-width: min(12rem, 100%); }
  .doc-scroll { overflow: visible; }
  .doc-scroll > .doc:not(.paged):not(.pdf) { min-width: 0; }
  .sheet-head { gap: .5rem; }
  .sheet-head .icon-btn { flex: 0 0 40px; }
}
@media screen and (min-width: 960px) {
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media screen and (max-width: 760px) {
  .tbl, .tbl tbody, .fm-grid, .fm-grid tbody { display: block; }
  .tbl thead, .fm-grid:not(.fm-grid-wrap .fm-grid) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl tr, .fm-grid tbody tr, .fm-grid thead tr { display: grid; }
  .tbl tr + tr, .fm-grid tbody tr { border-top: 2px solid var(--line); }
  .tbl td, .fm-grid tbody td { display: grid; grid-template-columns: minmax(0, 1fr); border: 0; gap: .2rem; padding: .4rem .65rem; }
  .tbl td[data-label]::before, .fm-grid td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 750; }
  .fm-grid thead { display: block; }
  .fm-grid th { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem; align-items: center; }
  .fm-grid th:empty { display: none; }
  .fm-grid input { font-size: 1rem; min-height: 44px; }
  .fm-grid .icon-btn.tiny { width: 40px; height: 40px; }
}
@media screen and (max-width: 560px) {
  .top { padding-inline: max(.6rem, env(safe-area-inset-left)) max(.6rem, env(safe-area-inset-right)); }
  .top-right { min-width: 0; flex-shrink: 1; }
  .top-right .who { white-space: normal; overflow-wrap: anywhere; }
  .top-right .sync { flex-shrink: 0; }
  #view { padding-inline: max(.7rem, env(safe-area-inset-left)) max(.7rem, env(safe-area-inset-right)); }
  .tabs { width: min(calc(100% - max(.75rem, env(safe-area-inset-left)) - max(.75rem, env(safe-area-inset-right))), 520px); }
  .tabs a { min-height: 44px; min-width: 0; text-align: center; }
  .grid2.form-wide, .form .grid2, .form .grid3 { grid-template-columns: minmax(0, 1fr); }
  .equip-detail { grid-template-columns: repeat(2, minmax(0, 1fr)) 40px; padding-left: 0; }
  .equip-detail .wide { grid-column: 1 / 3; }
  .equip-detail .icon-btn { grid-column: 3; }
  .wm-field { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-kv-row { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
  .job-bar .prog { flex-basis: 100%; }
  .job-bar .btn { flex: 1 1 auto; }
  .job { padding-bottom: 8rem; }
  .doc-scroll > .doc:not(.paged):not(.pdf) { padding: .6rem .4rem; }
  .doc-scroll > .doc:not(.paged):not(.pdf) .doc-tbl :is(td, th) { padding: .25rem .15rem; }
}
@media screen and (max-width: 600px) {
  .brand-sub { display: none; }
  .top { flex-wrap: wrap; }
  .top-right { margin-inline-start: auto; }
  .release-label { font-size: .72rem; }
  .login-brand .release-label { font-size: clamp(.8rem, 4.2vw, 1.05rem); white-space: normal; }
}
@media screen and (max-width: 360px) {
  .tabs a { font-size: .64rem; }
  .album-grid, .att-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 좁은 화면은 보고서 내용부터 읽고, A4 배치는 필요할 때 확인한다. */
.report-page-view { display: none; }
@media screen and (max-width: 760px) {
  .report-page-view { display: inline-flex; }
  .report-scroll:not(.a4-preview) > .doc.paged { width: 100%; zoom: 1 !important; padding: .35rem; }
  .report-scroll:not(.a4-preview) .pg {
    width: 100%; height: auto; min-width: 0; padding: .7rem; overflow: visible; font-size: .9rem;
  }
  .report-scroll:not(.a4-preview) .pg-body { flex: auto; padding: .6rem 0; }
  .report-scroll:not(.a4-preview) .pg-head, .report-scroll:not(.a4-preview) .pg-foot {
    margin: 0; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }
  .report-scroll:not(.a4-preview) :is(.pg-head, .pg-foot) span { white-space: normal; }
  .report-scroll:not(.a4-preview) .pg .doc-tbl :is(th, td) { padding: .25rem .15rem; }
  .report-scroll:not(.a4-preview) .pg .grow { display: block; }
  .report-scroll:not(.a4-preview) .pg tr.blank { display: none; }
  .report-scroll:not(.a4-preview) .pg-act { position: static; align-self: flex-end; }
  .report-scroll:not(.a4-preview) .pg .att-sheet { aspect-ratio: 210 / 297; height: auto; flex: none !important; }
  .report-scroll:not(.a4-preview) .photo-sheet {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); grid-template-rows: none;
  }
  .report-scroll:not(.a4-preview) .photo-sheet img { flex: none; aspect-ratio: 4 / 3; }
  .report-scroll:not(.a4-preview) .photo-sheet figcaption { height: auto; min-height: 2.9em; font-size: .8rem; }
  .report-scroll:not(.a4-preview) .pg.p-cover .pg-body { padding: 1rem; }
  .report-scroll:not(.a4-preview) .library-title { padding: 2rem 0; font-size: .85em; }
  .report-scroll:not(.a4-preview) .library-recipient { margin-bottom: 2rem; font-size: 1.45em; }
  .report-scroll:not(.a4-preview) .toc-list { padding-inline: .3rem; }
  .report-scroll:not(.a4-preview) .pg .sign-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
}

/* 보고서의 보기 방식과 상태 버튼은 모바일에서도 한 줄을 공유한다. */
.report-list-chips, .report-list-chips > [role="group"] { display: flex; align-items: stretch; gap: .4rem; min-width: 0; }
.report-list-chips { gap: .7rem; padding: .15rem .1rem .45rem; }
@media screen and (max-width: 560px) {
  .report-list-chips, .report-list-chips > [role="group"] { gap: .25rem; }
  .report-list-chips .chip {
    min-height: 44px; flex: 0 1 auto;
    font-size: clamp(.65rem, 3.15vw, .84rem);
    padding-inline: clamp(.25rem, 1.35vw, .65rem);
  }
}

/* 보고서 쪽 넣기·빼기 (views-report.js decoratePages) — 쪽 위 단추 막대, 뺀 쪽은 흐리게 + 사선 */
.pg { position: relative; }
.pg-ops { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: .4rem; z-index: 5; padding: .35rem .5rem; border-radius: 14px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(15,30,60,.18), 0 1px 0 rgba(255,255,255,.9) inset; }
.pg.pg-off > :not(.pg-ops) { opacity: .28; }
.pg.pg-off { background: repeating-linear-gradient(135deg, #fff 0 14px, #f3f5f9 14px 28px); }

/* 현황표 추가 사진 쪽 (site-sheet.js photoPageBlocks) — 칸마다 사진(비율 유지 맞춤) + 설명, 표처럼 테두리 */
.sheet-photo-grid { display: grid; border: 1px solid #333; border-right: 0; border-bottom: 0; height: 900px; min-height: 0; }
.sheet-photo-grid .sp-cell { margin: 0; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid #333; border-bottom: 1px solid #333; }
.sheet-photo-grid .sp-cell img, .sheet-photo-grid .sp-empty { flex: 1; min-height: 0; width: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.sheet-photo-grid figcaption { border-top: 1px solid #333; text-align: center; font-weight: 700; font-size: 12px; padding: 4px; }
.ss-img.first2 { outline: 2px solid var(--blue); outline-offset: -2px; }

/* [역할] 보고서 인쇄에서 제외한 쪽을 숨긴다. [하는 일] 숨긴 A4 쪽을 건너뛴다. [원리] 인쇄 미디어에만 적용한다. [이유] 내보내기와 인쇄 쪽을 맞춘다. [관계] views-report.js 쪽 편집. */
@media print { .pg.pg-off { display: none !important; } }

.pg-act.report-diagram-picker { top: auto; bottom: 38px; }

/* [역할] 직접 고치기 본문 [하는 일] 편집 중에는 쪽 높이를 늘린다.
   [원리] 편집 모드에서만 자동 높이를 사용한다. [이유] 전체 입력을 한 칸에서 수정할 수 있게 한다.
   [관계] views-report.js 저장 후 A4 재배치. */
.doc.editing .pg { height: auto; min-height: 1123px; overflow: visible; }
.doc .edited { white-space: pre-wrap; overflow-wrap: anywhere; }

/* [역할] 도서관 양식의 제1~5장 [하는 일] 제목과 표·목록의 서식을 맞춘다.
   [원리] 해당 장에만 청색 머리칸과 들여쓰기를 적용한다.
   [이유] 기존 점검표와 다른 서식을 보존한다. [관계] views-report.js, form-blocks.js. */
.pg:is(.library-chapter,.library-facility) .pg-head { border-bottom: 0; }
.pg:is(.library-chapter,.library-facility) .chap { border-bottom: 0; padding-bottom: 0; margin: 4px 0 14px; }
.pg:is(.library-staff,.library-plan,.library-facility) .doc-tbl :is(thead th, tbody th:first-child) { background: #214e76; color: white; }
.pg.library-facility .doc-tbl tbody th.group-cell { background: white; color: #111; }
.pg:is(.library-staff,.library-plan,.library-facility) .doc-tbl :is(th,td) { text-align: center; border-color: #111; }
.pg:is(.library-staff,.library-plan) .doc-tbl :is(th,td) { padding-inline: 2px; font-size: 11px; }
.pg.library-general .fm-h:not(:first-of-type) { margin-top: 26px; }
.pg.library-general .fm-paragraph { margin-bottom: 8px; }
.pg .library-list-line { padding-left: 1.2em; }
.pg .library-bullet::before { content: "▪ "; }
.pg .library-diagram .diagram-box { border: 0; }

/* [역할] 현황표 이미지 틀 [하는 일] 크기와 회전을 지정한 칸 안에 표시한다.
   [원리] 틀 크기를 기준으로 이미지 크기를 계산한다. [이유] 사진이 커져도 표를 밀지 않는다.
   [관계] site-sheet.js의 사진과 상세도 조절. */
.sheet-image-frame { position: relative; display: block; container-type: size; width: 100%; height: 100%; overflow: hidden; }
.sheet-image-frame > img { position: absolute; max-width: none; max-height: none; padding: 0 !important; }
.sheet-image-frame > img { top: 50%; left: 50%; }
.doc .sheet-photos .sheet-image-frame { height: var(--sheet-photo-height, 222px); }
.sheet-photo-grid .sheet-image-frame { flex: 1; height: auto; }
.sheet-image-thumb { width: min(100%, 180px); height: 110px; margin-inline: auto; }
.sheet-image-preview { height: min(38vh, 300px); background: #f3f6fa; border: 1px solid #c8d4e0; }

/* [역할] 연락망 사진 단추 [하는 일] 그림 칸에서 업로드를 연다.
   [원리] 편집용 단추만 칸 가장자리에 표시한다. [이유] 그림 배치 보존.
   [관계] views-report.js 5.5 비상연락망. */
.contact-image-action { position: absolute; bottom: 8px; inset-inline-end: 8px; z-index: 1; }
.doc.editing .contact-image-action { display: none; }

/* ───────── 보고서 뷰어·편집기 (views-report.js viewReport, 2026-11-14) ─────────
   [역할] PDF 뷰어처럼: 위 도구 줄 + 왼쪽 목차 + 가운데 A4 쪽. 「편집」을 켜면 글 칸이 입력 가능해지고 쪽 위에 도구 줄이 나온다
   [원리] 화면 높이를 꽉 채우는 틀 안에서 목차·문서가 따로 스크롤. 유리 느낌 도구 줄(반투명 + blur), 입체 그림자
   [관계] .rv(뿌리) > .rv-frame > .rv-bar + .rv-body(.rv-outline + .rv-pages) */
@media screen {
  #view:has(> .rv) { max-width: 1700px; padding-bottom: 1rem; }
  .rv { height: calc(100dvh - 5.4rem); min-height: 32rem; display: flex; flex-direction: column; gap: .5rem; }
  .rv .head-row h1 { font-size: 1.15rem; margin: 0; } .rv .head-row { align-items: center; } .rv .head-row .hint { margin: 0; }
  .rv-foot { margin: 0; font-size: .75rem; }
  .rv-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #dfe5ee;
    border: 1px solid #c4cfdd; box-shadow: 0 18px 40px rgba(15, 30, 60, .16), 0 1px 0 rgba(255, 255, 255, .8) inset; }
  .rv-bar { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; padding: .45rem .6rem; position: relative; z-index: 20;
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 247, 252, .9)); backdrop-filter: blur(10px); border-bottom: 1px solid #c9d3e0; box-shadow: 0 4px 14px rgba(15, 30, 60, .08); }
  .rv-bar .btn.small { padding: .38rem .7rem; font-size: .86rem; }
  .rv-bar .rv-ico { min-width: 2.1rem; padding-inline: .45rem; font-size: 1rem; line-height: 1; }
  .rv-group { display: flex; align-items: center; gap: .2rem; padding: .15rem; border-radius: 11px; background: #e9eef6; box-shadow: 0 1px 2px rgba(15, 30, 60, .12) inset; }
  .rv-page-input { width: 3.1rem !important; min-width: 0; flex: none; text-align: center; padding: .28rem .2rem; border: 1px solid #b9c5d6; border-radius: 8px; font: inherit; font-weight: 700; background: #fff; -moz-appearance: textfield; }
  .rv-page-input::-webkit-outer-spin-button, .rv-page-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .rv-page-total { font-size: .86rem; font-weight: 650; color: #46556b; padding-inline: .15rem .3rem; white-space: nowrap; }
  .rv-zoom-label { min-width: 3.4rem; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: .86rem; cursor: pointer; color: #1f2d44; }
  .rv-req { border: 0; border-radius: 999px; padding: .32rem .7rem; font: inherit; font-size: .8rem; font-weight: 750; color: #fff; background: #d93025; cursor: pointer; box-shadow: 0 3px 8px rgba(217, 48, 37, .35); }
  .rv-space { flex: 1; }
  .rv-save { font-size: .78rem; color: #4a5a72; font-weight: 600; }
  .rv-pop-wrap { position: relative; }
  .rv-pop { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 40; min-width: 15rem; padding: .55rem; border-radius: 14px; background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px);
    border: 1px solid #c9d3e0; box-shadow: 0 18px 40px rgba(15, 30, 60, .25); }
  .rv-pop .toolbar, .rv-more, .rv-more .report-management { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; margin: 0; }
  .rv-pop .btn { width: 100%; justify-content: flex-start; text-align: start; font-size: .88rem; padding: .5rem .7rem; }
  .rv-more hr { border: 0; border-top: 1px solid #dbe3ed; margin: .2rem 0; width: 100%; }
  .rv-body { flex: 1; min-height: 0; display: flex; position: relative; }
  .rv-outline { width: 268px; flex: none; overflow-y: auto; background: #f6f8fb; border-right: 1px solid #c9d3e0; padding: .5rem .45rem 1rem; }
  .rv-outline h2 { margin: .2rem .5rem .45rem; font-size: .8rem; letter-spacing: .08em; color: #5b6b82; }
  .rv-ol-row { display: flex; align-items: center; gap: .15rem; }
  .rv-ol { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .5rem; border: 0; background: transparent; font: inherit; font-size: .86rem; font-weight: 700; color: #1f2d44; text-align: start; padding: .42rem .55rem; border-radius: 9px; cursor: pointer; }
  .rv-ol span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rv-ol i { font-style: normal; font-size: .76rem; font-weight: 600; color: #7a889c; font-variant-numeric: tabular-nums; }
  .rv-ol-row.sub .rv-ol { font-weight: 500; font-size: .82rem; padding-left: 1.35rem; color: #3b4a61; }
  .rv-ol:hover { background: #e8eef8; }
  .rv-ol.on { background: #fff; color: var(--blue-d, #1749a9); box-shadow: 0 3px 10px rgba(15, 30, 60, .12), inset 3px 0 0 var(--blue, #2563eb); }
  .rv-ol-edit { border: 0; background: #fff; border-radius: 8px; padding: .25rem .4rem; cursor: pointer; box-shadow: 0 1px 4px rgba(15, 30, 60, .18); }
  .rv-outline-closed .rv-outline { display: none; }
  .rv-pages { flex: 1; min-width: 0; overflow: auto; padding: 14px; scroll-behavior: auto; }
  .rv-pages .report-scroll { max-width: none; width: max-content; min-width: 100%; margin: 0; overflow: visible; box-shadow: none; background: transparent; border-radius: 0; }
  .rv-pages .doc.paged { margin-inline: auto; background: transparent; }
  .rv-pages .pg { box-shadow: 0 10px 28px rgba(15, 30, 60, .22), 0 1px 3px rgba(15, 30, 60, .2); }
  /* 보기 모드: 문서 안의 화면 전용 단추를 모두 숨겨 깔끔한 뷰어로 */
  .rv:not(.rv-editing) .doc .no-print, .rv:not(.rv-editing) .doc .pg-act { display: none !important; }
  /* 편집 모드 */
  .rv-editing .rv-frame { border-color: #e2b93b; box-shadow: 0 18px 40px rgba(15, 30, 60, .16), 0 0 0 3px rgba(255, 205, 60, .45); }
  .rv-pagebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; width: 794px; max-width: 100%; margin: 6px auto -2px; font-family: var(--font); }
  .rv-pagebar-no { margin-right: auto; font-size: 12px; font-weight: 750; color: #4a5a72; background: #fff; border-radius: 999px; padding: 3px 10px; box-shadow: 0 1px 4px rgba(15, 30, 60, .15); }
  .rv-pagebar .btn, .rv-editing .doc.editing .rv-pagebar .pg-act { position: static; display: inline-flex !important; opacity: 1; font-size: 12px; padding: 5px 10px; }
  .rv-editing .doc.editing .pg-act.report-diagram-picker { display: inline-flex !important; }
  .rv-editing .doc.editing [contenteditable] { outline: 1px dashed transparent; outline-offset: 1px; border-radius: 2px; cursor: text; transition: background .12s, outline-color .12s; }
  .rv-editing .doc.editing [contenteditable]:hover { outline-color: #9db7e8; background: rgba(37, 99, 235, .05); }
  .rv-editing .doc.editing [contenteditable]:focus { outline: 2px solid var(--blue, #2563eb); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
}
@media screen and (max-width: 959px) {
  .rv { height: calc(100dvh - 9.5rem); }
  .rv-outline { position: absolute; inset: 0 auto 0 0; z-index: 15; width: min(82%, 300px); box-shadow: 14px 0 30px rgba(15, 30, 60, .25); display: none; }
  .rv-outline-open .rv-outline { display: block; }
  .rv-pages { padding: 8px; }
  .rv-save, .rv-space, .rv-foot { display: none; }
  .rv-bar { gap: .3rem; padding: .35rem .4rem; } .rv-bar .btn.small { padding: .32rem .5rem; } .rv-zoom-label { min-width: 2.7rem; }
  .rv-page-input { width: 2.5rem !important; }
}
@media print {
  .rv, .rv-frame, .rv-body, .rv-pages { display: block !important; height: auto !important; min-height: 0 !important; overflow: visible !important; border: 0; box-shadow: none; background: #fff; padding: 0; }
  .rv-bar, .rv-outline, .rv-pagebar, .rv-foot { display: none !important; }
}

/* ───────── 홈·프로젝트 화면 개선 (views-home.js, views-project.js, 2026-11-14) ─────────
   [역할] 현황판(숫자 타일·2단 배치), 프로젝트 카드 격자, 프로젝트 상세(머리 카드·바로가기 타일·옆 칸)
   [원리] 겹 그림자 + 위쪽 밝은 선으로 떠 있는 느낌(입체), 마우스를 올리면 살짝 떠오름, 유리 느낌 타일(반투명 + blur)
   [관계] ui.js ico(.ic), jobRow(.ring) */
.ic { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; } .ic svg { width: 100%; height: 100%; }
.btn .ic { margin-right: .35rem; }
@media screen { #view:has(> .dash), #view:has(> .wide-view) { max-width: 1240px; } }
h2 .count { font-style: normal; font-size: .78rem; font-weight: 800; margin-left: .45rem; padding: .1rem .5rem; border-radius: 99px; background: #DCE5F2; color: var(--ink); vertical-align: .12em; }
h2 .count.bad { background: var(--bad); color: #fff; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 800; padding: .16rem .55rem; border-radius: 99px; background: #E3E9F1; color: var(--muted); white-space: nowrap; }
.badge.on { background: #DFF5E8; color: var(--ok); } .badge.off { background: #EEF1F6; color: #6B7A90; } .badge.lock { background: #FFF1C9; color: #7A5A00; }

/* 진행률 고리 */
.ring { --p: 0; flex: none; width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: baseline; justify-content: center; padding-top: 16px; box-sizing: border-box; gap: 1px; position: relative; isolation: isolate;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), #E3E9F1 0); box-shadow: 0 3px 8px -3px rgba(18,33,58,.45), inset 0 1px 2px rgba(18,33,58,.18); }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(18,33,58,.2); z-index: -1; }
.ring b { font-size: .86rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; } .ring i { font-style: normal; font-size: .55rem; font-weight: 700; color: var(--muted); }
.ring.full i { display: none; } .ring.full b { font-size: .8rem; }
.ring.full { background: conic-gradient(var(--ok) 100%, #E3E9F1 0); } .ring.full b { color: var(--ok); }
.row-card, .proj-card, .todo-card, .tile, .act-tile, .kpi { transition: transform .15s ease, box-shadow .15s ease; }
@media (hover: hover) { .row-card:hover, .proj-card:hover, .todo-card:hover, .tile:hover, .act-tile:hover { transform: translateY(-2px); box-shadow: 0 1px 0 #fff inset, 0 3px 6px rgba(18,33,58,.1), 0 18px 30px -16px rgba(18,33,58,.5); } }
@media (prefers-reduced-motion: reduce) { .row-card, .proj-card, .todo-card, .tile, .act-tile, .kpi { transition: none; } }

/* 홈 현황판 */
.dash-hero { grid-template-columns: 1fr; justify-items: stretch; gap: 1.1rem; padding: 1.5rem 1.4rem; position: relative; overflow: hidden;
  background-image: radial-gradient(120% 140% at 100% 0%, rgba(53,176,255,.28), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(31,86,224,.35), transparent 60%), repeating-linear-gradient(0deg, transparent 0 26px, rgba(255,255,255,.04) 26px 27px); }
.dash-hello { display: grid; gap: .8rem; justify-items: start; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.kpi { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .1rem .6rem; padding: .75rem .9rem; border-radius: 16px; text-decoration: none; color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.2); backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 20px -12px rgba(0,0,0,.6); }
.kpi .ic { grid-row: span 2; width: 2.2rem; height: 2.2rem; padding: .45rem; border-radius: 12px; background: rgba(255,255,255,.14); color: var(--tape); box-sizing: border-box; }
.kpi b { font-size: 1.55rem; font-weight: 800; line-height: 1.1; } .kpi span { font-size: .78rem; color: #C9D6EA; font-weight: 600; }
.kpi.warn .ic { background: rgba(255,200,58,.25); } .kpi.bad .ic { background: rgba(255,90,80,.3); color: #FFD9D5; } .kpi.bad b { color: #FFB4AD; }
@media (hover: hover) { .kpi:hover { transform: translateY(-2px); background: linear-gradient(160deg, rgba(255,255,255,.24), rgba(255,255,255,.1)); } }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.dash-panel h2 { margin-top: 0; }
.todo-card { position: relative; display: grid; gap: .3rem; padding: .8rem 2.2rem .8rem 1rem; margin-bottom: .55rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--lift); text-decoration: none; color: var(--ink); }
.todo-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .22rem; }
.todo-card li { font-size: .86rem; padding-left: .95rem; position: relative; color: #3A4A63; }
.todo-card li::before { content: ""; position: absolute; left: 0; top: .5em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--fix); }
.todo-card li.bad::before { background: var(--bad); } .todo-card li.bad { color: var(--bad); font-weight: 650; }
.todo-card .chev { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.tile { display: grid; grid-template-columns: auto 1fr; gap: .05rem .8rem; align-items: center; padding: .95rem 1rem; border-radius: var(--r); background: var(--surface); box-shadow: var(--lift); text-decoration: none; color: var(--ink); }
.tile .ic { grid-row: span 2; width: 2.6rem; height: 2.6rem; padding: .55rem; box-sizing: border-box; border-radius: 14px; color: var(--blue); background: linear-gradient(160deg, #EAF1FF, #D7E4FF); box-shadow: 0 1px 0 #fff inset, 0 4px 8px -4px rgba(31,86,224,.5); }
.tile span:last-child { font-size: .84rem; color: var(--muted); }

/* 프로젝트 목록 */
.proj-search { display: flex; align-items: center; gap: .55rem; padding: .15rem .9rem; border-radius: 14px; background: var(--surface); box-shadow: var(--lift), inset 0 0 0 1.5px #D3DCE8; color: var(--muted); }
.proj-search:focus-within { box-shadow: var(--lift), inset 0 0 0 2px var(--blue); }
.proj-search-input { flex: 1; border: 0 !important; outline: 0; background: transparent; box-shadow: none !important; font: inherit; padding: .65rem 0; min-width: 0; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .8rem; }
.proj-card { display: grid; gap: .65rem; padding: 1rem; border-radius: 18px; background: var(--surface); box-shadow: var(--lift); text-decoration: none; color: var(--ink); border-top: 4px solid #C9D5E6; }
.proj-card.warn { border-top-color: var(--fix); } .proj-card.bad { border-top-color: var(--bad); }
.proj-top { display: flex; align-items: flex-start; gap: .7rem; }
.proj-ic { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 14px; display: grid; place-items: center; font-size: 1.25rem; color: #fff; background: linear-gradient(160deg, #2A3F66, var(--ink)); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 10px -6px rgba(18,33,58,.8); }
.proj-name { flex: 1; min-width: 0; display: grid; } .proj-name b { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .proj-name span { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-facts { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .82rem; color: #3A4A63; } .fact { display: inline-flex; align-items: center; gap: .3rem; } .fact .ic { color: #8494AB; }
.proj-todo { display: flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 750; color: #8A5A00; background: var(--fix-bg); border-radius: 10px; padding: .4rem .6rem; min-width: 0; }
.proj-todo span { font-weight: 500; color: #5A4A2A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.proj-card.bad .proj-todo { background: var(--bad-bg); color: var(--bad); } .proj-todo.ok { background: var(--ok-bg); color: var(--ok); }

/* 프로젝트 상세 */
.proj-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem; padding: 1.1rem 1.2rem; border-radius: 20px; background: linear-gradient(160deg, #fff, #F3F6FB); box-shadow: var(--lift); border-left: 6px solid var(--tape); }
.proj-head-main { display: grid; gap: .3rem; min-width: 0; } .proj-head h1 { margin: 0; font-size: 1.5rem; } .proj-addr { margin: 0; color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .3rem; }
.act-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; }
.act-tile { display: grid; justify-items: center; gap: .35rem; padding: .85rem .4rem; border-radius: 16px; background: var(--surface); box-shadow: var(--lift); text-decoration: none; color: var(--ink); text-align: center; }
.act-tile .ic { width: 2.5rem; height: 2.5rem; padding: .55rem; box-sizing: border-box; border-radius: 14px; color: var(--blue); background: linear-gradient(160deg, #EAF1FF, #D7E4FF); box-shadow: 0 1px 0 #fff inset, 0 4px 8px -4px rgba(31,86,224,.5); }
.act-tile b { font-size: .86rem; }
.act-tile.primary { background: linear-gradient(160deg, #3A74FF, var(--blue)); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 3px 0 var(--blue-d, #1642B5), 0 14px 22px -12px rgba(31,86,224,.9); }
.act-tile.primary .ic { background: rgba(255,255,255,.2); color: #fff; box-shadow: none; }
.proj-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.1rem; align-items: start; }
.proj-cols section > h2:first-child { margin-top: 0; }
.stat span { display: flex; align-items: center; gap: .3rem; }
.info-card h2 { margin: 0 0 .6rem; font-size: 1rem; }
.info-grid { display: grid; gap: .55rem; margin-bottom: .7rem; }
.info-item { display: grid; grid-template-columns: auto 1fr; gap: 0 .6rem; align-items: center; }
.info-item .ic { grid-row: span 2; width: 2rem; height: 2rem; padding: .42rem; box-sizing: border-box; border-radius: 10px; background: #EEF2F8; color: #4E6182; }
.info-item span:not(.ic) { font-size: .74rem; color: var(--muted); } .info-item b { font-size: .92rem; }
.lock-card summary { cursor: pointer; font-weight: 750; display: flex; align-items: center; gap: .4rem; } .lock-card[open] summary { margin-bottom: .5rem; }
@media (max-width: 899px) {
  .kpis { grid-template-columns: repeat(2, 1fr); } .dash-cols, .proj-cols { grid-template-columns: minmax(0, 1fr); }
  .act-tiles { grid-template-columns: repeat(3, 1fr); } .tiles { grid-template-columns: 1fr; } .proj-grid { grid-template-columns: 1fr; }
  .proj-head { padding: .95rem 1rem; } .proj-head h1 { font-size: 1.25rem; }
}

/* ───────── 단순 테마 (2026-11-14, 대표님 요청: "너무 조잡하다 → 아주 심플하게") ─────────
   [역할] 앱 전체를 흰 바탕 · 큰 글씨 · 색 하나(파랑) · 장식 없는 모양으로 덮어쓴다
   [원리] 파일 맨 아래에서 색 변수와 공용 부품(단추·카드·메뉴·입력칸)의 그림자·기울임·그라데이션을 걷어 낸다.
          새 화면(홈·현장·점검 시작·한 항목씩 점검)은 .simple / .wiz 로 따로 그린다
   [이유] 한 화면에 할 일 하나, 큰 단추 하나. 잘 안 쓰는 기능은 ⋯ 더보기(.menu-list) 안으로
   [관계] views-home.js, views-project.js, views-job.js(quickStart · viewJob 마법사), ui.js moreButton */
:root { --bg: #FFFFFF; --surface: #FFFFFF; --line: #E3E7ED; --lift: none; --r: 14px; --muted: #667085; --ink: #111827; --blue: #2563EB; --blue-d: #1D4ED8; }
body { font-size: 17px; }
#view { max-width: 640px; }
.top { background: #fff; color: var(--ink); box-shadow: none; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); } .brand-sub { color: var(--muted); } .who { color: var(--muted); }
.tape { background: none; box-shadow: none; transform: none; padding: 0; color: var(--ink); }
.sync { background: #F2F4F7; color: #067647; } .sync::before { box-shadow: none; } .sync.wait { color: #B54708; }
.tabs { background: #fff; box-shadow: 0 0 0 1px var(--line), 0 8px 24px -12px rgba(17,24,39,.25); }
.tabs a { color: #98A2B3; } .tabs a.on { background: #EFF4FF; color: var(--blue); box-shadow: none; }
.card, .row-card, .stat, .table-wrap, .equip, .ph-group { box-shadow: none; border: 1px solid var(--line); }
.btn { background: #fff; border: 1px solid #D0D5DD; box-shadow: none; font-weight: 650; }
.btn:active { transform: none; box-shadow: none; background: #F2F4F7; }
.btn.primary { background: var(--blue); border-color: var(--blue); box-shadow: none; } .btn.primary:active { background: var(--blue-d); }
.btn.danger { background: #fff; color: #D92D20; border-color: #FDA29B; box-shadow: none; }
.btn.big { min-height: 64px; font-size: 1.15rem; border-radius: 14px; }
.chip { box-shadow: none; border: 1px solid #D0D5DD; } .chip.on { background: var(--ink); box-shadow: none; }
.stamp { transform: none; border: 0; background: #F2F4F7; border-radius: 99px; padding: .2rem .65rem; }
.stamp.draft { background: #FFFAEB; color: #B54708; } .stamp.done { background: #EFF4FF; color: var(--blue); } .stamp.submitted { background: #ECFDF3; color: #067647; }
.ring { display: none; }
.row-card { transform: none !important; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea { box-shadow: none; border: 1px solid #D0D5DD; min-height: 52px; }
.sheet { background: #fff; } .sheet-wrap { background: rgba(17,24,39,.4); }
.equip summary { background: #fff; } .equip summary::before { display: none; }
.sec-head span { background: #F2F4F7; color: var(--muted); }
.res { box-shadow: none; background: #fff; border: 1px solid #D0D5DD; } .res.on { transform: none; box-shadow: none; }
.shoot { box-shadow: none; background: var(--ink); } .shoot.alt { border: 1px dashed #D0D5DD; }
.item { background: #fff; border: 1px solid var(--line); }
.job-bar-in { box-shadow: 0 0 0 1px var(--line), 0 8px 24px -12px rgba(17,24,39,.25); background: #fff; }
.rv-frame { box-shadow: none; } .rv-pages .pg { box-shadow: 0 1px 3px rgba(17,24,39,.15); }
.man-dl { box-shadow: none; }

/* 단순 화면 공용 */
.simple { display: grid; gap: 1.1rem; padding-top: .6rem; }
.simple-title { font-size: 1.7rem; margin: 0; letter-spacing: -.02em; } .simple-sub { margin: .15rem 0 0; color: var(--muted); font-size: .95rem; }
.simple-lead { font-size: 1.15rem; margin: 0; color: var(--muted); } .simple-hint { margin: 0; color: var(--muted); font-size: .9rem; }
.simple-h2 { font-size: 1.05rem; margin: .4rem 0 .5rem; }
.simple-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.simple-empty { color: var(--muted); text-align: center; padding: 2rem 0; margin: 0; }
.simple-search { width: 100%; box-sizing: border-box; padding: .6rem .9rem; border-radius: 12px; font: inherit; }
.simple-links { margin: 0; text-align: center; font-size: .9rem; color: var(--muted); } .simple-links a { color: var(--muted); }
.simple-add { border-style: dashed; color: var(--blue); }
.simple-more { border: 1px solid var(--line); border-radius: 14px; padding: .2rem 1rem; }
.simple-more > summary { cursor: pointer; font-weight: 650; padding: .75rem 0; list-style-position: inside; }
.simple-more[open] { padding-bottom: .9rem; } .simple-more[open] > summary { margin-bottom: .3rem; }
.simple-more > .field, .simple-more > .grid2, .simple-more > .wm-box { margin-bottom: .7rem; }
.site-list { display: grid; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.site-list:empty { display: none; }
.site-row { display: flex; align-items: center; gap: .8rem; padding: .95rem 1rem; text-decoration: none; color: var(--ink); background: #fff; }
.site-row + .site-row { border-top: 1px solid var(--line); }
.site-main { flex: 1; min-width: 0; display: grid; gap: .1rem; text-decoration: none; color: inherit; }
.site-main b { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .site-main span { font-size: .88rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row .btn { flex: none; min-height: 46px; } .site-row.link:active { background: #F9FAFB; }
.more-btn { flex: none; min-width: 48px; padding-inline: .5rem; font-size: 1.3rem; line-height: 1; }
.menu-list { display: grid; gap: .5rem; } .menu-list .btn { width: 100%; justify-content: flex-start; min-height: 52px; } .menu-list .hint { margin: .3rem 0 0; }
.kind-big { display: grid; gap: .7rem; }
.kind-big button { display: grid; gap: .15rem; text-align: left; padding: 1.1rem 1.2rem; border-radius: 16px; border: 1px solid #D0D5DD; background: #fff; cursor: pointer; font: inherit; color: var(--ink); }
.kind-big button b { font-size: 1.25rem; } .kind-big button span { color: var(--muted); font-size: .9rem; }
.kind-big button:hover, .kind-big button:focus-visible { border-color: var(--blue); background: #F5F8FF; }
.simple-nav { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.simple-nav a { text-align: center; padding: .85rem .2rem; text-decoration: none; color: var(--ink); font-weight: 650; font-size: .95rem; } .simple-nav a + a { border-left: 1px solid var(--line); }
.simple-form h3 { margin: .6rem 0 0; }

/* 한 항목씩 점검 (.wiz) */
.job-title-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; } .job-title-row h1 { margin: 0; font-size: 1.3rem; }
.wiz-progress { display: flex; align-items: center; gap: .7rem; } .wiz-progress .bar { flex: 1; margin: 0; height: 8px; border-radius: 4px; box-shadow: none; background: #EEF1F5; } .wiz-progress .bar i { background: var(--blue); }
.wiz-progress .prog { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.job:not(.wiz) .wiz-only { display: none; } .wiz .list-only { display: none; }
.wiz details.equip { border: 0; background: none; overflow: visible; } .wiz details.equip:not(.cur-eq) { display: none; }
.wiz .equip summary { pointer-events: none; padding: 0; min-height: 0; background: none; font-size: 1rem; color: var(--blue); font-weight: 700; }
.wiz .equip summary small, .wiz .equip summary .count, .wiz .assign-badge { display: none; }
.wiz .equip-body { border: 0; padding: .2rem 0 0; gap: .4rem; }
.wiz .equip-body > * { display: none; } .wiz .equip-body > .item.cur { display: grid; } .wiz .equip-body > .sec-head.cur-sec { display: flex; margin: 0; }
.wiz .sec-head span, .wiz .sec-head select { display: none; } .wiz .sec-head b { color: var(--muted); font-weight: 600; font-size: .95rem; }
.wiz .item { border: 0; padding: 0; gap: 1.1rem; background: none; animation: none; }
.wiz .item-title { display: grid; gap: .3rem; } .wiz .item-title .t { font-size: 1.55rem; line-height: 1.3; letter-spacing: -.02em; } .wiz .item-title .cat { justify-self: start; } .wiz .item-title .who { font-size: .8rem; }
.wiz .results { gap: .6rem; } .wiz .res { min-height: 76px; font-size: 1.1rem; border-radius: 14px; }
.wiz .item > .row, .wiz .item .item-att { display: none; }
.wiz .shoot { min-width: 96px; height: 96px; border-radius: 14px; }
.job-bar-in.wiz-only { display: grid; grid-template-columns: auto 1fr 1.6fr; gap: .5rem; padding: .5rem; }
.job-bar-in.wiz-only .btn { min-height: 54px; font-size: 1rem; }
.wiz-pos { border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.jump-list { display: grid; gap: .25rem; } .jump-list h3 { margin: .7rem 0 .2rem; font-size: .9rem; color: var(--blue); }
.jump { display: flex; align-items: center; gap: .6rem; text-align: left; border: 0; background: none; font: inherit; padding: .55rem .4rem; border-radius: 10px; cursor: pointer; } .jump.on { background: #EFF4FF; }
.jump .r { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .8rem; background: #F2F4F7; color: var(--muted); }
.jump .r.ok { background: #ECFDF3; color: #067647; } .jump .r.bad { background: #FEF3F2; color: #D92D20; }
@media screen { #view:has(> .rv) { max-width: 1700px; } }

/* [역할] PC 작업 화면의 너비와 줄바꿈
   [하는 일] 현장·점검·설정·사진첩을 가용 폭에 맞추고 긴 이름과 입력칸의 넘침을 막는다.
   [원리] UI 컨테이너에 최소 폭 0과 유동 열을 적용하고 A4 문서 내부는 기존 규칙을 사용한다.
   [이유] PC 브라우저에서 여러 자료를 보면서 작성하는 작업에 맞춘다.
   [관계] main.js 화면 틀, views-home/project/job/album/admin.js. */
@media screen {
  #view > *, .simple > *, .simple-head-row > div, .job-title-row h1,
  .row-main, .site-main, .field, .kv dd, .sheet-body, .filters > * { min-width: 0; }
  .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form :is(input, select, textarea), .filters :is(input, select) { min-width: 0; max-width: 100%; }
  :is(.actions, .row, .head-row, .simple, .sheet-body) > .btn { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .site-main b, .site-main span { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .site-row .btn { flex-shrink: 0; max-width: 45%; }
  .job-title-row h1, .simple-title, .sheet-head h2 { overflow-wrap: anywhere; }
  .sheet-head .icon-btn, .ph-proj .ph-check { flex: none; }
  .kv { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
  .chip { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .ph-proj { flex-wrap: wrap; }
  .ph-proj b { min-width: 0; overflow-wrap: anywhere; }
  .rv-ol span { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
  .rv-group { flex: none; }
  .rv-bar input.rv-page-input { min-height: 34px; height: 34px; padding: .2rem; }
  .rv-save { max-width: 16rem; overflow-wrap: anywhere; }
  .rv-pop { width: min(20rem, calc(100vw - 2rem)); min-width: 0; max-height: min(65dvh, 30rem); overflow-y: auto; }
  .rv-pop .btn { white-space: normal; overflow-wrap: anywhere; }
  .job-bar-in { flex-wrap: wrap; }
  .job-view-toggle { flex: none; }
  /* [역할] 설비 구간 입력 [하는 일] 모든 입력에 읽을 수 있는 열 너비를 준다.
     [원리] 삭제 단추를 입력 열 밖에 배치하고 위치 칸은 첫 줄을 사용한다.
     [이유] 설치연도가 단추용 40px 열에 들어가는 것을 막는다.
     [관계] views-project.js editProject의 secRow. */
  .equip-detail { position: relative; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
  .equip-detail .wide { grid-column: 1 / -1; width: calc(100% - 48px); }
  .equip-detail .icon-btn { position: absolute; right: 0; top: .35rem; grid-column: auto; grid-row: auto; }

}
@media screen and (min-width: 960px) {
  :root[data-view-mode="pc"] { --shell-edge: max(24px, calc((100vw - 1344px) / 2)); --content-left: calc(var(--shell-edge) + 184px); }
  :root[data-view-mode="pc"] body { background: #F5F7FA; font-size: 16px; }
  :root[data-view-mode="pc"] #app > #view { width: auto; max-width: none; margin: 0 var(--shell-edge) 0 var(--content-left); padding: 24px 0 7rem; }
  :root[data-view-mode="pc"] .top { min-height: 64px; padding-inline: var(--shell-edge); gap: 24px; }
  :root[data-view-mode="pc"] .brand { flex-direction: column; align-items: flex-start; gap: 0; }
  :root[data-view-mode="pc"] .release-label { font-size: 15px; }
  :root[data-view-mode="pc"] .brand-sub { font-size: 12px; }
  :root[data-view-mode="pc"] .top-right { min-width: 0; gap: 12px; }
  :root[data-view-mode="pc"] .who { font-size: 14px; overflow-wrap: anywhere; }
  :root[data-view-mode="pc"] .tabs { width: 160px; left: var(--shell-edge); top: calc(var(--app-top-height, 64px) + 24px); max-height: calc(100dvh - var(--app-top-height, 64px) - 48px); overflow-y: auto; border-radius: 16px; padding: 8px; gap: 4px; }
  :root[data-view-mode="pc"] .tabs a { display: flex; align-items: center; justify-content: flex-start; min-height: 48px; gap: 12px; padding: 10px 14px; font-size: 15px; border-radius: 10px; }
  :root[data-view-mode="pc"] #view > .simple { gap: 20px; }
  :root[data-view-mode="pc"] .simple-title { font-size: 24px; }
  :root[data-view-mode="pc"] .site-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border: 0; overflow: visible; }
  :root[data-view-mode="pc"] :is(.site-row, .site-row + .site-row) { border: 1px solid var(--line); border-radius: 14px; align-items: center; padding: 20px; gap: 16px; box-shadow: 0 2px 6px rgba(16,24,40,.03); }
  :root[data-view-mode="pc"] .site-main b { font-size: 17px; }
  :root[data-view-mode="pc"] .site-main span { font-size: 14px; margin-top: 4px; }
  :root[data-view-mode="pc"] .site-list > .simple-empty { grid-column: 1 / -1; }
  :root[data-view-mode="pc"] .simple .simple-add { justify-self: start; width: auto; min-width: 160px; }
  :root[data-view-mode="pc"] .simple-search { max-width: 560px; }
  :root[data-view-mode="pc"] .simple > .kind-big { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 960px; }
  :root[data-view-mode="pc"] .proj-simple { grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); align-items: start; }
  :root[data-view-mode="pc"] .proj-simple > * { grid-column: 1 / -1; }
  :root[data-view-mode="pc"] .proj-simple > .project-history { grid-column: 1; }
  :root[data-view-mode="pc"] .proj-simple > .project-info { grid-column: 2; }
  :root[data-view-mode="pc"] .proj-simple > .btn.big { width: auto; justify-self: start; min-width: 200px; }
  :root[data-view-mode="pc"] :is(.simple-nav, .simple-more) { background: #fff; }
  :root[data-view-mode="pc"] .chips { flex-wrap: wrap; overflow: visible; }
  :root[data-view-mode="pc"] .filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); max-width: 960px; }
  :root[data-view-mode="pc"] .album-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  :root[data-view-mode="pc"] .sheet { width: min(720px, calc(100vw - 4rem)); max-height: calc(100dvh - 3rem); }
  :root[data-view-mode="pc"] .sheet.wide { width: min(1040px, calc(100vw - 4rem)); }
  :root[data-view-mode="pc"] .sheet:has(.menu-list) { width: min(520px, calc(100vw - 4rem)); }
  :root[data-view-mode="pc"] .sheet-body { padding: 16px 24px 24px; }
  :root[data-view-mode="pc"] .sheet-head { padding-inline: 24px; }
  :root[data-view-mode="pc"] :is(input[type=text], input[type=password], input[type=number], input[type=date], input[type=search], select) { min-height: 44px; }
  :root[data-view-mode="pc"] .btn { min-height: 44px; }
  :root[data-view-mode="pc"] .btn.big { min-height: 48px; font-size: 16px; }
  :root[data-view-mode="pc"] .job:not(.wiz) .equip-body { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
  :root[data-view-mode="pc"] .job:not(.wiz) .equip-body > :not(.item) { grid-column: 1 / -1; }
  :root[data-view-mode="pc"] .job.wiz { max-width: 760px; margin-inline: auto; }
  :root[data-view-mode="pc"] .job-bar { left: var(--content-left); right: var(--shell-edge); padding: 0; }
  :root[data-view-mode="pc"] .job-bar-in { max-width: none; }
  :root[data-view-mode="pc"] .job-title-row h1 { flex: 1; }
  :root[data-view-mode="pc"] .job.wiz .job-bar-in { max-width: 760px; }
  :root[data-view-mode="pc"] #view:has(> .job) { padding-bottom: 8rem; }
  :root[data-view-mode="pc"] #app > #view:has(> .rv) { padding-block: 20px; }
  :root[data-view-mode="pc"] .rv { height: calc(100dvh - var(--app-top-height, 64px) - 40px); min-height: 26rem; }
  :root[data-view-mode="pc"] :is(.rv > .stack-s, .rv-bar, .rv-foot) { flex: none; }
  :root[data-view-mode="pc"] .rv-outline { width: 248px; }
  :root[data-view-mode="pc"] .rv-bar { gap: 6px; padding: 8px; }
  :root[data-view-mode="pc"] .rv-bar .btn.small { min-height: 36px; }
  :root[data-view-mode="pc"] .rv-bar input.rv-page-input { min-height: 34px; }
  :root[data-view-mode="pc"] .rv-ol { font-size: 14px; line-height: 1.5; }
  :root[data-view-mode="pc"] .pick-bar { bottom: 1rem; }
}
@media screen and (min-width: 960px) and (max-width: 1199px) {
  :root[data-view-mode="pc"] { --shell-edge: 20px; --content-left: 164px; }
  :root[data-view-mode="pc"] .tabs { width: 124px; }
  :root[data-view-mode="pc"] .tabs a { gap: 8px; padding-inline: 10px; }
  :root[data-view-mode="pc"] .rv-outline { width: 220px; }
  :root[data-view-mode="pc"] .job:not(.wiz) .equip-body { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 959px) {
  .grid3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
}
@media screen and (max-width: 420px) {
  .form .grid2 { grid-template-columns: minmax(0, 1fr); }
}

/* [역할] PC/모바일 보기 선택과 모바일 열의 경계.
   [하는 일] 선택을 상단에 표시하고 넓은 모니터의 모바일 보기는 한 열로 유지한다.
   [원리] 화면 너비와 별개인 data-view-mode 속성으로 화면 틀을 선택한다.
   [이유] 같은 PC에서도 편한 보기로 전환하고 과도한 가로 확장을 막는다.
   [관계] view-mode.js, main.js. 인쇄 A4 규칙에는 적용하지 않는다. */
@media screen {
  .view-mode { display: flex; flex: none; padding: 3px; gap: 2px; border: 1px solid #D8DFE9; border-radius: 10px; background: #F1F4F8; }
  .view-mode button { border: 0; background: transparent; border-radius: 7px; padding: 6px 10px; min-height: 34px; font-size: 13px; font-weight: 650; white-space: nowrap; cursor: pointer; color: #586579; }
  .view-mode button[aria-pressed="true"] { color: #194FC6; background: #fff; box-shadow: 0 1px 4px #182B4D20; }
  :root[data-view-mode="mobile"] #app { max-width: 640px; margin-inline: auto; min-height: 100dvh; background: #fff; }
  :root[data-view-mode="mobile"] #app > #view { width: 100%; max-width: 640px; margin: 0 auto; padding: 1rem 1rem calc(6.5rem + env(safe-area-inset-bottom)); }
  :root[data-view-mode="mobile"] .top { flex-wrap: wrap; min-height: 0; gap: 8px; }
  :root[data-view-mode="mobile"] .brand-sub { display: none; }
  :root[data-view-mode="mobile"] .top-right { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
  :root[data-view-mode="mobile"] .tabs { left: 50%; top: auto; bottom: calc(.6rem + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 24px), 520px); max-height: none; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  :root[data-view-mode="mobile"] .tabs a { min-height: 44px; font-size: .68rem; padding: .42rem 0 .34rem; }
  :root[data-view-mode="mobile"] .job-bar { left: 50%; right: auto; transform: translateX(-50%); width: min(100%, 640px); bottom: calc(4.6rem + env(safe-area-inset-bottom)); padding: 0 .6rem; }
  :root[data-view-mode="mobile"] .sheet-wrap { align-items: flex-end; }
  :root[data-view-mode="mobile"] .sheet { width: min(100%, 640px); border-radius: 22px 22px 0 0; }
  :root[data-view-mode="mobile"] .rv { height: calc(100dvh - var(--app-top-height, 64px) - 7.5rem); min-height: 26rem; }
  :root[data-view-mode="mobile"] .rv-outline { position: absolute; inset: 0 auto 0 0; z-index: 15; width: min(82%, 300px); box-shadow: 14px 0 30px rgba(15,30,60,.25); display: none; }
  :root[data-view-mode="mobile"] .rv-outline-open .rv-outline { display: block; }
  :root[data-view-mode="mobile"] .rv-pages { padding: 8px; }
  :root[data-view-mode="mobile"] :is(.rv-save, .rv-space, .rv-foot) { display: none; }
  :root[data-view-mode="mobile"] .rv-bar { gap: .3rem; padding: .35rem .4rem; }
  :root[data-view-mode="mobile"] .rv-bar .btn.small { padding: .32rem .5rem; }
  :root[data-view-mode="mobile"] .rv-zoom-label { min-width: 2.7rem; }
  :root[data-view-mode="mobile"] .rv-page-input { width: 2.5rem !important; }
  :root[data-view-mode="mobile"] .grid3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
}
@media screen and (min-width: 960px) {
  :root[data-view-mode="mobile"] body { background: #F5F7FA; }
}
@media screen and (max-width: 600px) {
  .top { flex-wrap: wrap; }
  .top-right { flex-wrap: wrap; justify-content: flex-end; }
  .view-mode button { padding-inline: 9px; }
}

/* ── AI 측정값 판독 안내 화면 (views-ai.js, 공모전용) ─────────────────────────── */
.ai-entry { display: flex; align-items: center; gap: 14px; margin: 6px 0 2px; padding: 14px 16px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: linear-gradient(135deg, #F3F6FF 0%, #F7F2FF 100%); border: 1px solid #D9E1FF; box-shadow: 0 1px 0 #fff inset, 0 8px 22px -14px rgba(47,82,224,.55); transition: transform .15s, box-shadow .15s; }
.ai-entry:hover { transform: translateY(-1px); box-shadow: 0 1px 0 #fff inset, 0 14px 28px -14px rgba(47,82,224,.6); }
.ai-entry > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.ai-entry small { color: var(--muted); font-size: .84rem; }
.ai-entry-go { font-size: 1.6rem; color: #6B7CFF; line-height: 1; }
.ai-badge { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 12px; font-weight: 900; font-size: .95rem; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, #2F6BFF, #8B5CF6); box-shadow: 0 6px 14px -6px rgba(91,92,246,.8), inset 0 1px 0 rgba(255,255,255,.35); }
.ai-page { gap: 18px; }
.ai-hero { position: relative; padding: 22px 20px; border-radius: 20px; color: #fff; overflow: hidden;
  background: radial-gradient(120% 140% at 100% 0%, #8B5CF6 0%, #2F6BFF 45%, #1636A8 100%); box-shadow: 0 18px 40px -22px rgba(31,64,200,.9); }
.ai-hero::after { content: ''; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.ai-hero .ai-badge { background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.ai-hero h1 { color: #fff; margin: 10px 0 4px; font-size: 1.7rem; }
.ai-lead { opacity: .92; font-size: 1.05rem; }
.ai-facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 16px; }
.ai-facts > div { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); display: flex; flex-direction: column; gap: 2px; }
.ai-facts span { font-size: .84rem; opacity: .88; }
.ai-how ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ai-how li { counter-increment: s; padding: 12px 12px 12px 46px; position: relative; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.ai-how li::before { content: counter(s); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: var(--blue); }
.ai-how li span { font-size: .86rem; color: var(--muted); }
.ai-sum { font-size: 1.02rem; }
.ai-meter { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--mc); padding: 16px; box-shadow: 0 1px 0 #fff inset, 0 10px 26px -18px rgba(18,33,58,.45); }
.ai-meter-head { display: flex; align-items: flex-start; gap: 12px; }
.ai-meter-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--mc) 75%, #fff), var(--mc)); box-shadow: 0 8px 16px -8px var(--mc), inset 0 1px 0 rgba(255,255,255,.4); }
.ai-meter-title { flex: 1; } .ai-meter-title h2 { margin: 0 0 2px; } .ai-meter-title p { color: var(--muted); font-size: .9rem; }
.ai-level { flex: 0 0 auto; font-size: .8rem; font-weight: 800; border-radius: 999px; padding: 3px 10px; }
.ai-level.ok { background: #E3F6EA; color: #11733F; } .ai-level.beta { background: #FFF1D6; color: #8A5A00; }
.ai-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.ai-stats > div { padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--mc) 7%, #fff); display: flex; flex-direction: column; gap: 2px; text-align: center; }
.ai-stats b { font-size: 1.15rem; color: color-mix(in srgb, var(--mc) 80%, #000); } .ai-stats b.ai-acc { font-size: .9rem; }
.ai-stats span { font-size: .78rem; color: var(--muted); }
@media (max-width: 560px) { .ai-stats { grid-template-columns: repeat(2, 1fr); } }
.ai-meter h3 { margin: 16px 0 8px; font-size: .9rem; color: var(--muted); }
.ai-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ai-item { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #FCFDFE; }
.ai-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.ai-unit { font-size: .8rem; font-weight: 800; color: var(--mc, var(--blue)); background: color-mix(in srgb, var(--mc, #2563EB) 10%, #fff); border-radius: 6px; padding: 0 7px; }
.ai-kind { margin-left: auto; font-size: .78rem; color: var(--muted); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ai-chip { font-size: .78rem; padding: 2px 9px; border-radius: 999px; background: #EEF1F6; color: #3F4B63; }
.ai-chip.all { background: color-mix(in srgb, var(--mc, #2563EB) 14%, #fff); color: color-mix(in srgb, var(--mc, #2563EB) 85%, #000); font-weight: 700; }
.ai-more summary { cursor: pointer; font-size: .78rem; color: var(--blue); margin-top: 4px; }
.ai-models { list-style: none; margin: 0; padding: 0; }
.ai-models li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 2px; border-bottom: 1px solid #EEF1F5; }
.ai-models li:last-child { border-bottom: 0; }
.ai-model-name { flex: 1 1 15em; } .ai-model-name small { color: var(--muted); font-weight: 700; }
.ai-disp { font-size: .8rem; color: var(--muted); }
.ai-models em { font-style: normal; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 1px 9px; background: #EEF3FF; color: #1E5BD8; }
.ai-models em.st-sample { background: #E5F6EA; color: #1B7A3A; } .ai-models em.st-screen { background: #E8F2FF; color: #1E5BD8; }
.ai-models em.st-limited { background: #FFF4D6; color: #8A5A00; } .ai-models em.st-no { background: #F1F1F3; color: #777; }
.ai-direct { padding: 16px; border-radius: 18px; border: 1px dashed #C9D2E0; background: #FAFBFD; }
.ai-direct .hint { margin-bottom: 10px; }
