:root {
  --bg: #f5f5f2; --surface: #fff; --line: #e5e4de; --line-2: #efeee9;
  --text: #1c1e1b; --muted: #6c7069; --faint: #9a9d97;
  --brand: #2f6b3c; --brand-weak: #e7efe5; --danger: #c0392b;
  --radius: 10px; --shadow: 0 1px 2px rgba(20,24,18,.06), 0 2px 8px rgba(20,24,18,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
       font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }

/* ---------- buttons, inputs ---------- */
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 12px; font-weight: 500; }
.btn:hover { border-color: #cfcec7; background: #fafaf8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #285c33; }
.btn.danger { color: var(--danger); }
.btn-text { border: 0; background: none; padding: 0; color: var(--muted); }
.btn-text:hover { color: var(--text); text-decoration: underline; }
input[type=text], input[type=date], input[type=password], input:not([type]), select, textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(47,107,60,.25); border-color: var(--brand); }

/* ---------- login ---------- */
body.login { display: flex; align-items: center; justify-content: center; }
.login-box { background: var(--surface); padding: 32px 28px; border-radius: 14px; width: 320px; box-shadow: var(--shadow); }
.login-box h1 { font-size: 20px; margin-bottom: 22px; }
.login-box label { display: block; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.login-box input { margin-top: 6px; }
.login-box button { width: 100%; padding: 10px; background: var(--brand); color: #fff; border: 0; border-radius: 8px; font-weight: 600; }
.login-box button.btn-text { background: none; color: var(--muted); font-weight: 500; padding: 6px 0 0; }
.login-box button.alt { background: var(--surface); color: var(--brand); border: 1px solid var(--brand); }
.login-box .first { margin: 14px 0 10px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); }
.login-box .muted { margin: -12px 0 18px; font-size: 13px; }
.login-box .ok { color: var(--brand); margin: 0 0 10px; }
.err { color: var(--danger); min-height: 1em; margin: 10px 0 0; }

/* ---------- shell ---------- */
body:not(.login) { display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 24px; padding: 0 18px; height: 52px; flex: none;
       background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 16px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; height: 100%; overflow-x: auto; }
.tabs a { display: flex; align-items: center; padding: 0 12px; color: var(--muted); text-decoration: none;
          font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.nbadge { margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11.5px; line-height: 18px; }
.tabs a[hidden], .nbadge[hidden] { display: none; }
.user { margin-left: auto; display: flex; gap: 12px; align-items: center; color: var(--muted); white-space: nowrap; }
.view { display: none; flex: 1; min-height: 0; }
.view.on { display: flex; }
.page { overflow-y: auto; flex-direction: column; }
.page > .wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 20px 40px; }
@media (max-width: 760px) {
  .top { gap: 10px; padding: 0 10px; }
  .brand { display: none; }
  .user span { display: none; }
}

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { font-size: 14px; margin-bottom: 12px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; margin-right: auto; }
.grid { display: grid; gap: 14px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.empty { color: var(--faint); padding: 8px 0; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff;
        border-radius: 999px; padding: 3px 10px; font-size: 12.5px; line-height: 1.5; white-space: nowrap; }
button.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
         background: var(--brand-weak); color: var(--brand); white-space: nowrap; }
.badge.gray { background: #eeeee9; color: var(--muted); }
.tagdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- map view ---------- */
.mapview { position: relative; }
#map { flex: 1; background: #eef0ea; }
#panel { width: 380px; flex: none; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line); padding: 18px 18px 30px; }
@media (max-width: 760px) {
  .mapview.on { flex-direction: column; }
  #map { flex: none; height: 52vh; }
  #panel { width: auto; flex: 1; border-left: 0; border-top: 1px solid var(--line); }
}
.leaflet-container { font-family: inherit; }
.mapctl { background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.crumbs { display: flex; align-items: center; padding: 6px 10px; font-size: 13px; font-weight: 600; }
.crumbs a { color: var(--muted); text-decoration: none; cursor: pointer; }
.crumbs a:hover { color: var(--brand); }
.crumbs .sep { color: #c3c4be; margin: 0 7px; font-weight: 400; }
.satbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px;
          border: 0; font-size: 11.5px; font-weight: 600; color: #444; gap: 2px; }
.satbtn svg { width: 22px; height: 22px; }
.satbtn.on { background: #263238; color: #fff; }
.rlabel { background: rgba(255,255,255,.92); border: 0; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.15);
          font-weight: 700; font-size: 12px; padding: 1px 6px; color: #333; }
.rlabel::before { display: none; }
.tmk { display: flex; align-items: center; justify-content: center; border-radius: 50%;
       font-weight: 700; letter-spacing: -0.04em; box-shadow: 0 0 0 1.5px #fff, 0 1px 3px rgba(0,0,0,.35);
       transition: opacity .15s, filter .15s; font-variant-numeric: tabular-nums; }
.tmk.dim { opacity: .2; filter: grayscale(.7); }
.tmk.sel { opacity: 1; filter: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #e8336d, 0 2px 6px rgba(0,0,0,.35); }

/* panel content */
.p-head { margin-bottom: 14px; }
.p-head h2 { font-size: 19px; display: flex; align-items: center; gap: 8px; }
.p-head .sub { color: var(--muted); margin-top: 4px; font-size: 13px; }
.sec { margin-top: 20px; }
.sec > h3 { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sec > h3 .btn-text { margin-left: auto; font-weight: 500; font-size: 12.5px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.kpi { background: #f7f7f4; border-radius: 8px; padding: 9px 11px; }
.kpi .k { color: var(--muted); font-size: 12px; }
.kpi .v { font-size: 19px; font-weight: 700; margin-top: 1px; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 7px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.kv td:first-child { color: var(--muted); width: 34%; }
.kv td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dist { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 10px; font-size: 13px; }
.dist .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.dist .lbl { color: var(--muted); grid-column: 1 / -1; margin-top: 8px; font-weight: 600; font-size: 12.5px; }
.dist .lbl:first-child { margin-top: 0; }
.filter fieldset { border: 0; margin: 0 0 10px; padding: 0; }
.filter legend { font-weight: 600; font-size: 12.5px; padding: 0; margin-bottom: 5px; color: var(--muted); }
.filter .opts { display: flex; flex-wrap: wrap; gap: 5px; }
.filter label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px;
                padding: 3px 10px 3px 7px; font-size: 12.5px; cursor: pointer; user-select: none; }
.filter label:has(input:checked) { background: var(--brand-weak); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.filter input { margin: 0; accent-color: var(--brand); }
.filter .cnt { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.match { font-weight: 600; margin-bottom: 10px; font-size: 13px; }
.match b { color: var(--brand); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #eee; display: block; }
.upload { display: inline-flex; margin-top: 10px; }
.upload input { display: none; }
.back { margin-bottom: 12px; font-size: 13px; }

/* ---------- logs ---------- */
.loglist { display: flex; flex-direction: column; gap: 10px; }
.logday { font-weight: 700; margin: 14px 0 2px; color: var(--muted); font-size: 13px; }
.logday:first-child { margin-top: 0; }
.log { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.log .row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.log .who { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.log .content { margin-top: 8px; white-space: pre-wrap; line-height: 1.55; }
.log .acts { margin-top: 8px; display: flex; gap: 12px; font-size: 12.5px; }
.monthnav { display: flex; align-items: center; gap: 6px; }
.monthnav b { min-width: 110px; text-align: center; font-size: 15px; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: var(--radius);
       overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: #fafaf7; padding: 7px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal .day { background: var(--surface); min-height: 108px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day:hover { background: #fbfbf8; }
.cal .day.out { background: #fafaf7; color: var(--faint); }
.cal .day.sel { box-shadow: inset 0 0 0 2px var(--brand); }
.cal .dnum { font-size: 12.5px; font-weight: 600; }
.cal .today .dnum { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 7px; align-self: flex-start; }
.cal .sun .dnum { color: #c0392b; } .cal .sat .dnum { color: #2f5fbf; }
.cal .today.sun .dnum, .cal .today.sat .dnum { color: #fff; }
.ev { font-size: 12px; padding: 1px 6px; border-radius: 4px; background: var(--brand-weak); color: #23502d;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.s-진행중 { background: #fff1cf; color: #6b4e00; }
.ev.s-완료 { background: #eeeee9; color: var(--faint); text-decoration: line-through; }
.ev.s-보류 { background: #f1f1ee; color: var(--muted); }
.ev.logs { background: none; color: var(--muted); padding-left: 2px; }
.calwrap { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .calwrap { grid-template-columns: 1fr; } .cal .day { min-height: 70px; } .ev:not(.logs) { font-size: 0; height: 5px; padding: 0; } }

/* ---------- dashboard ---------- */
.kpirow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 900px) { .kpirow { grid-template-columns: repeat(2, 1fr); } }
a.tile { color: inherit; text-decoration: none; } a.tile:hover { border-color: var(--brand); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tile .k { color: var(--muted); font-size: 13px; font-weight: 500; }
.tile .v { font-size: 28px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 14px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.tile .d { color: var(--faint); font-size: 12px; margin-top: 2px; }
.dash2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 900px) { .dash2 { grid-template-columns: 1fr; } }
table.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { text-align: right; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line-2); }
.tbl th:first-child, .tbl td:first-child { text-align: left; white-space: nowrap; }
.tbl tbody tr { cursor: pointer; } .tbl tbody tr:hover td { background: #fafaf7; }
.tbl tfoot td { font-weight: 700; border-bottom: 0; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 0 4px; border-bottom: 1px solid #cfcfc8; }
.bars .b { flex: 1; background: #3d7f4a; border-radius: 4px 4px 0 0; min-height: 1px; cursor: pointer; }
.bars .b:hover { background: #2f6b3c; }
.bars-x { display: flex; gap: 10px; padding: 6px 4px 0; }
.bars-x span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.tip { position: fixed; z-index: 3000; background: #1f2421; color: #fff; padding: 5px 9px; border-radius: 6px; font-size: 12.5px; pointer-events: none; }
.list-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.list-row:last-child { border-bottom: 0; }
.list-row .date { color: var(--muted); font-size: 12.5px; width: 82px; flex: none; font-variant-numeric: tabular-nums; }
.list-row .main { flex: 1; min-width: 0; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 2000; background: rgba(20,24,18,.35); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 12px; overflow-y: auto; }
.modal[hidden] { display: none; }
.dialog { background: var(--surface); border-radius: 14px; width: 560px; max-width: 100%; padding: 20px 22px; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.dialog h2 { font-size: 17px; margin-bottom: 16px; }
.form { display: grid; gap: 14px; }
.form label > span, .form .lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.form .acts .danger { margin-right: auto; }
.rpick { display: flex; flex-direction: column; gap: 8px; }
.rpick .grp { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rpick .chip { font-size: 12px; padding: 2px 9px; }
.rpick .chip.cell { font-size: 11.5px; padding: 1px 7px; color: var(--muted); }
.rpick .chip.cell.on { color: #fff; }

/* ---------- work status ---------- */
.st { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.st-완료 { background: #e1f1e4; color: #1d6b34; }
.st-진행중 { background: #e2ecfa; color: #1f4f99; }
.st-불확실 { background: #fcefcf; color: #865600; }
.st-none { color: var(--faint); font-weight: 500; padding-left: 0; }
.jst-예정 { background: #eeeee9; color: var(--muted); }
.jst-진행중 { background: #e2ecfa; color: #1f4f99; }
.jst-완료 { background: #e1f1e4; color: #1d6b34; }
.jst-보류 { background: #f1f1ee; color: var(--faint); }
.pbar { display: flex; gap: 2px; height: 10px; border-radius: 5px; overflow: hidden; margin: 10px 0 6px; }
.pbar span { min-width: 3px; }
.p-done { background: #3f9a55; } .p-doing { background: #3d7fd6; } .p-unsure { background: #e0a21b; } .p-cant { background: #c8553d; } .p-none { background: #e6e6e1; }
.plegend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.plegend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.subtabs { display: flex; gap: 2px; background: #ebebe6; padding: 3px; border-radius: 9px; margin-right: auto; }
.subtabs a { padding: 5px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; }
.subtabs a.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.subtabs a b { color: #865600; }
@media (max-width: 760px) { .subtabs { max-width: 100%; overflow-x: auto; } .subtabs a { padding: 5px 7px; white-space: nowrap; } }
.page-head h2 { margin-right: 4px; }
.jobgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.jobcard { display: block; color: inherit; text-decoration: none; }
.jobcard:hover { border-color: var(--brand); }
.jc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jc-head b { font-size: 15px; }
.jc-dates { font-size: 12.5px; margin-top: 4px; }
.jc-note { font-size: 12.5px; margin-top: 8px; color: var(--muted); }
.jc-check { display: inline-block; font-size: 12px; margin-top: 8px; color: #865600; font-weight: 600; }
.dash-job { display: block; color: inherit; text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.dash-job:last-child { border-bottom: 0; }
table.board { border-collapse: collapse; width: 100%; font-size: 13px; }
.board th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.board th a { color: inherit; }
.board td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.board td a { color: var(--text); text-decoration: none; font-weight: 600; }
.board .grp-row td { background: #fafaf7; font-weight: 700; font-size: 12.5px; color: var(--muted); padding: 5px 10px; }
.rec { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13px; }
.rec:last-child { border-bottom: 0; }
.rec:hover { background: #fafaf7; }
.rec .date { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 40px; white-space: nowrap; }
.rec .jobname { font-weight: 600; }
.rec .note { color: var(--muted); }
.rec .check { color: #865600; font-size: 12.5px; }
.chip.unknown { border-style: dashed; color: #865600; }
.logday { font-weight: 700; margin: 12px 0 2px; color: var(--muted); font-size: 12.5px; }
.dayc { margin-bottom: 12px; }
.jobblock { margin-top: 6px; }
.jobblock + .jobblock { margin-top: 14px; }
.jb-head { display: flex; gap: 8px; align-items: baseline; }
.jb-head a { font-weight: 700; color: var(--text); text-decoration: none; }
.chkrow { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.chkrow .chk-main { flex: 1; min-width: 260px; }
.chkrow .rec { border: 0; cursor: default; }
.chk-acts { display: flex; gap: 6px; padding: 6px 0; }
.chk-acts .btn { padding: 4px 10px; font-size: 12.5px; }
.seg-radio { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-radio label { cursor: pointer; }
.seg-radio input { display: none; }
.seg-radio span { display: block; padding: 7px 12px; font-size: 13px; border-right: 1px solid var(--line); }
.seg-radio label:last-child span { border-right: 0; }
.seg-radio input:checked + span { background: var(--brand); color: #fff; font-weight: 600; }
.jobctl { padding: 6px 10px; font-size: 13px; font-weight: 600; display: grid; gap: 5px; }
.jobctl label { display: flex; align-items: center; gap: 8px; }
.jobctl label span { flex: none; }
.jobctl select { width: 160px; padding: 3px 6px; font-weight: 500; }
.jobctl select.on { border-color: var(--brand); background: var(--brand-weak); font-weight: 700; }
.legend { padding: 8px 12px; font-size: 12.5px; line-height: 1.8; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ev.plan { background: #fff; border: 1px solid #b9c9b4; color: #23502d; }
.ev.plan.s-완료 { text-decoration: line-through; color: var(--faint); border-color: var(--line); }
.ev.done { background: var(--brand-weak); color: #23502d; }
.ev.more { background: none; color: var(--faint); }
.cal-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); margin: -6px 0 10px; }
.cal-legend i { display: inline-block; width: 18px; height: 10px; margin-right: 5px; vertical-align: -1px; padding: 0; }

/* ---------- region panel charts, toast ---------- */
.hb { margin-bottom: 14px; }
.hb-t { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.hb-row { display: grid; grid-template-columns: 96px 1fr 34px; align-items: center; gap: 8px; font-size: 12.5px; padding: 2px 0; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 10px; background: #f1f1ed; border-radius: 0 4px 4px 0; }
.hb-fill { display: block; height: 100%; min-width: 2px; background: #3d7f4a; border-radius: 0 4px 4px 0; }
.hb-fill.empty { background: #c8c9c3; }
.hb-row:hover .hb-fill { background: #2f6b3c; }
.hb-row:hover .hb-fill.empty { background: #b3b4ae; }
.hb-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hlctl { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; background: #fff8e6; }
.hl-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2.5px #e0a21b; }
.tmk.hl { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #e0a21b, 0 2px 6px rgba(0,0,0,.35); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000; display: flex; gap: 14px; align-items: center;
         width: max-content; max-width: calc(100vw - 24px);
         background: #1f2421; color: #fff; padding: 10px 14px 10px 16px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: 13.5px; }
.toast[hidden] { display: none; }
.toast button { border: 0; background: none; color: #9fd8a8; font-weight: 700; padding: 2px 4px; white-space: nowrap; }

/* ---------- 항목별 현황 charts ---------- */
.chart { margin-bottom: 18px; }
.chart-t { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.chart-foot { font-size: 12px; color: var(--faint); margin-top: 5px; }
.seg { display: flex; gap: 2px; height: 14px; border-radius: 4px; overflow: hidden; }
.seg span { min-width: 3px; }
.seg span:hover { filter: brightness(.92); }
.seg-legend { display: grid; gap: 2px; margin-top: 7px; font-size: 12.5px; }
.seg-legend div { display: grid; grid-template-columns: 10px 1fr 40px 36px; gap: 8px; align-items: center; }
.seg-legend i { width: 10px; height: 10px; border-radius: 2px; }
.seg-legend b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.seg-legend .faint { text-align: right; font-variant-numeric: tabular-nums; }
.hist { display: flex; align-items: flex-end; gap: 8px; height: 96px; border-bottom: 1px solid #c9c9c2; padding: 0 2px; }
.hist .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.hist .bar { display: block; background: #3d7f4a; border-radius: 4px 4px 0 0; min-height: 2px; }
.hist .col { cursor: pointer; }
.hist .col:hover .bar { background: #2f6b3c; }
.hist .col.on .bar { background: #e0a21b; }
.hist .col.on .cnt { color: #6b4e00; font-weight: 600; }
.hist .cnt { text-align: center; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.hist-x { display: flex; gap: 8px; padding: 4px 2px 0; }
.hist-x span { flex: 1; text-align: center; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.stat-line { font-size: 13px; margin-bottom: 4px; }
.stat-line b { font-size: 20px; margin-right: 2px; }
.note-row { display: flex; gap: 6px; align-items: baseline; width: 100%; border: 0; background: none; text-align: left;
            padding: 5px 4px; border-radius: 6px; font-size: 12.5px; }
.note-row:hover { background: #f3f3ef; }
.note-row b { white-space: nowrap; font-weight: 600; }
.note-row span:last-child { color: var(--muted); }
.note-row .tagdot { align-self: center; }

/* ---------- grouped records, work stats ---------- */
.rg { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.rg:last-child { border-bottom: 0; }
.rg .jb-head { margin-bottom: 6px; }
.rg-line { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; }
.rg-line > .st { flex: none; margin-top: 3px; min-width: 46px; text-align: center; }
.rg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rg-chips .chip { font-size: 12px; padding: 2px 9px; cursor: pointer; }
.rg-chips .chip:hover { border-color: var(--brand); }
.rg-note { font-size: 12.5px; color: var(--muted); margin: 4px 0 0 54px; display: flex; flex-wrap: wrap; gap: 2px 8px; }
.rg-note b { color: var(--text); font-weight: 600; }
.rg-note .check { color: #865600; }
.wj { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.wj:last-child { border-bottom: 0; }
.wj-head { display: flex; justify-content: space-between; align-items: baseline; }
.wj-head a { font-weight: 700; color: var(--text); text-decoration: none; }
.wj-head a:hover { color: var(--brand); }
.wj .pbar { margin: 6px 0 6px; height: 8px; }
.wj-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.wchip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: #fff; border-radius: 999px;
         padding: 2px 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.wchip i { width: 8px; height: 8px; border-radius: 2px; }
.wchip:hover { border-color: var(--brand); }
.wchip.on { background: #fff1cf; border-color: #e0a21b; color: #6b4e00; font-weight: 600; }

/* calendar bars: a multi-day bar runs into the cell padding and over the 1px grid line */
.ev.bar { height: 20px; line-height: 18px; }
.ev.gap { background: none; height: 20px; }
.ev.bar.cont-l { margin-left: -6px; border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 0; padding-left: 12px; }
.ev.bar.cont-r { margin-right: -7px; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }
.cal .day { overflow: visible; }
@media (max-width: 900px) { .ev.bar, .ev.gap { height: 5px; line-height: 5px; } }

/* ---------- 내 작업: field check screen ---------- */
#me { cursor: pointer; }
#me:hover { color: var(--text); text-decoration: underline; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .45; cursor: default; }
.seg-radio.sm span { padding: 5px 11px; font-size: 12.5px; }
.my-cells { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12.5px; }
.jc-open { margin-top: 10px; font-weight: 600; color: var(--brand); font-size: 13px; }
.page > .wrap.field { padding-bottom: 80px; }
.field .back { display: inline-block; margin-bottom: 10px; }
.fsum { padding: 12px 16px; }
.fsum-t { font-size: 13px; color: var(--muted); }
.fsum-t b { font-size: 20px; color: var(--text); }
.fsum .pbar { margin-top: 8px; }
.ftools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 6px; }
.ftools #f-rec { margin-left: auto; }
.ck { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; user-select: none; }
.ck input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.hint { color: var(--muted); font-size: 12.5px; margin: 4px 0 8px; }
.tlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tlegend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 5px; vertical-align: -3px; }
.tl-left { background: linear-gradient(135deg, #1f5fbf 0 33%, #f4c518 33% 66%, #25272b 66%); }
.tl-done { background: #e1f1e4; box-shadow: inset 0 0 0 2px #3f9a55; }
.tl-cant { background: #fbe6e0; box-shadow: inset 0 0 0 2px #c8553d; }
.tl-gone { border: 1.5px dashed #8a8c86; }
.fcell { margin-top: 16px; }
.fc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.fc-head .fc-all { margin-left: auto; color: var(--brand); font-weight: 600; font-size: 13px; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.tt { position: relative; width: 52px; height: 52px; border: 0; border-radius: 10px; background: var(--bg); color: var(--fg);
      font-weight: 700; font-size: 18px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
      box-shadow: 0 1px 2px rgba(0,0,0,.25); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.tt.n3 { font-size: 15px; }
.tt.spot { width: auto; padding: 0 12px; font-size: 13px; background: #fff; color: var(--text); }
.tt:active { transform: scale(.96); }
.tt.done { background: #e1f1e4; color: #1d6b34; box-shadow: inset 0 0 0 2px #3f9a55; }
.tt.cant { background: #fbe6e0; color: #8f3420; box-shadow: inset 0 0 0 2px #c8553d; }
.tt.done::after, .tt.cant::after { position: absolute; top: -5px; right: -5px; width: 17px; height: 17px; border-radius: 50%;
      box-shadow: 0 0 0 2px #fff; color: #fff; font-size: 11px; line-height: 17px; font-weight: 800; }
.tt.done::after { content: ""; background: #3f9a55
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.6 2.5L12 5.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/13px no-repeat; }
.tt.cant::after { content: "!"; background: #c8553d; }
.tt.gone { outline: 1.5px dashed #8a8c86; outline-offset: 2px; }
.tt.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e8336d; }
.tt.done.sel { box-shadow: inset 0 0 0 2px #3f9a55, 0 0 0 2px #fff, 0 0 0 4px #e8336d; }
.tt.cant.sel { box-shadow: inset 0 0 0 2px #c8553d, 0 0 0 2px #fff, 0 0 0 4px #e8336d; }
.tt .memo { position: absolute; left: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.selbar { position: sticky; bottom: 12px; z-index: 50; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
          background: #1f2421; color: #fff; padding: 10px 12px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.selbar[hidden] { display: none; }
.selbar b { margin-right: auto; }
.selbar .btn { border-color: #3a403b; background: #2b312d; color: #fff; }
.selbar .btn.primary { background: var(--brand); border-color: var(--brand); }
.selbar .btn-text { color: #c9cdc8; }
@media (max-width: 760px) {
  .ftools #f-rec { margin-left: 0; }
  .tt { width: 50px; height: 50px; }
}

/* tree detail */
.td-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-info { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.photos .ph { position: relative; display: block; }
.photos .ph span { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 0 5px; border-radius: 4px; }
.form .acts a.btn-text { margin-right: auto; align-self: center; font-size: 13px; }

/* ---------- 관리 ---------- */
.utbl td, .utbl th, .atbl td, .atbl th { text-align: left; }
.utbl tbody tr, .atbl tbody tr { cursor: default; }
.utbl tbody tr:hover td, .atbl tbody tr:hover td { background: none; }
.utbl tr.off td { color: var(--faint); }
.acts-cell { white-space: nowrap; }
.acts-cell .btn { margin-left: 4px; }
.atbl .wrapcell { white-space: normal; min-width: 160px; }
.atbl .wrapcell .chip { margin: 1px 0; }
.cant { color: #8f3420; font-weight: 600; }
.atbl td:nth-child(7), .atbl td:nth-child(8) { white-space: nowrap; }
.mini { display: inline-block; width: 60px; height: 6px; background: #ececE6; border-radius: 3px; overflow: hidden; vertical-align: middle; }
.mini span { display: block; height: 100%; background: #3f9a55; }
.pwbox { display: grid; gap: 8px; background: #f7f7f4; border-radius: 10px; padding: 14px 16px; }
.pwbox div { display: flex; gap: 12px; align-items: baseline; }
.pwbox span { width: 64px; }
.pwbox b { font-size: 20px; letter-spacing: .04em; font-family: ui-monospace, Consolas, monospace; }
.ahead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.jobpick { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.jobpick select { width: auto; min-width: 220px; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pal { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 6px 11px; font-size: 13px; }
.pal i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.pal span { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.pal.on { border-color: var(--c, #555); box-shadow: 0 0 0 2px var(--c, #555); }
.pal.erase i { background: #fff; border: 1.5px dashed #999; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.agrp { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.arow { display: grid; grid-template-columns: 82px repeat(3, 1fr); gap: 6px; }
.aline { border: 0; background: none; text-align: left; font-weight: 700; font-size: 12.5px; padding: 4px 2px; border-radius: 6px; color: var(--text); }
.aline:hover { background: #f3f3ef; }
.aline.grp { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.acell { display: flex; flex-direction: column; align-items: flex-start; gap: 0; border: 1px solid var(--line); background: #fff;
         border-radius: 8px; padding: 5px 8px; font-size: 12px; text-align: left; min-height: 58px; }
.acell .seg-l { font-weight: 700; }
.acell small { color: var(--faint); font-size: 11px; }
.acell em { font-style: normal; color: var(--faint); font-weight: 600; margin-top: 1px; }
.acell.has { background: color-mix(in srgb, var(--c) 14%, white); border-color: color-mix(in srgb, var(--c) 55%, white); }
.acell.has em { color: color-mix(in srgb, var(--c) 75%, black); }
.acell.chg { border-style: dashed; border-width: 1.5px; }
.acell.out { background: #f7f7f4; color: var(--faint); border-style: dotted; }
button.acell:hover { border-color: var(--brand); }
.asave { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.asave > span:first-child { margin-right: auto; }
.dirty { color: #865600; font-size: 12.5px; }

/* ---------- 작업 필요 / 작업 현황: map marks and panel ---------- */
.tmk.hollow { border: 2px solid; }
.tmk.n-done { background: #3f9a55 !important; color: #fff !important; }
.tmk.n-doing { box-shadow: 0 0 0 3px #3d7fd6; }
.tmk.n-unsure { box-shadow: 0 0 0 3px #e0a21b; }
.tmk.n-cant { box-shadow: 0 0 0 3px #c8553d; }
.tmk.n-done.sel, .tmk.n-doing.sel, .tmk.n-unsure.sel, .tmk.n-cant.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #e8336d; }
.legend i[class^=lg-] { border-radius: 50%; }
.lg-tree { background: linear-gradient(90deg, #1f5fbf 0 33%, #f4c518 33% 66%, #25272b 66%); }
.lg-spot { background: #fff; border: 2.5px solid #25272b; }
.lg-done { background: #3f9a55; }
.lg-doing { border: 2.5px solid #3d7fd6; } .lg-unsure { border: 2.5px solid #e0a21b; } .lg-cant { border: 2.5px solid #c8553d; }
.cnt.todo { color: var(--danger); } .cnt.ok { color: #1d6b34; }
.rlabel .cnt, .pill .cnt { font-variant-numeric: tabular-nums; }
.pill-box { overflow: visible; }
.pill { position: absolute; transform: translateX(-50%); background: #fff; border: 1.5px solid; border-radius: 6px; padding: 1px 3px;
        min-width: 28px; text-align: center; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; }
.pill small { display: block; font-size: 10px; line-height: 12px; }
.pill .cnt { font-size: 12.5px; }

.mode-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mode-top .btn-text { margin-left: auto; }
.mode-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.mode-acts a.btn { text-decoration: none; color: inherit; }
.mode-acts a.btn.primary { color: #fff; }
.hero { display: grid; grid-template-columns: 1fr auto; align-items: end; background: #f7f7f4; border-radius: 10px; padding: 12px 14px; }
.hero .k { color: var(--muted); font-size: 12.5px; }
.hero-l .k { display: block; }
.hero-l b { font-size: 30px; line-height: 1.2; margin-right: 2px; }
.hero-p { text-align: right; }
.hero-p b { font-size: 20px; margin-right: 4px; }
.hero .pbar, .hero .plegend, .hero .wj-chips { grid-column: 1 / -1; }
.hero .pbar { background: #fff; }

.nr { display: grid; grid-template-columns: 1fr auto 40px; gap: 2px 8px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 8px;
      color: var(--text); text-decoration: none; font-size: 13px; }
.nr:hover { background: #f3f3ef; }
.nr-n { font-weight: 700; }
.nr-v { grid-column: 2 / -1; text-align: right; color: var(--muted); }
.nr-v b { color: var(--text); }
.nr .pbar { grid-column: 1 / 3; margin: 0; height: 8px; }
.nr-p { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nrs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 32px; }
@media (max-width: 900px) { .nrs { grid-template-columns: 1fr; } }

.nt { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.nt th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 4px; border-bottom: 1px solid var(--line); }
.nt th:first-child, .nt td:first-child { text-align: left; padding-left: 0; }
.nt th small { font-weight: 400; margin-left: 3px; color: var(--faint); }
.nt td { padding: 3px 4px; text-align: center; border-bottom: 1px solid var(--line-2); }
.nt td > small { display: block; color: var(--faint); font-size: 11.5px; }
.nt .nt-g td { background: #fafaf7; font-weight: 700; }
.nt .nt-g td:first-child { padding-left: 6px; }
.nt .nt-g small { display: inline; font-weight: 400; margin-left: 4px; }
.nt tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.nt tfoot small { display: inline; font-weight: 400; margin-left: 6px; }
.nt-b { border: 0; background: none; border-radius: 6px; padding: 3px 4px; min-width: 34px; }
.nt-b:hover { background: var(--brand-weak); }
.nt-b.zero { color: #1d6b34; font-size: 12px; }
.nt .sum .nt-b { font-weight: 700; }
a.nt-b { display: inline-block; color: var(--text); text-decoration: none; }
.needgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .needgrid { grid-template-columns: 1fr; } }
.needcard { display: flex; flex-direction: column; }
.needcard h3 { font-size: 16px; }
.needcard .kv { margin-top: 6px; }
.needcard .kv td:first-child { width: 84px; }
.needcard .mode-acts { margin-top: auto; padding-top: 12px; }
.nj + .nj, .nj + .warn { margin-top: 6px; }

.lv { display: grid; grid-template-columns: 104px 1fr 58px 36px; gap: 8px; align-items: center; width: 100%; border: 0; background: none;
      border-radius: 6px; padding: 3px 4px; text-align: left; font-size: 12.5px; }
.lv:hover { background: #f3f3ef; }
.lv.on { background: var(--brand-weak); }
.lv .pbar { margin: 0; height: 10px; }
.lv-n { white-space: nowrap; }
.lv-v, .lv-p { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.lv-p { color: var(--text); font-weight: 600; }
.lv-farm .lv-n, .lv-group .lv-n { font-weight: 700; }
.lv-farm .pbar { height: 14px; }
.lv-group { margin-top: 6px; } .lv-group .pbar { height: 12px; } .lv-group .lv-n { padding-left: 8px; }
.lv-line .lv-n { padding-left: 18px; }
.lv-cell .lv-n { padding-left: 30px; color: var(--muted); } .lv-cell .pbar { height: 6px; }

.dr { grid-template-columns: 84px 1fr 44px; }
.kpis.k3 { grid-template-columns: 1.4fr 1fr 1fr; }
.warn { color: var(--danger); font-weight: 600; }
.people td, .people th { padding: 6px 4px; font-size: 12.5px; white-space: nowrap; }
.people td.wrapcell { white-space: normal; text-align: left; }
.people th:nth-child(2) { text-align: left; }
@media (max-width: 760px) {
  .jobctl { font-size: 12px; padding: 5px 8px; } .jobctl select { width: 124px; }
  .legend { font-size: 11px; line-height: 1.5; padding: 5px 8px; } .legend .faint { display: none; }
}
.prob { padding: 4px 0 8px; font-size: 13px; }
.prob .faint { margin-top: 4px; font-size: 12.5px; }
.ll { margin-bottom: 12px; }
.ll-h { margin-bottom: 6px; font-size: 13px; }
.ll .chip { font-size: 12.5px; }
.tn { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.tn .faint { font-size: 12px; }
.tn-st { font-size: 12.5px; color: var(--muted); margin-left: 4px; }
.tn-st i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.tn-b { display: flex; gap: 6px; flex: none; }

/* ---------- 확인 사항 / 작업 제안 ---------- */
.fu { padding: 12px 0; border-top: 1px solid var(--line-2); }
.fu-head { display: flex; align-items: center; gap: 8px; }
.fu-head .btn { margin-left: auto; flex: none; }
.fu-head .faint { flex: none; }
.fu p { margin: 4px 0 8px; color: var(--muted); white-space: pre-wrap; }
.fu .chip { cursor: pointer; }
.fu.done > p, .fu.done > .chips { opacity: .55; }
.fu-ans { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--brand-weak); white-space: pre-wrap; }
.fu-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2);
  color: var(--text); text-decoration: none; }
.fu-row:last-child { border-bottom: 0; }
.fu-row:hover { color: var(--brand); }

/* ---------- 나무 표 ---------- */
.tableview { position: relative; }
.tb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 14px 18px 18px; }
.tb-bar { display: flex; align-items: center; gap: 12px; min-height: 32px; margin-bottom: 10px; }
.tb-bar h2 { font-size: 18px; flex: none; }
#tb-count { color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
#tb-count b { color: var(--text); }
#tb-active .chip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; display: block; }
.tb-btns { display: flex; gap: 6px; margin-left: auto; flex: none; }
#tb-reset[hidden], .tb-side[hidden], .tb-menu[hidden] { display: none; }
.tb-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tb { border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.tb th, .tb td { border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); text-align: left; white-space: nowrap; }
.tb th { position: sticky; top: 0; z-index: 2; background: #f7f7f4; border-bottom-color: var(--line); padding: 0; }
.tb td { padding: 6px 10px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; background: var(--surface); }
.tb td.num { text-align: right; }
.tb th:nth-child(1), .tb td:nth-child(1) { position: sticky; left: 0; width: 100px; min-width: 100px; max-width: 100px; }
.tb th:nth-child(2), .tb td:nth-child(2) { position: sticky; left: 100px; border-right-color: var(--line); }
.tb td:nth-child(-n+2) { z-index: 1; }
.tb th:nth-child(-n+2) { z-index: 3; }
.tb tbody tr { cursor: pointer; }
.tb tbody tr:hover td { background: #fafaf7; }
.tb tbody tr.on td { background: var(--brand-weak); }
.tb tr.none td { position: static; max-width: none; padding: 24px; color: var(--muted); cursor: default; }
.tb th > div { display: flex; align-items: center; justify-content: space-between; }
.tb-sort, .tb-filter { border: 0; background: none; }
.tb-sort { flex: 1; text-align: left; padding: 8px 2px 8px 10px; font-size: 12.5px; font-weight: 600; }
.tb-filter { padding: 8px; line-height: 0; }
.tb-filter svg { fill: #c3c4be; }
.tb-filter:hover svg { fill: var(--text); }
.tb-sort:focus-visible, .tb-filter:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tb th.filtered { background: var(--brand-weak); }
.tb th.filtered .tb-filter svg { fill: var(--brand); }
.tb-sort i { display: inline-block; margin-left: 5px; vertical-align: middle; border: 4px solid transparent; }
.tb th[aria-sort=ascending] i { border-top-width: 0; border-bottom: 6px solid var(--brand); }
.tb th[aria-sort=descending] i { border-bottom-width: 0; border-top: 6px solid var(--brand); }
.tb-menu { position: fixed; z-index: 1000; width: 270px; overflow-y: auto; padding: 12px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 8px 28px rgba(20,24,18,.18); font-size: 13px; }
.tm-sort, .tm-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.tm-sort .btn { flex: 1; }
.tm-row input { flex: 1; min-width: 0; width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.tm-row select { width: 76px; padding: 6px; }
.tm-all, .tm-list label { display: flex; align-items: center; gap: 7px; padding: 4px 2px; cursor: pointer; }
.tm-all { font-weight: 600; border-bottom: 1px solid var(--line-2); }
.tm-list { max-height: 260px; overflow-y: auto; margin-bottom: 10px; }
.tm-list label:hover { background: #fafaf7; }
.tm-list span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tm-list small { color: var(--faint); padding-right: 4px; }
.tm-foot { display: flex; justify-content: space-between; }
.tb-side { width: 340px; flex: none; overflow-y: auto; padding: 18px; background: var(--surface); border-left: 1px solid var(--line); }
.tb-side .photos { grid-template-columns: 1fr; margin-bottom: 14px; }
.tb-side .photos img { aspect-ratio: auto; }
.tb-acts { display: flex; gap: 6px; margin-bottom: 12px; }
@media (max-width: 1000px) {
  .tb-main { padding: 10px; }
  .tb-bar { flex-wrap: wrap; gap: 8px; }
  #tb-active { order: 1; width: 100%; }
  #tb-active:empty { display: none; }
  #tb-active .chip { max-width: 100%; }
  .tb-filter { padding: 12px; }
  .tb-side { position: absolute; inset: 0; z-index: 4; width: auto; border-left: 0; }
}
@media (max-width: 760px) {   /* keep only the number in view when scrolling sideways */
  .tb th:nth-child(1) { left: auto; }
  .tb td:nth-child(1) { position: static; }
  .tb th:nth-child(2), .tb td:nth-child(2) { left: 0; }
}

/* ---------- photos: tagged / originals ---------- */
.ph-group + .ph-group { margin-top: 10px; }
.ph-t { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.tagwait { padding: 10px 0; border-top: 1px solid var(--line-2); }
.tagwait .chip { cursor: pointer; margin-bottom: 8px; }
.tagwait .photos { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

/* ---------- 개발 내역 ---------- */
.dv-top { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.dv, .dv-open { margin-bottom: 10px; line-height: 1.55; }
.dv-c { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.dv-open .dv-c { margin-left: 4px; }
.dv-day .logday { margin: 18px 0 8px; font-size: 14px; }
.dv-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin-top: 10px; }
.dv-cols h4 { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.dv ul, .dv-open ul { margin: 0; padding-left: 18px; }
.dv li + li, .dv-open li + li { margin-top: 6px; }
.dv-open { border-left: 3px solid #e0a21b; }
.only-dev .dv-rev, .only-dev .dv-open, .only-rev .dv-dev, .only-rev .noreview { display: none; }
.noreview .dv-cols, .only-dev .dv-cols, .only-rev .dv-cols { grid-template-columns: 1fr; }
@media (max-width: 760px) { .dv-cols { grid-template-columns: 1fr; } }
