@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --ink: #16211c;
  --paper: #edf0ee;
  --card: #ffffff;
  --steel: #1f5f52;
  --steel-soft: #e3efeb;
  --alert: #b5341f;
  --amber: #b8781a;
  --muted: #6b7b76;
  --line: #d6dee0;

  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "D2Coding", Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
a { color: var(--steel); }

/* ─── 레이아웃 ─────────────────────────────────────────────── */
.app { min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: calc(var(--safe-t) + 12px) 16px 12px;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.topbar .brand { font-weight: 800; letter-spacing: -0.02em; font-size: 16px; }
.topbar .brand span { font-weight: 500; opacity: .62; margin-left: 6px; font-size: 13px; }
.topbar .who {
  margin-left: auto; font-family: var(--mono); font-size: 12px;
  opacity: .8; display: flex; align-items: center; gap: 8px;
}
.topbar .who button {
  background: rgba(255,255,255,.12); border: 0; color: #fff;
  padding: 5px 9px; border-radius: 8px; font-size: 12px; cursor: pointer;
}

main { flex: 1; padding: 14px 14px calc(96px + var(--safe-b)); max-width: 980px; width: 100%; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar button {
  border: 0; background: none; padding: 9px 0 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.tabbar button svg { width: 21px; height: 21px; stroke-width: 1.7; }
.tabbar button.on { color: var(--steel); }

/* ─── 공통 요소 ────────────────────────────────────────────── */
.section-title {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase; margin: 20px 2px 8px;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px;
}
.btn {
  border: 0; border-radius: 11px; padding: 13px 16px; font-weight: 700;
  background: var(--steel); color: #fff; cursor: pointer; font-size: 15px;
}
.btn:active { transform: translateY(1px); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--alert); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; }
.btn.sm { padding: 9px 12px; font-size: 13px; border-radius: 9px; }

label.f { display: block; margin-bottom: 13px; }
label.f > .lb { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
label.f .req { color: var(--alert); }
input.i, select.i, textarea.i {
  width: 100%; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; outline: none;
}
input.i:focus, select.i:focus, textarea.i:focus { border-color: var(--steel); box-shadow: 0 0 0 3px var(--steel-soft); }
textarea.i { min-height: 110px; resize: vertical; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 유형 선택 (큰 터치 타겟) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on[data-tone="alert"] { background: var(--alert); border-color: var(--alert); }
.chip.on[data-tone="amber"] { background: var(--amber); border-color: var(--amber); }
.chip.on[data-tone="steel"] { background: var(--steel); border-color: var(--steel); }

/* ─── 민원 카드: 왼쪽 상태 레일이 시그니처 ─────────────────── */
.list { display: grid; gap: 10px; }
@media (min-width: 860px) { .list { grid-template-columns: 1fr 1fr; } }

.mw {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 13px 13px 20px; cursor: pointer; overflow: hidden;
}
.mw::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--rail, var(--muted));
}
.mw.done::before { background: repeating-linear-gradient(180deg, var(--steel) 0 4px, #fff 4px 8px); }
.mw .head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mw .tno { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: -.02em; }
.mw .badge {
  margin-left: auto; font-size: 11px; font-weight: 800; padding: 3px 8px;
  border-radius: 6px; background: var(--steel-soft); color: var(--steel);
}
.mw .badge.open { background: #fbe9e5; color: var(--alert); }
.mw .badge.work { background: #f4eddc; color: var(--amber); }
.mw .badge.hold { background: #eceeed; color: var(--muted); }
.mw .fac { font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; }
.mw .type { font-size: 12.5px; font-weight: 700; color: var(--rail, var(--muted)); }
.mw .body {
  font-size: 13.5px; color: #384843; margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mw .foot {
  display: flex; align-items: center; gap: 10px; margin-top: 9px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.mw .dplus { margin-left: auto; font-weight: 700; color: var(--alert); }

/* ─── 통계 ─────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 13px; }
.kpi .n { font-family: var(--mono); font-size: 27px; font-weight: 700; letter-spacing: -.03em; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi.warn .n { color: var(--alert); }

.bar { display: flex; align-items: center; gap: 9px; margin: 9px 0; }
.bar .nm { width: 112px; font-size: 12.5px; font-weight: 600; flex: none; line-height: 1.25; }
.bar .tr { flex: 1; height: 9px; background: #e6ebe9; border-radius: 5px; overflow: hidden; display: block; }
.bar .fl { display: block; height: 100%; min-width: 4px; border-radius: 5px; }
.bar .vl { font-family: var(--mono); font-size: 12px; width: 34px; text-align: right; color: var(--muted); }

/* ─── 사진 ─────────────────────────────────────────────────── */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f4f6f5; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .x {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0;
  border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 13px; cursor: pointer; line-height: 1;
}
.addphoto {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff;
  color: var(--muted); font-size: 11.5px; font-weight: 600; cursor: pointer;
}

/* ─── 시트(모달) ───────────────────────────────────────────── */
.sheet-bg {
  position: fixed; inset: 0; z-index: 60; background: rgba(12,20,17,.45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--paper); width: 100%; max-width: 720px;
  max-height: 94dvh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(22px); opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet .sh {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); background: var(--paper);
  border-radius: 18px 18px 0 0; position: sticky; top: 0;
}
.sheet .sh h2 { margin: 0; font-size: 16.5px; font-weight: 800; letter-spacing: -.02em; }
.sheet .sh .x { margin-left: auto; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--muted); }
.sheet .sb { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet .sf {
  padding: 12px 16px calc(14px + var(--safe-b)); border-top: 1px solid var(--line);
  background: var(--paper); display: flex; gap: 9px;
}
.sheet .sf .btn { flex: 1; }

/* ─── 기타 ─────────────────────────────────────────────────── */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 5px; }
.toast {
  position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 17px; border-radius: 11px;
  font-size: 14px; font-weight: 600; z-index: 90; max-width: 88vw;
}
.toast.err { background: var(--alert); }
.filters { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex: none; padding: 7px 12px; font-size: 13px; }
.dl { display: grid; grid-template-columns: 82px 1fr; gap: 6px 10px; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 600; font-size: 13px; }
.dl dd { margin: 0; font-weight: 600; }
.hr { height: 1px; background: var(--line); margin: 15px 0; border: 0; }
.logline { font-size: 12.5px; color: var(--muted); padding: 5px 0; border-bottom: 1px dashed var(--line); }
.logline b { color: var(--ink); }
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 22px; }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { font-size: 23px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 3px; }
.login-box p { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }

.rangebar { display: flex; gap: 7px; margin-bottom: 12px; }
.rangebar .chip { flex: 1; text-align: center; padding: 8px 0; font-size: 13px; }
.daterow { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 4px 0 12px; }
.daterow .tilde { color: var(--muted); font-size: 13px; }
.daterow .lbl { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: -2px; }

.listhead {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 2px 9px; font-size: 12px; color: var(--muted); font-weight: 600;
}
.listhead button { margin-left: auto; }

.typefilter { margin-bottom: 4px; }
.typefilter .chip { padding: 7px 12px; font-size: 13px; }
.typerow { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.typerow .dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.typerow .nm { font-weight: 600; font-size: 14px; }
.typerow button { margin-left: auto; }

.fold {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 11px 13px; margin: 8px 0 0; cursor: pointer;
  font-size: 13.5px; font-weight: 700; color: var(--ink); text-align: left;
}
.fold.open { border-color: var(--steel); border-radius: 11px 11px 0 0; border-bottom-color: transparent; }
.fold .ar { margin-left: auto; color: var(--muted); font-size: 10px; }
.fold .tags { display: flex; gap: 5px; flex-wrap: wrap; }
.fold .tags i {
  font-style: normal; font-size: 11.5px; font-weight: 700;
  background: var(--steel-soft); color: var(--steel); padding: 2px 7px; border-radius: 6px;
}
.foldbody {
  border: 1px solid var(--steel); border-top: 0; border-radius: 0 0 11px 11px;
  background: #fff; padding: 12px 13px 13px; margin-bottom: 12px;
}
.foldbody .daterow { margin-bottom: 10px; }
.foldbody .typefilter { margin-bottom: 12px; }

.typerow .uid { font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-weight: 500; }
.rolebadge {
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px;
  background: #eceeed; color: var(--muted); margin-left: auto;
}
.rolebadge.admin { background: var(--ink); color: #fff; }
.rolebadge.agent { background: var(--steel-soft); color: var(--steel); }
.typerow .rolebadge + button { margin-left: 8px; }

/* ─── 사진 뷰어 ────────────────────────────────────────────── */
.viewer {
  position: fixed; inset: 0; z-index: 100;
  background: #0b0f0d;
  display: flex; flex-direction: column;
  animation: fadein .16s ease-out;
}
@keyframes fadein { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .viewer { animation: none; } }

.viewer .vbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 12px) 14px 12px;
  color: #fff; flex: none;
}
.viewer .vtitle { font-size: 14px; font-weight: 700; }
.viewer .vcount {
  font-family: var(--mono); font-size: 12.5px;
  color: rgba(255,255,255,.65);
}
.viewer .vx {
  margin-left: auto; border: 0; cursor: pointer;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: 14px; font-weight: 700;
  padding: 10px 16px; border-radius: 10px;
  min-height: 44px;
}
.viewer .vx:active { background: rgba(255,255,255,.3); }

.viewer .vstage {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 4px 10px;
}
.viewer .vstage img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 6px;
  background: #000;
}

.viewer .vfoot {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 12px 14px calc(16px + var(--safe-b));
}
.viewer .vnav, .viewer .vback {
  border: 0; cursor: pointer; border-radius: 10px;
  min-height: 44px; font-weight: 700; font-size: 13.5px;
}
.viewer .vnav {
  background: rgba(255,255,255,.14); color: #fff; padding: 11px 14px; flex: none;
}
.viewer .vback {
  flex: 1; background: #fff; color: var(--ink); padding: 11px 12px;
}
.viewer .vnav:active { background: rgba(255,255,255,.28); }

/* 썸네일이 눌러서 크게 볼 수 있음을 알림 */
.thumb img[data-full] { cursor: zoom-in; }

.statbtns { display: grid; gap: 9px; margin-top: 16px; }
@media (min-width: 620px) { .statbtns { grid-template-columns: 1fr 1fr; } }

/* ─── 대분류 묶음 ──────────────────────────────────────────── */
.tgroup { margin-bottom: 12px; }
.tgh {
  font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
  color: var(--steel); margin: 12px 0 6px;
  display: flex; align-items: center; gap: 7px;
}
.tgh::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tgroup:first-child .tgh { margin-top: 0; }
.typefilter.sub {
  margin-top: -4px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.mw .type .cat {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  color: var(--muted); background: #eef1f0; border-radius: 5px;
  padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}

.editnote {
  font-size: 12.5px; color: var(--alert); font-weight: 600;
  background: #fbe9e5; border-radius: 9px; padding: 9px 11px; margin-bottom: 13px;
  line-height: 1.5;
}
#editmode.danger { background: var(--alert); color: #fff; border-color: var(--alert); }

/* ─── 새 버전 알림 ─────────────────────────────────────────── */
.updbar {
  position: fixed; left: 12px; right: 12px; z-index: 95;
  bottom: calc(78px + var(--safe-b));
  background: var(--ink); color: #fff;
  border-radius: 12px; padding: 11px 12px 11px 15px;
  display: flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(12, 20, 17, .28);
}
.updbar button {
  margin-left: auto; border: 0; cursor: pointer;
  background: #fff; color: var(--ink);
  font-weight: 800; font-size: 13px;
  padding: 9px 14px; border-radius: 9px; min-height: 40px;
}

/* ─── 시설 자동 표시 ───────────────────────────────────────── */
.facinfo {
  background: var(--steel-soft); border: 1px solid #cfe3dc;
  border-radius: 11px; padding: 11px 12px; margin: -4px 0 13px;
  font-size: 13px; line-height: 1.5;
}
.facinfo .facreg {
  display: inline-block; font-size: 11px; font-weight: 800;
  background: var(--steel); color: #fff; border-radius: 5px;
  padding: 2px 7px; margin-bottom: 7px;
}
.facinfo .facrow { display: flex; gap: 9px; padding: 2px 0; }
.facinfo .facrow b {
  flex: none; width: 52px; font-size: 12px; font-weight: 700; color: var(--steel);
}
.facinfo .facrow span { flex: 1; color: #26372F; word-break: keep-all; }
.facinfo .facrow.driver { margin-top: 5px; padding-top: 6px; border-top: 1px dashed #b9d5cb; }
.facinfo .facrow i {
  font-style: normal; font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); margin-left: 5px;
}
.facinfo a { font-weight: 700; }

/* ─── 통계 기간 · 주간 집계 ────────────────────────────────── */
.periodbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 13px; margin-bottom: 12px;
}
.periodbar b { font-size: 14px; font-weight: 800; }
.periodbar span { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.periodbar i {
  font-style: normal; font-size: 11.5px; font-weight: 700;
  background: var(--steel-soft); color: var(--steel);
  border-radius: 6px; padding: 2px 8px;
}
.wkrow { display: flex; align-items: center; gap: 9px; margin: 9px 0; }
.wkrow .wk { width: 118px; flex: none; font-size: 12px; font-weight: 700; font-family: var(--mono); letter-spacing: -.3px; }
.wkrow .tr { flex: 1; height: 9px; background: #e6ebe9; border-radius: 5px; overflow: hidden; display: block; }
.wkrow .fl { display: block; height: 100%; min-width: 4px; border-radius: 5px; }
.wkrow .wv { width: 62px; text-align: right; font-size: 12.5px; font-weight: 700; font-family: var(--mono); }
.wkrow .wv em { display: block; font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--muted); }

.facrow2 { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.facrow2 .l1 { display: flex; align-items: center; gap: 7px; }
.facrow2 .l1 b { font-size: 14px; font-weight: 700; }
.facrow2 .rg {
  font-size: 10.5px; font-weight: 800; color: var(--steel);
  background: var(--steel-soft); border-radius: 5px; padding: 2px 6px; flex: none;
}
.facrow2 .l2 { font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

/* ─── 시설 식수 ────────────────────────────────────────────── */
.facinfo .facrow.meal { margin-top: 5px; padding-top: 6px; border-top: 1px dashed #b9d5cb; align-items: flex-start; }
.mealtbl { border-collapse: collapse; width: 100%; }
.mealtbl th {
  text-align: left; font-size: 11.5px; font-weight: 700; color: var(--steel);
  padding: 1px 8px 1px 0; white-space: nowrap; width: 44px;
}
.mealtbl td { font-size: 12.5px; padding: 1px 0; color: #26372F; }
.mealtbl td.tt {
  text-align: right; font-family: var(--mono); font-size: 11.5px;
  font-weight: 700; color: var(--steel); width: 34px; white-space: nowrap;
}
.facinfo .facrow.meal em {
  display: block; font-style: normal; font-size: 11px;
  color: var(--muted); margin-top: 4px;
}

.mealsum { width: 100%; border-collapse: collapse; }
.mealsum th {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  padding: 4px 3px; text-align: right; border-bottom: 1px solid var(--line);
}
.mealsum tr:first-child th { text-align: right; }
.mealsum tr th:first-child { text-align: left; color: var(--ink); }
.mealsum td {
  font-family: var(--mono); font-size: 12.5px; text-align: right;
  padding: 5px 3px; border-bottom: 1px dashed var(--line);
}
.mealsum td.tt { font-weight: 700; color: var(--steel); }
.weekbox {
  margin-top: 10px; background: var(--steel-soft); border-radius: 9px;
  padding: 9px 11px; font-size: 13px; font-weight: 600; color: var(--steel);
}
.weekbox b { font-family: var(--mono); font-size: 15px; }
.weekbox em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; }

/* ─── 조치 결과 요약 ───────────────────────────────────────── */
.resultbox {
  background: #f4f7f6; border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px;
}
.resultbox .rtag {
  display: inline-block; font-size: 12.5px; font-weight: 800;
  background: var(--steel); color: #fff; border-radius: 6px;
  padding: 3px 10px; margin-bottom: 7px;
}
.resultbox .rmethod {
  font-size: 12.5px; font-weight: 600; color: var(--steel);
  margin-bottom: 6px; line-height: 1.5;
}
.resultbox .rtext { font-size: 14px; white-space: pre-wrap; color: #26372F; }
.resultbox .dl dt { font-size: 12px; }
.resultbox .dl dd { font-size: 13px; }

/* 상세 화면 식수 */
.mealrow {
  margin-top: 11px; background: var(--steel-soft);
  border-radius: 10px; padding: 9px 11px;
}
.mealrow > b {
  display: block; font-size: 12px; font-weight: 800;
  color: var(--steel); margin-bottom: 4px;
}
.mealrow em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 3px; }

.chip.sm2 { padding: 8px 11px; font-size: 12.5px; }

/* ─── 유형 다중 선택 ───────────────────────────────────────── */
.tpspick {
  margin-top: 9px; background: #f2f5f4; border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.tpspick b { color: var(--ink); font-weight: 700; }
.tpspick i {
  font-style: normal; font-size: 10.5px; font-weight: 800;
  background: var(--ink); color: #fff; border-radius: 4px;
  padding: 1px 5px; margin-left: 4px; vertical-align: 1px;
}
.mw .type .more {
  display: inline-block; font-size: 10.5px; font-weight: 800;
  background: #eef1f0; color: var(--muted);
  border-radius: 5px; padding: 1px 6px; margin-left: 5px; vertical-align: 1px;
}
.typelist { display: inline-flex; flex-wrap: wrap; gap: 5px; vertical-align: middle; }
.typelist .tp {
  font-size: 12px; font-weight: 700; color: #fff;
  border-radius: 6px; padding: 3px 9px;
}

/* ─── 사후관리 ─────────────────────────────────────────────── */
.fuprow {
  display: flex; gap: 9px; margin-top: 9px; padding-top: 8px;
  border-top: 1px dashed var(--line); font-size: 13px;
}
.fuprow > b { flex: none; width: 58px; font-size: 12px; font-weight: 700; color: var(--amber); }
.fuprow span { flex: 1; font-weight: 600; color: #26372F; line-height: 1.5; }
.fuprow i {
  font-style: normal; font-family: var(--mono); font-size: 11.5px;
  color: var(--muted); margin-left: 5px;
}
.fuprow em { display: block; font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ─── 엑셀 가져오기 ────────────────────────────────────────── */
.impnote {
  font-size: 12.5px; color: #384843; line-height: 1.65;
  background: var(--steel-soft); border-radius: 9px; padding: 10px 12px; margin-bottom: 12px;
}
.impnote b { color: var(--steel); }
.impfile {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--line); border-radius: 11px;
  padding: 18px 12px; margin-bottom: 13px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--muted); background: #fff;
  text-align: center; word-break: break-all;
}
.impfile:active { border-color: var(--steel); }
.impwait { font-size: 13px; color: var(--muted); padding: 10px 0; }
.imperr {
  font-size: 13px; color: var(--alert); background: #fbe9e5;
  border-radius: 9px; padding: 10px 12px; margin-top: 11px; line-height: 1.5;
}
.impsum {
  background: #f2f5f4; border-radius: 9px; padding: 10px 12px; margin-top: 12px;
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
}
.impsum b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 3px; }
.impsum span { display: block; }
.impsum em { display: block; font-style: normal; color: var(--amber); margin-top: 3px; }
.impdone {
  background: var(--steel-soft); color: var(--steel); border-radius: 9px;
  padding: 11px 12px; margin-top: 10px; font-size: 13px; font-weight: 700; line-height: 1.6;
}
.impdone span { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.improw { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.improw .l1 { display: flex; align-items: center; gap: 7px; }
.improw .l1 b { font-size: 13.5px; }
.improw .st {
  font-size: 10.5px; font-weight: 800; border-radius: 5px; padding: 2px 6px;
  background: #eef1f0; color: var(--muted); flex: none;
}
.improw .st.new { background: var(--steel); color: #fff; }
.improw .l2 { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.improw .l2.meal { color: var(--steel); font-weight: 600; }

/* 식수 변경 이력 */
.loglinebox { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.loglinebox .l1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.loglinebox .l1 b { font-size: 13.5px; }
.loglinebox .src {
  font-size: 10.5px; font-weight: 700; background: var(--steel-soft);
  color: var(--steel); border-radius: 5px; padding: 2px 6px;
}
.loglinebox .dt { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.loglinebox .l2 { font-size: 12.5px; color: #26372F; margin-top: 3px; line-height: 1.5; }
.loglinebox .l3 { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ─── 주간 리포트 ──────────────────────────────────────────── */
.tabbar { grid-template-columns: repeat(5, 1fr); }
.tabbar button { font-size: 10.5px; }

.repctl { margin-bottom: 12px; }
.rephead { display: flex; align-items: center; gap: 9px; }
.rephead .btn { flex: none; }
.repweek {
  flex: 1; text-align: center; font-family: var(--mono);
  font-size: 13.5px; font-weight: 700; letter-spacing: -.3px;
}
.repsum {
  font-size: 12.5px; color: var(--muted); font-weight: 600;
  margin: 0 2px 10px;
}

.repcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px; margin-bottom: 11px;
}
.rc-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.rc-name { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.rc-name .rg {
  font-size: 10.5px; font-weight: 800; color: var(--steel);
  background: var(--steel-soft); border-radius: 5px; padding: 2px 6px; margin-right: 6px;
  vertical-align: 2px;
}
.rc-meta { font-size: 12.5px; color: var(--muted); }
.rc-stat {
  display: flex; gap: 12px; margin: 9px 0 4px; padding: 7px 10px;
  background: #f4f7f6; border-radius: 8px; font-size: 12px; color: var(--muted);
}
.rc-stat b { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.rc-stat .good b { color: var(--steel); }
.rc-stat .bad b { color: var(--alert); }

.rc-day { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.rc-day:last-child { border-bottom: 0; }
.rc-day.none { opacity: .45; padding: 4px 0; }
.rc-day .dt { flex: none; width: 54px; }
.rc-day .dt b { display: block; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.rc-day .dt i { font-style: normal; font-size: 11px; color: var(--muted); }
.rc-day .dv { flex: 1; min-width: 0; }
.rc-day .no { font-size: 12px; color: var(--muted); }

.rc-item { padding: 2px 0 6px; }
.rc-item + .rc-item { border-top: 1px dotted var(--line); padding-top: 6px; }
.rc-item .ty { font-size: 12.5px; font-weight: 700; color: var(--steel); margin-bottom: 2px; }
.rc-item .ty .sat, .rc-item .ty .st {
  font-size: 10.5px; font-weight: 800; border-radius: 5px;
  padding: 1px 6px; margin-left: 5px; background: #eef1f0; color: var(--muted);
}
.rc-item .ty .sat.g { background: var(--steel-soft); color: var(--steel); }
.rc-item .ty .sat.b { background: #fbe9e5; color: var(--alert); }
.rc-item .ct { font-size: 13.5px; line-height: 1.5; }
.rc-item .ac { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.rc-item .ac b { color: #384843; font-weight: 700; margin-right: 3px; }
.rc-item .ac.res b { color: var(--steel); }
.rc-item .ac.add b { color: var(--amber); }

.fuprow .satv {
  display: inline-block; font-size: 12px; font-weight: 800;
  background: #eef1f0; color: var(--muted);
  border-radius: 6px; padding: 2px 10px;
}
.fuprow .satv.g { background: var(--steel-soft); color: var(--steel); }
.fuprow .satv.b { background: #fbe9e5; color: var(--alert); }
.repweek { font-size: 12.5px; letter-spacing: -.5px; }

/* ─── 일별 기록 · 추가내용 ─────────────────────────────────── */
.rc-day.thin { padding: 4px 0; }
.rc-day.thin .dt { opacity: .5; }
.addday {
  border: 1px dashed var(--line); background: #fff; color: var(--muted);
  border-radius: 8px; padding: 5px 10px; font-size: 11.5px; font-weight: 700;
  cursor: pointer; margin-top: 3px;
}
.addday:active { border-color: var(--steel); color: var(--steel); }
.rc-item.entry { border-left: 3px solid var(--amber); padding-left: 8px; }
.rc-item .ty .st.ent { background: #f4eddc; color: var(--amber); }
.rc-item .ac i {
  font-style: normal; font-size: 10.5px; color: #9aa8a3; margin-left: 5px;
}
.rc-btns { display: flex; gap: 6px; margin-top: 5px; }
.mini {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 7px; padding: 4px 9px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.mini:active { border-color: var(--steel); color: var(--steel); }

.adrow { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.adrow .t { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.adrow .m {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--muted); margin-top: 3px;
}
.adrow .m .mini { margin-left: auto; }
.btn.danger-txt { color: var(--alert); }
