/* 현장 설정 화면 (siteConfig.js) — style.css 의 뉴모피즘 토큰을 그대로 씀.
   움직임: 들어올 때 옆에서 밀려옴 + 카드 차례로 떠오름, 값 따라 그림이 튕기며 움직임, 저장 줄은 바꾼 게 있을 때만 아래에서 올라옴 */
:root { --spring: cubic-bezier(0.34, 1.56, 0.64, 1); --ease: cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes cfg-slide-in { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes cfg-rise { from { opacity: 0; transform: translateY(16px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes cfg-bump { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes cfg-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes cfg-ok-ring { 0% { box-shadow: var(--inset), 0 0 0 0 rgba(22, 163, 74, 0.55); } 100% { box-shadow: var(--inset), 0 0 0 16px rgba(22, 163, 74, 0); } }
@keyframes cfg-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }
@keyframes cfg-grow-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes cfg-seg-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#site-config.enter { animation: cfg-slide-in 0.38s var(--ease); }
#site-config.enter .cfg-sec { animation: cfg-rise 0.5s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 60ms); }
#site-config.has-bar { padding-bottom: 110px; }

/* 머리 */
.ctl-row .btn.cfg-open { text-decoration: none; }
.cfg-ver { margin-left: 0; }
.cfg-sync { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cfg-state { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; box-shadow: var(--inset); font-weight: 800; white-space: nowrap; transition: color 0.25s ease; }
.cfg-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.cfg-state.ok { color: var(--c-rear); }
.cfg-state.edit, .cfg-state.wait { color: var(--on); }
.cfg-state.bad { color: var(--bad); }
.cfg-state.none { color: var(--muted); }
.cfg-state.wait::before { animation: cfg-pulse 1s ease-in-out infinite; }
.cfg-state.bump { animation: cfg-bump 0.32s var(--spring); }
.cfg-when { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cfg-banner { margin: 0 0 22px; padding: 14px 22px; border-radius: 16px; box-shadow: var(--inset); color: var(--bad); font-weight: 600; animation: cfg-grow-in 0.35s var(--ease); }
.cfg-banner.info { color: var(--on); }

/* 카드 */
/* 두 개씩 한 줄 — 같은 줄 카드는 높이를 같게(stretch), 황화수소 기준(wide)은 한 줄 가득 */
.cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-items: stretch; }
.cfg-sec { min-width: 0; padding: 24px 28px 18px; }
.cfg-sec.wide { grid-column: 1 / -1; }
/* 가로 가득 카드: 게이지 왼쪽, 켜짐·꺼짐 값 오른쪽 */
@media (min-width: 1101px) {
  .cfg-sec.wide .cfg-pad { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 48px; align-items: center; }
  .cfg-sec.wide .viz { grid-row: 1 / span 2; margin-bottom: 0; }
}
.cfg-sec h3 { margin: 0 0 16px; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.cfg-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.cfg-sum, .cfg-caret { display: none; } /* 폰에서만 (접힌 카드 요약) */
.cfg-pad > .cfg-row:first-child { border-top: 0; }
.cfg-scope { color: var(--muted); font-size: 12px; font-weight: 600; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.viz + .cfg-row, h3 + .cfg-row { border-top: 0; }
.cfg-label { display: flex; flex-direction: column; min-width: 0; }
.cfg-label b { font-weight: 700; }
.cfg-label small { color: var(--muted); font-size: 12px; }
.cfg-field { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.cfg-was { max-height: 0; overflow: hidden; color: var(--on); font-size: 11px; font-weight: 600; opacity: 0; transition: max-height 0.25s var(--ease), opacity 0.2s ease; }
.cfg-row.changed .cfg-was { max-height: 18px; opacity: 1; }
.cfg-row.invalid .cfg-was { max-height: 18px; opacity: 1; color: var(--bad); }

/* 숫자칸 — [−] 값 [+] 단위 */
.cfg-num { display: flex; align-items: center; gap: 6px; }
.cfg-num input { width: 92px; padding: 9px 10px; text-align: center; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; outline: 2px solid transparent; outline-offset: 2px; transition: color 0.2s ease, outline-color 0.2s ease; }
.cfg-num input.short { width: 64px; }
.cfg-num.dt input.date { width: 128px; }
.cfg-num .unit { min-width: 26px; color: var(--muted); font-size: 13px; font-weight: 600; }
.cfg-step { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); font: inherit; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: var(--raised-sm); transition: box-shadow 0.12s ease, color 0.12s ease, transform 0.12s ease; }
.cfg-step:hover { color: var(--on); }
.cfg-step:active { box-shadow: var(--inset); transform: scale(0.92); }
.cfg-row.changed .cfg-num input { outline-color: var(--on); color: var(--on); }
.cfg-row.invalid .cfg-num input { outline-color: var(--bad); color: var(--bad); }
.cfg-shake { animation: cfg-shake 0.42s ease; }
.cfg-flash { animation: cfg-ok-ring 0.9s ease-out; }
#site-config input:disabled, .cfg-step:disabled, .cfg-hour:disabled { color: var(--faint); cursor: default; }
.cfg-step:disabled { box-shadow: var(--inset); }
.cfg-row label.switch, .cfg-range label.switch { display: inline-flex; align-items: center; cursor: pointer; }
.switch input:disabled + .track { opacity: 0.45; }

/* 그림 칸 (눌린 홈) */
.viz { margin-bottom: 6px; padding: 16px 18px 12px; border-radius: 16px; box-shadow: var(--inset); }
.viz-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

/* 황화수소 게이지 */
.gauge { --off: 20%; --on: 25%; --now: 45%; }
.g-track { position: relative; height: 14px; margin-top: 30px; border-radius: 999px; background: var(--line); }
.g-band, .g-hot { position: absolute; top: 0; bottom: 0; transition: left 0.5s var(--spring), width 0.5s var(--spring); }
.g-band { left: var(--off); width: calc(var(--on) - var(--off)); background: repeating-linear-gradient(45deg, rgba(234, 88, 12, 0.35) 0 4px, rgba(234, 88, 12, 0.12) 4px 8px); }
.g-hot { left: var(--on); width: calc(100% - var(--on)); border-radius: 0 999px 999px 0; background: linear-gradient(90deg, rgba(234, 88, 12, 0.55), var(--c-h2s)); }
.g-mark { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--text); transition: left 0.5s var(--spring); }
.g-mark.off, .g-mark.on { background: var(--bg); box-shadow: 0 0 0 1.5px var(--muted); }
.g-mark.off { left: var(--off); }
.g-mark.on { left: var(--on); }
.g-mark.now { left: var(--now); }
.g-mark.now span { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 8px; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g-labels { position: relative; height: 18px; margin-top: 8px; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.g-labels span { position: absolute; white-space: nowrap; transition: left 0.5s var(--spring); }
.g-labels .off { left: var(--off); color: var(--muted); transform: translateX(-100%); padding-right: 4px; }
.g-labels .on { left: var(--on); color: var(--c-h2s); padding-left: 4px; }

/* 수동모드 하루 막대 + 시간대 줄 */
.tl-bar { position: relative; height: 24px; border-radius: 8px; background: var(--line); overflow: hidden; }
/* 1시간마다 칸 나눔 선 */
.tl-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 24 - 1px), var(--bg) calc(100% / 24 - 1px) calc(100% / 24)); pointer-events: none; }
.tl-seg { position: absolute; top: 0; bottom: 0; background: var(--on); transform-origin: left; transition: left 0.45s var(--spring), width 0.45s var(--spring), opacity 0.25s ease; }
.tl-seg { z-index: 1; }
.tl-seg.off { z-index: 0; opacity: 0.18; } /* 꺼진 시간대는 켜진 막대 아래로 */
.tl-bar::after { z-index: 2; }
/* 막대 위 시간대 시작·끝 시각 (자리는 siteConfig.js 가 px 로) */
.tl-times { position: relative; height: 16px; margin-bottom: 4px; color: var(--on); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tl-times b { position: absolute; top: 0; white-space: nowrap; }
.tl-seg.new { animation: cfg-seg-in 0.4s var(--ease); }
.tl-scale { position: relative; height: 14px; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-scale span { position: absolute; top: 0; left: calc(var(--h) / 24 * 100%); transform: translateX(-50%); white-space: nowrap; }
.tl-scale span:first-child { transform: none; }
.tl-scale span:last-child { transform: translateX(-100%); }
.tl-scale .minor { color: var(--faint); }
.cfg-ranges { display: flex; flex-direction: column; gap: 10px; padding: 12px 0 14px; }
/* PC: 시간대가 많아도 카드가 안 늘어나게 3줄 반 높이까지만, 넘치면 안에서 스크롤 (반 줄이 보여서 더 있는 걸 앎)
   좌우 여백 8px — 스크롤 칸이 칸 그림자·고친 칸 테두리를 자르지 않게 */
@media (min-width: 861px) {
  .cfg-ranges { max-height: 190px; margin: 0 -8px; padding: 12px 8px 14px; overflow-y: auto; overscroll-behavior: contain; }
}
.cfg-range { display: flex; align-items: center; gap: 10px; animation: cfg-grow-in 0.3s var(--ease); }
.cfg-range .no { width: 18px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.cfg-range input[inputmode] { width: 80px; padding: 9px 8px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; outline: 2px solid transparent; outline-offset: 2px; transition: color 0.2s ease, outline-color 0.2s ease; }
.cfg-range .sep { color: var(--muted); }
.cfg-range .dur { min-width: 92px; color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.cfg-range .dur b { color: var(--on); }
.cfg-range .btn.mini { margin-left: auto; }
.cfg-range.off input[inputmode], .cfg-range.off .dur { color: var(--faint); }
.cfg-range input.changed { outline-color: var(--on); color: var(--on); }
.cfg-range input.bad { outline-color: var(--bad); color: var(--bad); }
.cfg-range.leaving { opacity: 0; transform: translateX(16px); transition: opacity 0.22s ease, transform 0.22s ease; }

/* 강제운전 시간 버튼 */
.cfg-hours-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 10px; border-top: 1px solid var(--line); }
.cfg-hours-head .btns { display: flex; gap: 8px; }
#site-config .btn.mini { white-space: nowrap; }
.cfg-hours { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; padding-bottom: 10px; }
.cfg-hour { padding: 8px 0; border: 0; border-radius: 10px; background: var(--bg); color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: var(--raised-sm); cursor: pointer; transition: background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.18s var(--spring); transition-delay: var(--d, 0ms); }
.cfg-hour:active { transform: scale(0.9); }
.cfg-hour.on { background: var(--ok); color: #fff; box-shadow: none; }
.cfg-hour.diff { outline: 2px solid var(--on); outline-offset: 2px; }
.cfg-hours.dim .cfg-hour { opacity: 0.45; } /* 강제운전 꺼짐: 현장에 저장된 시간대는 그대로(초록) 보이되 흐리게 */

/* 교정값 미리보기 */
.cal-formula { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.cal-preview { margin: 6px 0 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-preview .now { color: var(--c-h2s); }
.cal-preview .new { color: var(--on); }

/* 아래 저장 줄 — 바꾼 게 있을 때만 아래에서 올라옴 */
.cfg-bar { position: fixed; right: 40px; bottom: 22px; left: 136px; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 24px; border-radius: 20px; background: var(--bg); box-shadow: var(--raised), 0 10px 30px rgba(0, 0, 0, 0.12); overflow: hidden; transform: translateY(calc(100% + 40px)); opacity: 0; pointer-events: none; transition: transform 0.45s var(--spring), opacity 0.25s ease; }
.cfg-bar.show { transform: none; opacity: 1; pointer-events: auto; }
.cfg-bar.warn { box-shadow: var(--raised), 0 0 0 2px var(--bad); }
.cfg-bar p { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-weight: 600; }
.cfg-bar p b { color: var(--on); }
.cfg-bar p.bad { color: var(--bad); }
.cfg-bar p.ok { color: var(--c-rear); }
.cfg-bar .btn.primary { padding: 11px 28px; font-size: 14px; background: var(--on); color: #fff; }
.cfg-bar .btn.primary:hover { color: #fff; filter: brightness(1.08); }
.cfg-bar .btn.primary:disabled { background: var(--bg); color: var(--faint); box-shadow: var(--inset); filter: none; }
.cfg-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--on); }
.cfg-progress.run { width: 100%; transition: width var(--wait, 30s) linear; }

@media (max-width: 1100px) { .cfg-grid { grid-template-columns: minmax(0, 1fr); } }
/* ── 폰 전용: 카드 접기(제목 줄에 요약) · 숫자칸은 이름 아래 한 줄 가득 [−] 값 [+] · 엄지 크기 버튼 ── */
@media (max-width: 860px) {
  #site-config .detail-head { gap: 10px 12px; margin-bottom: 18px; }
  .cfg-sync { align-items: flex-start; }
  .cfg-grid { gap: 14px; }

  .cfg-sec { padding: 0; }
  .cfg-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px 18px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
  .cfg-sec h3:focus-visible { outline: 2px solid var(--on); outline-offset: -2px; border-radius: var(--radius); }
  .cfg-title { flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 16px; }
  .cfg-title .cfg-scope { font-size: 11px; }
  .cfg-sum { display: block; flex: none; max-width: 55%; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 700; text-align: right; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; transition: color 0.2s ease; }
  .cfg-sum.changed { color: var(--on); }
  .cfg-sum.invalid { color: var(--bad); }
  .cfg-caret { display: block; flex: none; width: 8px; height: 8px; margin: -4px 2px 0 0; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.3s var(--spring), margin 0.3s ease; }
  .cfg-sec.collapsed .cfg-caret { margin-top: 0; transform: rotate(-45deg); }
  .cfg-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.34s var(--ease); }
  .cfg-sec.collapsed .cfg-body { grid-template-rows: 0fr; }
  .cfg-inner { min-height: 0; overflow: hidden; }
  .cfg-pad { padding: 0 18px 16px; transition: opacity 0.25s ease; }
  .cfg-sec.collapsed .cfg-pad { opacity: 0; }

  /* 숫자 줄: 이름 위, [−] 값 [+] 단위 가로 가득 */
  .cfg-row:has(.cfg-num) { flex-direction: column; align-items: stretch; gap: 10px; }
  .cfg-row:has(.cfg-num) .cfg-field { align-items: stretch; }
  .cfg-row .cfg-num { gap: 8px; }
  .cfg-row .cfg-num input, .cfg-row .cfg-num input.short { flex: 1; width: auto; min-width: 0; height: 46px; font-size: 18px; }
  .cfg-num.dt input.date { flex: 1.7; }
  .cfg-step { flex: none; width: 46px; height: 46px; font-size: 22px; }
  .cfg-was { text-align: right; }
  .cfg-row label.switch .track { transform: scale(1.1); }

  /* 시간대: [번호][스위치][시작]~[끝][삭제] 한 줄 + 길이 글자는 그 아래 */
  .cfg-range { flex-wrap: wrap; row-gap: 4px; }
  .cfg-range input[inputmode] { flex: 1; width: auto; min-width: 0; height: 44px; font-size: 16px; }
  .cfg-range .dur { order: 9; flex-basis: 100%; min-width: 0; padding-left: 28px; }
  .cfg-range .btn.mini { margin-left: 0; height: 40px; }
  #c-range-add { width: 100%; height: 42px; }

  .cfg-hours-head { flex-wrap: wrap; }
  .cfg-hours-head .btn.mini { height: 38px; }
  .cfg-hours { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
  .cfg-hour { padding: 12px 0; font-size: 15px; }

  /* 저장 줄: 아래 메뉴 바로 위, 글자는 두 줄까지, 버튼은 크게 */
  .cfg-bar { right: 12px; left: 12px; bottom: 92px; flex-wrap: wrap; padding: 12px 14px; }
  .cfg-bar p { flex-basis: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
  .cfg-bar .btn { flex: 1; height: 46px; }
  .cfg-bar .btn.primary { flex: 1.6; }
  #site-config.has-bar { padding-bottom: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  #site-config *, #site-config *::before, #site-config *::after, #site-config { animation: none !important; transition: none !important; }
}

/* ════════ 현장 통합 설정 (bulkConfig.js) — 표 한 장: 줄 = 현장, 칸 = 설정 항목. 머리글 맨 아랫줄이 "바꿀 값" 입력 줄.
   모니터링 "현장 통합 설정" 버튼으로 뜨는 큰 창. 한 쪽에 현장 10곳 (아래 페이지 번호). 저장 줄 · 시간대 · 시간 버튼은 위 현장 설정 화면 것 그대로 ════════ */
/* 큰 창: 제목 줄 · 가운데(검색 · 표, 길면 여기만 스크롤) · 아래 저장 줄 */
.bk-dialog { width: min(1800px, calc(100vw - 32px)); max-width: none; height: calc(100vh - 32px); max-height: none; padding: 0; border: 0; border-radius: 12px; background: var(--bg); color: var(--text); box-shadow: var(--elev-modal); overflow: hidden; }
.bk-dialog[open] { display: flex; flex-direction: column; }
.bk-dialog::backdrop { background: rgba(0, 0, 0, 0.5); }
.bk-head { display: flex; flex: none; align-items: baseline; gap: var(--s2); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.bk-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.bk-head p { flex: 1; min-width: 0; margin: 0; color: var(--muted); font-size: 15px; }
.bk-head .btn { align-self: center; }
.bk-body { flex: 1; min-height: 0; padding: var(--s3) var(--s4); overflow-y: auto; overscroll-behavior: contain; }
/* 저장 줄은 창 아래에 늘 (현장 설정 화면은 바꾼 게 있을 때만 떠오름) */
.bk-dialog .cfg-bar { position: relative; right: auto; bottom: auto; left: auto; flex: none; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); transform: none; opacity: 1; pointer-events: auto; }
.bk-dialog .cfg-bar.warn { box-shadow: inset 0 2px 0 var(--bad); }
/* 저장 줄 왼쪽: 윗줄 크게 "현장 77곳 (연결된 현장 76곳) · 3곳 선택", 아랫줄 안내 · 결과 */
.bk-bar-info { flex: 1; min-width: 0; }
.bk-bar-info p:empty { display: none; }
.bk-dialog .cfg-bar .bk-count { margin-bottom: 2px; color: var(--text); font-size: 20px; font-weight: 700; }
#bulk-config .result-line { margin: 0 0 var(--s1); }
#bulk-config .pager { margin-top: var(--s2); }
.bk-wrap { overflow-x: auto; /* 좁은 화면은 옆으로 스크롤 (체크 · 현장 칸은 왼쪽에 붙음), 아래로는 한 쪽 10곳이라 페이지가 스크롤 */ border: 1px solid var(--border); border-radius: 8px; box-shadow: none; }
.bk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; font-variant-numeric: tabular-nums; }
.bk-table th, .bk-table td { padding: 8px 6px; /* 14칸이 1920 화면에 옆 스크롤 없이 들어오게 좁게 */ border-bottom: 1px solid var(--line); background: var(--bg); text-align: center; white-space: nowrap; }
.bk-table thead th { background: var(--hover); font-weight: 700; }
.bk-table thead th small { color: var(--muted); font-size: 13px; font-weight: 400; }
.bk-table thead th { white-space: normal; word-break: keep-all; } /* 긴 칸 이름("기준 전류 A")은 두 줄로 접혀 칸이 값 폭만큼만 */
.bk-table .g { border-left: 1px solid var(--border); } /* 묶음(황화수소 기준 · 수동모드 …) 사이 줄 */
.bk-table .pick { position: sticky; left: 0; z-index: 1; box-sizing: border-box; width: 44px; min-width: 44px; padding-right: 10px; padding-left: 10px; } /* 칸 폭 44 고정 — 옆 현장 칸이 44 에 붙음 */
.bk-table .site { position: sticky; left: 44px; z-index: 1; width: 100%; min-width: 170px; max-width: 0; padding-right: 10px; padding-left: 10px; text-align: left; } /* 남는 폭을 다 쓰고, 좁으면 이름을 … 으로 줄임 (max-width 0 = 칸이 글 길이만큼 안 버팀) → 가로 스크롤 없이 */
.bk-table .bk-edit th.site { left: 0; }
.bk-table .check { position: relative; display: inline-flex; cursor: pointer; }
.bk-table .check .box { border-radius: 4px; box-shadow: inset 0 0 0 1px var(--border-input); }
.bk-table .check input:disabled + .box { opacity: 0.4; }
/* 바꿀 값 줄 — 넣은 칸은 파랑, 틀린 값은 빨강 */
.bk-edit th, .bk-edit td { border-bottom: 2px solid var(--border-strong); background: var(--bg); }
.bk-table .bk-edit th.site { background: var(--bg); color: var(--on); }
.bk-edit input, .bk-edit select { width: 60px; min-height: 36px; padding: 0 4px; text-align: center; font-size: 15px; font-weight: 700; }
.bk-edit select { width: 80px; padding: 0 22px 0 6px; text-align: center; text-align-last: center; } /* 글자("유지" · 자동 · ON 등)는 화살표 왼쪽 자리의 가운데에 — 화살표와 안 겹치게 오른쪽 여백을 둠 */
.bk-edit input.dt { width: 138px; }
.bk-edit input::placeholder { color: var(--faint); font-weight: 400; }
.bk-edit .set { border-color: var(--on); color: var(--on); box-shadow: inset 0 0 0 1px var(--on); }
.bk-edit .bad { border-color: var(--bad); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.bk-edit .btn.mini { max-width: 110px; /* 긴 시간대는 … 으로 줄이고 마우스를 올리면 전부 */ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-clear { margin-left: 4px; padding: 0 6px; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.bk-clear:hover { color: var(--bad); }
/* 현장 줄 */
.bk-table tbody tr { cursor: pointer; }
.bk-table tbody tr:hover td { background: var(--hover); }
.bk-table tbody tr.sel td { background: var(--sub-soft); }
.bk-table tbody tr.off { cursor: default; }
.bk-table tbody tr.off td { color: var(--faint); }
.bk-table tbody td { white-space: pre-line; } /* 켜진 시간대는 한 줄에 하나씩 */
.bk-table td.site b, .bk-table td.site small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-table td.site small { color: var(--muted); font-size: 13px; }
.bk-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; } /* 시리얼 · 버전 옆에 수위계 · LED 배지 — 좁으면 배지가 아랫줄로 */
.bk-sub small { min-width: 0; max-width: 100%; margin-right: 2px; }
.bk-tags { display: flex; flex: none; gap: 4px; } /* 배지 둘은 늘 같이 다님 */
.bk-sub .tag { margin: 0; line-height: 20px; }
.bk-table tr.off td.site small { color: var(--faint); }
.bk-status { display: block; color: var(--muted); font-size: 13px; font-weight: 700; white-space: normal; word-break: keep-all; }
.bk-status.wait { color: var(--on); }
.bk-status.ok { color: var(--c-rear); }
.bk-status.bad { color: var(--bad); }
.bk-status.none { color: var(--faint); font-weight: 400; }
/* 바뀔 칸: 지금 값(흐리게 줄 그음) 아래 새 값(파랑) */
.bk-table td.chg .was { display: block; color: var(--muted); font-size: 13px; text-decoration: line-through; }
.bk-table td.bk-mode .was { display: block; margin-bottom: 2px; color: var(--muted); font-size: 13px; text-decoration: line-through; }
.bk-table td.chg .new { display: block; color: var(--on); font-weight: 700; }
.bk-table td.is-off { color: var(--faint); }
.bk-table td.bk-none { padding: var(--s4) 0; color: var(--muted); }
/* 시간대 고치는 창 */
.bk-editor { width: min(640px, calc(100vw - 32px)); }
.bk-editor .btn.mini { min-height: 32px; padding: 0 10px; font-size: 15px; white-space: nowrap; }
.bk-editor .btns { display: flex; gap: var(--s1); margin-bottom: var(--s2); }
.bk-editor .cfg-ranges { max-height: 300px; margin: 0; }
.bk-editor .msg { min-height: 0; }
@media (prefers-reduced-motion: reduce) {
  #bulk-config *, #bulk-config *::before, #bulk-config *::after, #bulk-config { animation: none !important; transition: none !important; }
}
/* 좁은 화면(노트북 · 화면 배율 125%): 글자 · 여백 · 입력칸을 더 줄여 가로 스크롤 없이 */
@media (max-width: 1800px) {
  .bk-head, .bk-body { padding-right: var(--s2); padding-left: var(--s2); }
  .bk-table { font-size: 14px; }
  .bk-table th, .bk-table td { padding-right: 3px; padding-left: 3px; }
  .bk-table .site { padding-right: 6px; padding-left: 6px; }
  .bk-edit input, .bk-edit select { width: 50px; padding: 0 2px; font-size: 14px; }
  .bk-edit select { width: 70px; padding: 0 18px 0 4px; }
  .bk-edit input.dt { width: 122px; }
  .bk-edit .btn.mini { max-width: 86px; padding: 0 6px; font-size: 14px; }
  .bk-table td .badge { padding: 0 6px; font-size: 14px; }
}
