/* 현장 관리 — 정보통신 광케이블 색상 코드(TIA-598)를 상태·분류 색으로 사용 */
:root {
  --concrete: #e8eae7;
  --panel: #ffffff;
  --line: #d3d7d4;
  --ink: #1d2a33;
  --ink-2: #4b5961;
  --ink-3: #7b878d;
  --rail: #1d2a33;
  --rail-ink: #c9d3d8;
  --blue: #1f6fb2;     /* 1번 청 — 기본 동작 */
  --orange: #e07b1a;   /* 2번 등 — 변경·주의 */
  --green: #2e8b57;    /* 3번 녹 — 완료·합격 */
  --brown: #8a5a3b;    /* 4번 갈 — 자재 */
  --slate: #6b7780;    /* 5번 회 — 보류 */
  --red: #c4372f;      /* 8번 적 — 불합격·초과 */
  --violet: #6a4c9c;   /* 11번 자 */
  --blue-soft: #e3eef8; --orange-soft: #fbeedd; --green-soft: #e1f1e7; --red-soft: #f8e1df; --brown-soft: #f1e7df; --slate-soft: #e9ecee;
  --r: 6px;
  --font: 'IBM Plex Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.55 var(--font); color: var(--ink); background: var(--concrete); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.125rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 0.8125rem; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- 레이아웃 ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.rail { background: var(--rail); color: var(--rail-ink); padding: 20px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.rail .site { padding: 4px 10px 18px; border-bottom: 1px solid #2f3e48; margin-bottom: 10px; }
.rail .site b { display: block; color: #fff; font-size: 1.0625rem; line-height: 1.35; }
.rail .site span { font-size: 0.8125rem; color: #8fa0a9; }
.rail a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r); color: var(--rail-ink); text-decoration: none; font-weight: 500; }
.rail a.nav:hover { background: #26363f; }
.rail a.nav.on { background: #2b3f4b; color: #fff; box-shadow: inset 3px 0 0 var(--blue); }
.rail a.nav .badge { margin-left: auto; }
.rail .me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid #2f3e48; font-size: 0.875rem; }
.rail .me b { color: #fff; }
.rail .me button { background: none; border: 0; color: #8fa0a9; padding: 4px 0; cursor: pointer; text-decoration: underline; margin-right: 12px; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { padding: 24px 32px 80px; min-width: 0; max-width: 1400px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { margin-right: auto; }
.bell { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.bell .dot { position: absolute; top: -6px; right: -6px; }

.tabbar { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  main { padding: 16px 16px 96px; }
  .tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; bottom: 0; left: 0; right: 0; background: var(--rail); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { color: var(--rail-ink); text-decoration: none; font-size: 0.6875rem; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; position: relative; }
  .tabbar a.on { color: #fff; box-shadow: inset 0 3px 0 var(--blue); }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 2px; right: 18%; }
  h1 { font-size: 1.25rem; }
}

/* ---------- 공통 컴포넌트 ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.panel > header h2 { margin-right: auto; font-size: 1rem; }
.panel > .body { padding: 0 16px 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .g2, .g3 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 8px 14px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--ink); white-space: nowrap; min-height: 38px; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #185d96; }
.btn.warn { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 0.8125rem; }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 0; font-weight: 500; }

.badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 0.6875rem; font-weight: 700; line-height: 18px; text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; background: var(--slate-soft); color: var(--ink-2); white-space: nowrap; }
.chip.blue { background: var(--blue-soft); color: #18578c; }
.chip.orange { background: var(--orange-soft); color: #9a520e; }
.chip.green { background: var(--green-soft); color: #22683f; }
.chip.red { background: var(--red-soft); color: #9c2a23; }
.chip.brown { background: var(--brown-soft); color: #6c452c; }
.tag { display: inline-block; font-size: 0.75rem; color: var(--ink-2); background: var(--concrete); padding: 0 6px; border-radius: 3px; margin: 2px 2px 0 0; cursor: pointer; border: 0; }
.tag:hover { background: var(--blue-soft); }

label.f { display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=number], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; background: #fff; min-height: 38px; width: 100%; font-size: 0.9375rem; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.check { display: flex; align-items: center; gap: 6px; font-size: 0.875rem; }
.form { display: grid; gap: 12px; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 180px; }

table.t { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 0.8125rem; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f6f7f6; white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid #eceeec; vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #f6f8fa; }
table.t td.r, table.t th.r { text-align: right; }
.scroll-x { overflow-x: auto; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid #eceeec; }
.list li:first-child { border-top: 0; }
.list .when { flex: none; width: 74px; color: var(--ink-3); font-size: 0.8125rem; }
.empty { color: var(--ink-3); padding: 18px 0; font-size: 0.875rem; }

/* 공사기간 막대 — 케이블 포설 진행 */
.run { padding: 18px 20px 16px; margin-bottom: 16px; }
.run-top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.run-top .title { margin-right: auto; }
.run-top .title h1 { font-size: 1.625rem; }
.run-top .dday { font-size: 2.25rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.run-top .dday small { font-size: 0.875rem; font-weight: 500; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.cable { position: relative; height: 14px; border-radius: 7px; background: repeating-linear-gradient(90deg, #dfe3e1 0 calc(100% / var(--months) - 2px), #c6ccc9 calc(100% / var(--months) - 2px) calc(100% / var(--months))); }
.cable .done { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: linear-gradient(90deg, var(--blue), #2a86cf); }
.cable .now { position: absolute; top: -6px; width: 4px; height: 26px; background: var(--orange); border-radius: 2px; transform: translateX(-2px); }
.cable-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; font-size: 0.75rem; color: var(--ink-3); margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); margin: 16px -20px -16px; }
.stats a { padding: 12px 20px; border-left: 1px solid var(--line); text-decoration: none; color: inherit; }
.stats a:first-child { border-left: 0; }
.stats a:hover { background: #f6f8fa; }
.stats b { display: block; font-size: 1.375rem; font-variant-numeric: tabular-nums; }
.stats span { font-size: 0.8125rem; color: var(--ink-3); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } .stats a:nth-child(3) { border-left: 0; } .stats a:nth-child(n+3) { border-top: 1px solid var(--line); } }

.bar { height: 8px; background: var(--concrete); border-radius: 4px; overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; background: var(--brown); }
.bar.hi > i { background: var(--orange); }
.bar.over > i { background: var(--red); }

/* 캘린더 */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { padding: 6px 8px; font-size: 0.75rem; font-weight: 600; color: var(--ink-3); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f6f7f6; }
.cal .day { min-height: 108px; padding: 4px 4px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; overflow: hidden; }
.cal .day.out { background: #f4f5f4; }
.cal .day.out .d { color: var(--ink-3); }
.cal .day .d { font-size: 0.8125rem; font-weight: 600; padding: 2px 4px; display: inline-block; }
.cal .day.today .d { background: var(--orange); color: #fff; border-radius: 4px; }
.cal .day.sun .d { color: var(--red); } .cal .day.sat .d { color: var(--blue); }
.cal .day.today.sun .d, .cal .day.today.sat .d { color: #fff; }
.ev { display: block; font-size: 0.75rem; line-height: 1.35; padding: 1px 5px; margin-top: 2px; border-radius: 3px; border-left: 3px solid var(--slate); background: var(--slate-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.c-공정 { border-color: var(--blue); background: var(--blue-soft); }
.ev.c-검측 { border-color: var(--green); background: var(--green-soft); }
.ev.c-회의 { border-color: var(--violet); background: #ece6f5; }
.ev.c-자재반입 { border-color: var(--brown); background: var(--brown-soft); }
.ev.c-안전 { border-color: var(--red); background: var(--red-soft); }
.ev.c-설계변경 { border-color: var(--orange); background: var(--orange-soft); }
@media (max-width: 700px) { .cal .day { min-height: 64px; } .cal .ev { font-size: 0; height: 6px; padding: 0; } }

/* 사진 */
.photo-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .photo-layout { grid-template-columns: 1fr; } .tree { display: none; } .tree.open { display: block; } }
.tree { padding: 12px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.tree h3 { font-size: 0.8125rem; color: var(--ink-3); margin: 12px 4px 4px; font-weight: 600; }
.tree h3:first-child { margin-top: 0; }
.tree button { display: flex; width: 100%; justify-content: space-between; gap: 8px; border: 0; background: none; text-align: left; padding: 5px 6px; border-radius: 4px; cursor: pointer; font-size: 0.875rem; }
.tree button:hover { background: var(--concrete); }
.tree button.on { background: var(--blue-soft); color: #18578c; font-weight: 600; }
.tree button span:last-child { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.ph { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; }
.ph img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #dde1df; }
.ph .cap { padding: 6px 8px 8px; font-size: 0.75rem; line-height: 1.4; }
.ph .cap b { font-weight: 600; font-size: 0.8125rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph .st { position: absolute; top: 6px; left: 6px; }
.ph .sel { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; accent-color: var(--blue); }
.ph.picked { outline: 3px solid var(--blue); outline-offset: -3px; }
.day-head { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; }
.day-head:first-child { margin-top: 0; }
.drop { border: 2px dashed var(--line); border-radius: var(--r); padding: 22px; text-align: center; background: #fafbfa; cursor: pointer; }
.drop.over { border-color: var(--blue); background: var(--blue-soft); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.previews figure { margin: 0; font-size: 0.6875rem; }
.previews img { aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
.previews select { min-height: 28px; padding: 2px 4px; font-size: 0.75rem; margin-top: 3px; }

/* 모달 */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 30, 36, .55); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.modal.wide { max-width: 1000px; }
.modal > header { display: flex; align-items: center; padding: 16px 18px 8px; gap: 10px; }
.modal > header h2 { margin-right: auto; }
.modal > header .x { border: 0; background: none; font-size: 1.5rem; cursor: pointer; line-height: 1; color: var(--ink-3); padding: 4px 8px; }
.modal > .body { padding: 8px 18px 18px; }
.viewer { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.viewer img { width: 100%; max-height: 72vh; object-fit: contain; background: #111c22; border-radius: 4px; }
@media (max-width: 800px) { .viewer { grid-template-columns: 1fr; } }
dl.kv { display: grid; grid-template-columns: 76px 1fr; gap: 6px 10px; margin: 0; font-size: 0.875rem; }
dl.kv dt { color: var(--ink-3); }
dl.kv dd { margin: 0; }

/* 도면 */
.dwg-row.changed td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.dwg-view iframe, .dwg-view img { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 4px; background: #fff; object-fit: contain; }
.alert { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--orange-soft); border: 1px solid #f0c99e; margin-bottom: 14px; flex-wrap: wrap; }
.alert.blue { background: var(--blue-soft); border-color: #b8d3ea; }
.alert p { margin: 0; flex: 1; min-width: 200px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 14px 16px; position: relative; font-size: 0.875rem; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--slate); }
.timeline li.cur::before { background: var(--orange); }

/* 검측 맵 */
.map-wrap { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; user-select: none; }
.map-wrap img { width: 100%; }
.map-wrap.placing { cursor: crosshair; outline: 3px solid var(--orange); }
.pin { position: absolute; transform: translate(-50%, -100%); width: 26px; height: 26px; border: 0; padding: 0; cursor: pointer; background: none; }
.pin svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.pin .lbl { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); background: rgba(29,42,51,.9); color: #fff; font-size: 0.6875rem; padding: 1px 6px; border-radius: 3px; white-space: nowrap; display: none; }
.pin:hover .lbl, .pin:focus .lbl { display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8125rem; color: var(--ink-2); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 14px; cursor: pointer; font-weight: 500; border-left: 1px solid var(--line); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: #fff; }

/* 인증 화면 */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth .side { background: var(--rail); color: #c9d3d8; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .side h1 { color: #fff; font-size: 2rem; max-width: 12em; }
.auth .side p { max-width: 30em; }
.auth .side .fibers { position: absolute; left: 0; right: 0; bottom: 120px; height: 120px; }
.auth .form-side { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.auth .box { width: 100%; max-width: 400px; }
.auth .box h2 { font-size: 1.375rem; margin-bottom: 4px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .side { padding: 28px 20px; min-height: 0; } .auth .side .fibers { display: none; } .auth .side h1 { font-size: 1.5rem; } }

/* 알림 패널 */
.npanel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; z-index: 90; box-shadow: -10px 0 30px rgba(0,0,0,.15); display: flex; flex-direction: column; }
.npanel header { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); gap: 10px; }
.npanel header h2 { margin-right: auto; }
.npanel ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.npanel li { padding: 12px 16px; border-bottom: 1px solid #eceeec; cursor: pointer; font-size: 0.875rem; }
.npanel li.unread { background: #f3f8fc; box-shadow: inset 3px 0 0 var(--blue); }
.npanel li.unread.warn { background: #fdf6ee; box-shadow: inset 3px 0 0 var(--orange); }
.npanel li time { display: block; font-size: 0.75rem; color: var(--ink-3); margin-top: 2px; }

#toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--r); font-size: 0.875rem; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; }
#toast.show { opacity: 1; }
#toast.err { background: var(--red); }

.archived-banner { background: var(--slate); color: #fff; padding: 8px 14px; border-radius: var(--r); margin-bottom: 14px; font-size: 0.875rem; }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.ok { color: var(--green); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .rail, .tabbar, .topbar .bell, .toolbar, .btn { display: none !important; } .shell { display: block; } main { padding: 0; } }

@media (max-width: 560px) { .cable-legend .mid { order: 3; width: 100%; } .topbar h1:empty { display: none; } }
.topbar h1:empty + .actions:empty { margin-left: auto; }

/* 사진 업로드 진행 표시 */
.previews .pv { position: relative; display: block; }
.previews .pv b { position: absolute; inset: auto 0 0 0; font-size: 0.6875rem; text-align: center; background: rgba(29,42,51,.75); color: #fff; padding: 2px 0; border-radius: 0 0 4px 4px; }
.previews .st-done .pv b { background: rgba(46,139,87,.9); }
.previews .st-fail .pv b { background: rgba(196,55,47,.9); }
.previews .st-done img { opacity: .6; }
.upbar { height: 6px; background: var(--concrete); border-radius: 3px; overflow: hidden; }
.upbar i { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }

/* 사진 크게 보기 */
.zoomable { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoomable span { position: absolute; right: 8px; bottom: 8px; background: rgba(17,28,34,.75); color: #fff; font-size: .75rem; padding: 3px 8px; border-radius: 4px; }
.lb { position: fixed; inset: 0; z-index: 300; background: #0d1418; color: #fff; display: flex; flex-direction: column; touch-action: none; }
.lb-top { display: flex; align-items: center; gap: 6px; padding: 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); background: rgba(13,20,24,.9); z-index: 2; }
.lb-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-cnt { font-size: .8125rem; color: #9fb0b8; margin-right: 4px; }
.lb-btn { min-width: 40px; height: 38px; border: 1px solid #33464f; background: #1b2830; color: #fff; border-radius: 6px; font: inherit; font-size: .875rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; text-decoration: none; }
.lb-x { font-size: 1.1rem; }
.lb-stage { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.lb.zoomed .lb-stage { cursor: grab; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 72px; border: 0; background: rgba(13,20,24,.55); color: #fff; font-size: 2.2rem; cursor: pointer; z-index: 2; }
.lb-prev { left: 0; border-radius: 0 8px 8px 0; } .lb-next { right: 0; border-radius: 8px 0 0 8px; }
.lb.zoomed .lb-nav { opacity: .25; }
.lb-hint { position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(13,20,24,.8); color: #c9d3d8; font-size: .75rem; padding: 5px 12px; border-radius: 14px; white-space: nowrap; transition: opacity .6s; pointer-events: none; }
.lb-hint.fade { opacity: 0; }
@media (max-width: 600px) { .lb-btn[data-z] { display: none; } .lb-nav { width: 36px; height: 60px; font-size: 1.8rem; } }
.viewer img { cursor: zoom-in; }
