/* DOORI 마스터 블록판 · 식당 · 음식픽업
   6번 하이브리드 실무형 허브 — 딥네이비·오션블루·아이스그레이·화이트 카드, Pretendard, 이모지 0 */
:root {
  --navy: #1E372B;
  --navy-2: #2A4638;
  --ocean: #2F5544;
  --teal: #3C5A4A;
  --bg: #F2EFE6;
  --card: #FAF8F3;
  --line: #E2DBC9;
  --line-soft: #EAE6DA;
  --ink: #1E372B;
  --ink-2: #39443A;
  --muted: #6E7568;
  --muted-2: #969C8F;
  --soft: #F7F4EC;
  --green: #3B604E;
  --amber: #8C7753;
  --red: #A26D60;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(30, 55, 43, .04), 0 10px 26px -20px rgba(30, 55, 43, .3);
  --shadow-up: 0 -6px 24px -18px rgba(30, 55, 43, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; letter-spacing: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--ocean); }
h1, h2, h3, p { margin: 0; }
svg { display: block; flex: 0 0 auto; }

.app { min-height: 100dvh; }

/* ───────── 상단 헤더 ───────── */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 243, .97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px 7px;
  max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.brand-icon {
  height: 34px; padding: 0 10px; border-radius: 10px; flex: 0 0 auto;
  background: #E6E0D1; color: #234234; display: grid; place-items: center;
  border: 1px solid rgba(35, 66, 52, .12);
}
.brand-word { display: block; }
.brand-txt { min-width: 0; }
.brand-txt h1 {
  font-size: 16px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-txt p {
  font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sync {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #FAF8F3;
  padding: 7px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  flex: 0 0 auto; max-width: 44vw;
}
.sync-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #9AB2A6; flex: 0 0 auto; }
.sync.hub-link {
  background: var(--navy); border-color: var(--navy); color: #FAF8F3;
  text-decoration: none; padding: 7px 12px; font-weight: 800;
}
.sync.hub-link:hover { background: var(--navy-2); border-color: var(--navy-2); }
.sync.saved { color: #263F33; border-color: #D9DDD3; background: #F0F2EE; }
.sync.saved .sync-dot { background: var(--green); }
.sync.saving { color: #698C7B; border-color: #ECEAE2; background: #F5F4EF; }
.sync.saving .sync-dot { background: var(--ocean); animation: pulse 1s infinite; }
.sync.error { color: #79443B; border-color: #EADFDC; background: #F4EDEC; }
.sync.error .sync-dot { background: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.boardbar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px 9px; max-width: 1200px; margin: 0 auto;
}
.boardbtn {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  background: #F5F4EF; border: 1px solid var(--line); border-radius: 13px;
  padding: 9px 12px; text-align: left;
}
.boardbtn .bico {
  width: 32px; height: 32px; border-radius: 10px; background: var(--navy); color: #FAF8F3;
  display: grid; place-items: center; flex: 0 0 auto;
}
.boardbtn .btxt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; gap: 1px; }
.boardbtn .btxt .bl { font-size: 10px; font-weight: 700; color: var(--muted-2); letter-spacing: -0.01em; }
.boardbtn .btxt strong {
  font-size: 14px; font-weight: 800; letter-spacing: -0.035em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.boardbtn .bnum {
  font-size: 11px; font-weight: 800; color: var(--teal);
  background: #F5F4EF; border: 1px solid #E7E4DA; border-radius: 7px;
  padding: 2px 7px; flex: 0 0 auto;
}
.boardbtn .bchev { color: var(--muted-2); display: grid; place-items: center; transform: rotate(0deg); }

.stats {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 18px 10px; max-width: 1200px; margin: 0 auto;
}
.stat {
  flex: 0 0 auto; font-size: 11px; font-weight: 650; color: var(--muted);
  background: var(--soft); border: 1px solid var(--line-soft);
  border-radius: 8px; padding: 3px 9px; white-space: nowrap;
}
.stat b { color: var(--ink); font-weight: 800; }
.stat.warn { color: #6B3C35; background: #E6E0D1; border-color: #E1DACB; }
.stat.warn b { color: #6B3C35; }

/* ───────── 본문 ───────── */
.main { max-width: 1200px; margin: 0 auto; padding: 16px 16px 132px; }
.pad { display: flex; flex-direction: column; gap: 16px; }

.btn {
  border: 1px solid var(--line); background: #FAF8F3; color: var(--ink);
  border-radius: 11px; padding: 10px 13px; font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  line-height: 1.2; white-space: nowrap;
}
.btn.primary { background: var(--navy); border-color: var(--navy); color: #FAF8F3; }
.btn.ghost { background: var(--soft); }
.btn.danger { color: var(--red); border-color: #E6D8D5; background: #F4EDEC; }
.btn.small { padding: 8px 11px; font-size: 11.5px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.board-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.board-actions .grow { flex: 1; }
.icon-btn {
  border: 1px solid var(--line); background: #FAF8F3; color: var(--muted);
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto;
}
.icon-btn.danger { color: var(--red); border-color: #E6D8D5; }

/* ───────── 3단 세그먼트 ───────── */
.segbar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  background: #F3F1EC; border: 1px solid #EDEAE2; border-radius: 15px; padding: 5px;
}
.seg-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; background: transparent; color: #5B786A;
  border-radius: 11px; padding: 11px 6px; font-size: 13px; font-weight: 750;
  letter-spacing: -0.03em; transition: background .14s, color .14s, box-shadow .14s;
  min-width: 0;
}
.seg-btn .seg-ico { display: grid; place-items: center; color: #7E9D8E; }
.seg-btn .seg-label { white-space: nowrap; }
.seg-btn .seg-n {
  font-size: 11px; font-weight: 800; color: #6F9280;
  background: #FAF8F3; border-radius: 999px; padding: 1px 7px; min-width: 24px; text-align: center;
}
.seg-btn.on {
  background: var(--navy); color: #FAF8F3; box-shadow: 0 6px 16px -10px rgba(30, 55, 43, .7);
}
.seg-btn.on .seg-ico { color: #FAF8F3; }
.seg-btn.on .seg-n { background: rgba(250, 248, 243, .16); color: #FAF8F3; }

/* ───────── 검색 / 필터 ───────── */
.toolbar { display: flex; gap: 8px; align-items: center; }
.searchbar {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 0 13px; height: 46px; box-shadow: var(--shadow);
}
.searchbar svg { color: var(--muted-2); }
.searchbar input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 13.5px; height: 100%;
}
.searchbar input::placeholder { color: #9FB6AA; }
.search-clear {
  border: 0; background: #F5F4EF; color: var(--muted);
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
}
.filterbtn {
  flex: 0 0 auto; height: 46px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #FAF8F3; color: var(--muted);
  border-radius: 13px; padding: 0 13px; font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow);
}
.filterbtn.on { color: var(--ocean); border-color: #E8E4DA; background: #F5F4EF; }

.filterpanel {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow);
}
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow);
}
.frow { display: flex; align-items: center; gap: 10px; }
.flabel { flex: 0 0 40px; font-size: 11px; font-weight: 800; color: var(--muted-2); }
.fchips { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }

.chip {
  border: 1px solid var(--line); background: #FAF8F3; color: #3D7158;
  border-radius: 999px; padding: 5px 11px; font-size: 11.5px; font-weight: 650;
  line-height: 1.35; transition: background .12s, color .12s, border-color .12s;
  max-width: 100%; text-align: left; overflow-wrap: anywhere;
}
.chip.on { background: var(--navy); color: #FAF8F3; border-color: var(--navy); }
.chip.small { padding: 4px 9px; font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ───────── 블록판 머리말·그리드 ───────── */
.list-region { display: flex; flex-direction: column; gap: 10px; }
.board-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 2px 0; font-size: 12px; color: var(--muted-2); font-weight: 600;
}
.board-meta b { color: var(--ink-2); font-weight: 800; }
.board-meta .btn { flex: 0 0 auto; }

.grid { display: flex; flex-direction: column; gap: 9px; }

.tile {
  display: flex; align-items: flex-start; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 13px 13px 14px;
  transition: border-color .14s, box-shadow .14s, transform .14s;
}
.tile:hover { border-color: #E8E5DC; box-shadow: 0 2px 4px rgba(30, 55, 43, .05), 0 14px 28px -22px rgba(30, 55, 43, .4); }
.tile-main {
  flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 12px;
  border: 0; background: transparent; text-align: left; padding: 0;
}
.tile-ico {
  width: 36px; height: 36px; border-radius: 11px; flex: 0 0 auto;
  background: #F5F4EF; color: var(--navy-2); display: grid; place-items: center;
  border: 1px solid #F2F0EB;
}
.tile.off .tile-ico { background: #F5F4EF; color: #9AB2A6; border-color: var(--line-soft); }
.tile-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.tile-name {
  font-size: 14.8px; font-weight: 780; letter-spacing: -0.035em; color: var(--ink);
  overflow-wrap: anywhere; line-height: 1.35;
}
.tile.off .tile-name { color: #809F90; }
.tile-sub {
  font-size: 12.4px; color: #6C907E; font-weight: 500; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.tile-foot { font-size: 11.3px; color: var(--muted-2); font-weight: 650; letter-spacing: -0.01em; }
.tile.dim .tile-name { color: #A28B62; }

.switch {
  flex: 0 0 auto; width: 44px; height: 26px; border-radius: 99px;
  background: #DFDBCD; border: 0; position: relative; padding: 0; transition: background .16s;
  margin-top: 2px;
}
.switch span {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #FAF8F3; transition: left .16s;
  box-shadow: 0 1px 2px rgba(30, 55, 43, .22);
}
.switch.on { background: var(--ocean); }
.switch.on span { left: 21px; }

.group-sec { display: flex; flex-direction: column; gap: 8px; }
.ghead {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: transparent; padding: 10px 2px 2px; text-align: left;
}
.ghead.static { cursor: default; }
.ghead-name {
  font-size: 12.5px; font-weight: 800; color: var(--ink-2); letter-spacing: -0.03em;
  overflow-wrap: anywhere; min-width: 0;
}
.ghead-n {
  font-size: 10.5px; font-weight: 800; color: var(--muted-2);
  background: #F4F2ED; border-radius: 999px; padding: 1px 7px;
}
.ghead-go { margin-left: auto; color: #CFC9B5; display: grid; place-items: center; }

/* ───────── 상세(드릴다운) ───────── */
.detail { display: flex; flex-direction: column; gap: 14px; padding-bottom: 4px; }
.dbar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.backbtn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line); background: #FAF8F3; color: var(--ink-2);
  border-radius: 11px; padding: 9px 11px; font-size: 12px; font-weight: 750;
  box-shadow: var(--shadow);
}
.crumb {
  display: flex; align-items: center; gap: 3px; min-width: 0; overflow-x: auto;
  font-size: 11.5px; color: var(--muted-2); font-weight: 650;
  scrollbar-width: none; -ms-overflow-style: none;
}
.crumb::-webkit-scrollbar { display: none; }
.crumb-link {
  border: 0; background: transparent; color: var(--muted); font-size: 11.5px;
  font-weight: 700; padding: 3px 4px; border-radius: 7px; white-space: nowrap;
}
.crumb-link:hover { background: #F5F4EF; color: var(--navy); }
.crumb-sep { color: #DAD5C5; display: grid; place-items: center; }
.crumb-cur {
  color: var(--ink); font-weight: 800; white-space: nowrap;
  max-width: 46vw; overflow: hidden; text-overflow: ellipsis;
}

.scard {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 9px;
}
.sc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-top .lvl {
  font-size: 10.5px; font-weight: 800; border-radius: 7px; padding: 3px 9px;
  background: var(--navy); color: #FAF8F3; letter-spacing: -0.01em;
}
.sc-top .lvl.medium { background: var(--ocean); }
.sc-top .lvl.minor { background: var(--teal); }
.mini-switch { display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.mini-switch input { position: absolute; opacity: 0; pointer-events: none; }
.mini-switch span {
  width: 46px; height: 27px; border-radius: 99px; background: #DFDBCD;
  display: block; position: relative; transition: background .16s;
}
.mini-switch span::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #FAF8F3; transition: left .16s;
  box-shadow: 0 1px 2px rgba(30, 55, 43, .22);
}
.mini-switch input:checked + span { background: var(--ocean); }
.mini-switch input:checked + span::after { left: 22px; }

.sc-name {
  font-size: 21px; font-weight: 820; letter-spacing: -0.045em; line-height: 1.32;
  overflow-wrap: anywhere;
}
.sc-feat {
  font-size: 13.2px; color: #597567; font-weight: 500; line-height: 1.62;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: #3D7158;
  background: #F5F4EF; border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px 9px;
  max-width: 100%; overflow-wrap: anywhere;
}
.pill.r-done { color: #263F33; background: #F0F2EE; border-color: #DDE1D7; }
.pill.r-revise { color: #6B3C35; background: #E6E0D1; border-color: #E2DCCD; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #9AB2A6; flex: 0 0 auto; }
.dot.r-done { background: var(--green); }
.dot.r-revise { background: var(--amber); }
.dot.r-todo { background: #9AB2A6; }
.sc-parents {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--muted-2); font-weight: 650;
  border-top: 1px dashed var(--line-soft); padding-top: 9px;
}
.sc-parents button {
  border: 1px solid var(--line); background: #FAF8F3; border-radius: 999px;
  padding: 3px 9px; font-size: 11px; font-weight: 700; color: var(--navy-2);
}

/* 포함된 하위 블럭 */
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.sec-head h2 {
  font-size: 14.5px; font-weight: 800; letter-spacing: -0.035em; color: var(--ink);
  display: flex; align-items: baseline; gap: 6px;
}
.sec-head h2 b { font-size: 13px; color: var(--ocean); font-weight: 850; }
.childgrid { display: flex; flex-direction: column; gap: 8px; }
.child {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 15px;
  box-shadow: var(--shadow); padding: 13px 13px 13px 14px;
  transition: border-color .14s, transform .14s;
}
.child:hover { border-color: #E8E5DC; }
.ch-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: #F5F4EF; color: var(--navy-2); display: grid; place-items: center;
  border: 1px solid #F2F0EB;
}
.ch-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-name {
  font-size: 14px; font-weight: 750; letter-spacing: -0.03em; color: var(--ink);
  display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere;
}
.ch-off {
  font-size: 9.5px; font-weight: 800; color: #86A495; background: #F5F4EF;
  border-radius: 5px; padding: 1px 5px;
}
.ch-sum {
  font-size: 12px; color: #6C907E; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.ch-meta { font-size: 11px; color: var(--muted-2); font-weight: 650; }
.ch-go { color: #CFC9B5; display: grid; place-items: center; flex: 0 0 auto; }
.child-empty {
  background: #F5F4EF; border: 1px dashed var(--line); border-radius: 15px;
  padding: 20px 16px; text-align: center; font-size: 12.5px; color: var(--muted);
}
.child-empty b { color: var(--navy); }

/* 아코디언 */
.acc {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); overflow: hidden;
}
.acc-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: transparent; padding: 16px 17px; text-align: left;
}
.acc-title { font-size: 13.5px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.acc-note {
  margin-left: auto; font-size: 11px; color: var(--muted-2); font-weight: 600;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46%;
}
.acc-chev { color: #98B1A4; display: grid; place-items: center; transition: transform .16s; transform: rotate(-90deg); }
.acc.open .acc-chev { transform: rotate(0deg); }
.acc-body {
  display: none; flex-direction: column; gap: 14px;
  padding: 2px 17px 18px; border-top: 1px solid var(--line-soft);
}
.acc.open .acc-body { display: flex; padding-top: 15px; }

/* 하단 저장 바 */
.dfoot {
  position: sticky; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 30;
  display: flex; align-items: center; gap: 8px;
  background: rgba(250, 248, 243, .97); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 9px 10px; box-shadow: var(--shadow-up);
}
.dfoot .btn.primary { margin-left: auto; padding: 11px 20px; }
.dfoot-state {
  font-size: 11.5px; color: var(--muted-2); font-weight: 650;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.dfoot-state.on { color: var(--ocean); font-weight: 800; }

/* ───────── 폼 ───────── */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span {
  font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.field > span em { font-style: normal; font-weight: 600; color: var(--muted-2); font-size: 10.5px; }
.field input[type="text"], .field input[type="number"], .field textarea, .plainbox {
  width: 100%; border: 1px solid var(--line); background: var(--soft);
  border-radius: 11px; padding: 11px 12px; font-size: 13px; outline: none;
  resize: vertical; min-height: 44px; line-height: 1.6;
}
.field textarea { min-height: 84px; }
.field input:focus, .field textarea:focus, .plainbox:focus {
  border-color: var(--ocean); background: #FAF8F3; box-shadow: 0 0 0 3px rgba(47, 85, 68, .1);
}
.hint { font-size: 11px; color: var(--muted-2); line-height: 1.5; }
.hint strong { color: var(--teal); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sortctl { display: flex; align-items: center; gap: 6px; }
.sortctl input {
  width: 70px; text-align: center; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px; background: var(--soft); outline: none;
}
.locadd { display: flex; gap: 6px; }
.locadd input {
  flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; background: var(--soft); outline: none; font-size: 12px;
}
.reqline {
  display: flex; align-items: center; gap: 9px; background: var(--soft);
  border: 1px solid var(--line-soft); border-radius: 11px; padding: 11px 12px;
  font-size: 12.5px; font-weight: 650; color: var(--ink-2); line-height: 1.45;
}
.reqline input { width: 18px; height: 18px; accent-color: var(--navy); flex: 0 0 auto; }
.fbstate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.imggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.imgempty {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 9px;
  border: 1px dashed var(--line); border-radius: 11px; padding: 13px;
  color: var(--muted); font-size: 12px; line-height: 1.5;
}
.imgempty svg { color: #D2CBB8; }
.thumb {
  position: relative; margin: 0; border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line); background: var(--soft); aspect-ratio: 1 / 1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.imgdel {
  position: absolute; top: 4px; right: 4px; width: 23px; height: 23px;
  border-radius: 50%; border: 0; background: rgba(30, 55, 43, .78); color: #FAF8F3;
  display: grid; place-items: center; padding: 0;
}
.imgdel svg { width: 12px; height: 12px; }

/* ───────── 피드백 탭 ───────── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.fb-card { padding: 16px; display: flex; flex-direction: column; gap: 9px; }
.fb-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.fb-name { font-size: 14.5px; font-weight: 780; letter-spacing: -0.03em; }
.fb-path { font-size: 11px; color: var(--muted-2); margin-top: 2px; overflow-wrap: anywhere; }
.fb-text {
  background: #F7F4EC; border: 1px solid var(--line-soft); border-radius: 11px;
  padding: 11px 12px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.fb-reply {
  border-left: 3px solid #D5DACE; background: #F0F2EE; border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.fb-reply span { display: block; font-size: 10.5px; font-weight: 800; color: #2F4D3E; margin-bottom: 2px; }
.fb-time { font-size: 11px; color: var(--muted-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fb-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fbstat { font-size: 10.5px; font-weight: 800; border-radius: 7px; padding: 2px 8px; border: 1px solid var(--line); flex: 0 0 auto; }
.fbstat.s-pending { color: #6E7568; background: #F5F4EF; }
.fbstat.s-requested { color: #6B3C35; background: #E6E0D1; border-color: #D3CAB4; }
.fbstat.s-done { color: #263F33; background: #F0F2EE; border-color: #D2D7CB; }
.result-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 0 2px; }
.result-head b { color: var(--ink); }

/* ───────── 범위 매트릭스 ───────── */
.matrix-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--muted); padding: 0 2px; }
.matrix { display: flex; flex-direction: column; gap: 8px; }
.mrow {
  display: grid; grid-template-columns: minmax(160px, 1.1fr) repeat(4, minmax(140px, 1fr));
  gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line);
  border-radius: 13px; padding: 12px 14px; box-shadow: var(--shadow);
}
.mrow.head { background: transparent; border: 0; box-shadow: none; padding: 0 14px; font-size: 11px; font-weight: 800; color: var(--muted-2); }
.mname { font-size: 12.5px; font-weight: 700; overflow-wrap: anywhere; }
.mname .lvl { display: inline-block; font-size: 10px; font-weight: 800; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; margin-right: 5px; }
.mcell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mlabel { display: none; font-size: 10.5px; font-weight: 700; color: var(--muted-2); }
.mchips { display: flex; flex-wrap: wrap; gap: 4px; }

/* ───────── 내보내기 ───────── */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 11px;
}
.panel h2 { font-size: 14.5px; font-weight: 800; letter-spacing: -0.03em; }
.panel p { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; line-height: 1.6; }
.kv { display: grid; grid-template-columns: 100px 1fr; gap: 7px 12px; font-size: 12px; }
.kv dt { color: var(--muted-2); font-weight: 700; }
.kv dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 550; }
.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; background: var(--navy); color: #EFEDE7; border-radius: 11px;
  padding: 12px 13px; overflow-x: auto; white-space: pre; letter-spacing: 0; line-height: 1.6;
}
.jsonbox {
  width: 100%; min-height: 220px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--soft); padding: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; line-height: 1.55; letter-spacing: 0; color: #2C5140; resize: vertical;
}
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.statbox { background: var(--soft); border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.statbox span { font-size: 11px; color: var(--muted); font-weight: 650; }
.statbox b { font-size: 19px; font-weight: 850; letter-spacing: -0.04em; }

/* ───────── 하단 탭바 ───────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: rgba(250, 248, 243, .98); border-top: 1px solid var(--line);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  padding-bottom: env(safe-area-inset-bottom); backdrop-filter: blur(14px);
}
.tab {
  border: 0; background: transparent; color: #89A698;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 1px 8px; font-size: 10px; font-weight: 700; white-space: nowrap;
  position: relative; min-height: 58px; letter-spacing: -0.03em;
}
.tab.on { color: var(--navy); }
.tab.on::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--navy);
}
.tab .badge {
  position: absolute; top: 5px; right: calc(50% - 20px);
  background: var(--ocean); color: #FAF8F3; font-size: 9.5px; font-weight: 800;
  border-radius: 99px; padding: 0 5px; min-width: 15px; line-height: 15px; text-align: center;
}

/* ───────── 모달 / 토스트 ───────── */
.modal-back {
  position: fixed; inset: 0; z-index: 120; background: rgba(30, 55, 43, .5);
  display: grid; place-items: center; padding: 18px; backdrop-filter: blur(2px);
}
.modal {
  background: #FAF8F3; border-radius: 18px; width: 100%; max-width: 400px;
  padding: 20px; display: flex; flex-direction: column; gap: 11px;
  box-shadow: 0 24px 60px rgba(30, 55, 43, .32);
}
.modal h3 { font-size: 16px; font-weight: 820; letter-spacing: -0.035em; }
.modal p { font-size: 12.5px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.modal .row { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.modal .row.end { justify-content: flex-end; }
.modal .row.between { justify-content: space-between; align-items: center; gap: 10px; }
.modal .row.between .row { margin: 0; }
.modal.wide { max-width: 560px; max-height: 88dvh; overflow-y: auto; }
.mtop { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mtop-sub { margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.55; }

/* 조립(넣기·빼기) */
.picklist {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 52dvh; overflow-y: auto; border: 1px solid var(--line-soft);
  border-radius: 13px; padding: 6px; background: #F5F4EF;
}
.pickrow {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px;
  border-radius: 10px; cursor: pointer; background: #FAF8F3; border: 1px solid transparent;
}
.pickrow + .pickrow { margin-top: 2px; }
.pickrow.on { border-color: #E9E6DC; background: #F5F4EF; }
.pickrow input { width: 19px; height: 19px; accent-color: var(--ocean); flex: 0 0 auto; margin-top: 1px; }
.pick-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.pick-name { font-size: 13px; font-weight: 750; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.pick-sub {
  font-size: 11.5px; color: #6C907E; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pick-meta { font-size: 10.5px; color: var(--muted-2); font-weight: 650; }
.pickrow.on .pick-meta { color: var(--ocean); }
.pick-check { color: var(--ocean); display: grid; place-items: center; margin-top: 2px; opacity: 0; }
.pickrow.on .pick-check { opacity: 1; }
.pick-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 11px;
}
.pick-actions { display: flex; gap: 6px; margin-left: auto; }

/* 판 전환 */
.boardlist { display: flex; flex-direction: column; gap: 6px; }
.boardrow { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: #FAF8F3; }
.boardrow.cur { border-color: #E4E1D6; background: #F5F4EF; }
.bpick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; padding: 7px; text-align: left; }
.bmark { width: 28px; height: 28px; border-radius: 9px; background: #F5F4EF; color: var(--muted); display: grid; place-items: center; flex: 0 0 auto; }
.boardrow.cur .bmark { background: var(--navy); color: #FAF8F3; }
.bmeta2 { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bmeta2 strong { font-size: 13px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmeta2 em { font-style: normal; font-size: 10.5px; color: var(--muted-2); }
.tag { font-size: 10px; font-weight: 800; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); background: var(--soft); flex: 0 0 auto; }
.clonebox { border: 1px solid var(--line-soft); border-radius: 13px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: #F5F4EF; }
.clonebox .gtitle { font-size: 11.5px; font-weight: 800; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.clonebox .gtitle em { font-style: normal; font-weight: 600; font-size: 10.5px; color: var(--muted-2); }
.muted { color: var(--muted-2); font-weight: 500; }
.pathline { font-size: 11px; color: var(--muted-2); font-weight: 600; overflow-wrap: anywhere; }

.empty {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 36px 20px; text-align: center; color: var(--muted);
  font-size: 13px; display: flex; flex-direction: column; gap: 9px; align-items: center;
}
.empty b { color: var(--ink); font-size: 14.5px; }
.empty svg { color: #D2CBB8; }

.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 12px);
  background: var(--navy); color: #FAF8F3; font-size: 12.5px; font-weight: 650;
  border-radius: 12px; padding: 11px 15px; max-width: min(92vw, 460px);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s;
  z-index: 200; box-shadow: 0 12px 32px rgba(30, 55, 43, .32); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.detail-open .toast { bottom: calc(148px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) { body.detail-open .toast { bottom: 168px; } }
.toast.err { background: #693B33; }

/* ───────── 반응형 ───────── */
@media (min-width: 720px) {
  .main { padding: 20px 22px 140px; }
  .top-inner { padding: 13px 22px 9px; }
  .boardbar { padding: 0 22px 10px; }
  .stats { padding: 0 22px 12px; }
  .brand-txt h1 { font-size: 17px; }
  .brand-txt p { font-size: 12px; }
  .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; align-items: start; }
  .grid.lvl-minor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sc-name { font-size: 24px; }
  .sc-feat { font-size: 13.6px; -webkit-line-clamp: 2; }
  .childgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .seg-btn { padding: 12px 10px; font-size: 13.5px; }
  .dfoot { bottom: 96px; }
  .tabbar {
    left: 50%; right: auto; bottom: 18px; transform: translateX(-50%);
    width: min(720px, calc(100% - 40px));
    border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    box-shadow: 0 12px 32px -12px rgba(30, 55, 43, .28); padding-bottom: 0;
  }
  .tab { padding: 11px 4px 10px; min-height: 60px; }
  .tab.on::before { display: none; }
  .tab.on { background: #F5F4EF; }
  .statgrid { grid-template-columns: repeat(4, 1fr); }
  .modal .row.between { flex-wrap: nowrap; }
}
@media (min-width: 1080px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .childgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail { gap: 16px; }
  .scard { padding: 22px 22px 20px; }
  .acc-head { padding: 18px 20px; }
  .acc-body { padding: 2px 20px 20px; }
  .acc.open .acc-body { padding-top: 16px; }
}
@media (max-width: 899px) {
  .mrow { grid-template-columns: 1fr; }
  .mrow.head { display: none; }
  .mlabel { display: block; }
  .mcell { border-top: 1px dashed var(--line-soft); padding-top: 8px; }
  .mcell:first-child { border-top: 0; padding-top: 0; }
  .crumb-cur { max-width: 34vw; }
}
@media (max-width: 420px) {
  .brand-icon { height: 30px; padding: 0 8px; border-radius: 9px; }
  .brand-icon .brand-word { height: 15px !important; }
  .brand-txt h1 { font-size: 14.5px; }
  .split { grid-template-columns: 1fr; }
  .seg-btn { font-size: 12.3px; gap: 5px; padding: 10px 4px; }
  .seg-btn .seg-n { min-width: 20px; padding: 1px 5px; font-size: 10px; }
  .tile { padding: 13px 12px 12px 13px; }
  .tile-name { font-size: 14.2px; }
  .sc-name { font-size: 19.5px; }
  .dfoot .btn.primary { padding: 11px 16px; }
  .dfoot-state { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ───────── 화면 미리보기 바 (손님용·사장님용·매장포스) ───────── */
.viewbar { border-top: 1px solid var(--line-soft); background: #F5F4EF; }
.viewbar-in {
  display: flex; align-items: center; gap: 6px; padding: 6px 18px 8px;
  max-width: 1200px; margin: 0 auto; overflow-x: auto; scrollbar-width: none;
}
.viewbar-in::-webkit-scrollbar { display: none; }
.vb-label {
  font-size: 10.5px; font-weight: 800; color: var(--muted-2);
  letter-spacing: -0.02em; flex: 0 0 auto; margin-right: 1px;
}
.vb-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--line); background: #FAF8F3;
  color: var(--ink-2); font-size: 11.5px; font-weight: 750; text-decoration: none; flex: 0 0 auto;
  transition: border-color .14s, color .14s, background .14s;
}
.vb-btn:hover { border-color: #E8E4DA; color: var(--ocean); background: #F5F4EF; }
.vb-btn svg { color: currentColor; }
.vb-hint { margin-left: auto; font-size: 10.5px; color: var(--muted-2); font-weight: 650; white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 640px) { .vb-hint { display: none; } }

/* ───────── 조립 모달: 단계 필터 · 검색 ───────── */
.pick-tabs { display: flex; gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.pick-tab {
  flex: 1; height: 30px; border: 0; background: transparent; border-radius: 8px;
  font-size: 11.5px; font-weight: 800; color: var(--muted);
}
.pick-tab.on { background: #FAF8F3; color: var(--navy); box-shadow: 0 1px 3px rgba(30, 55, 43, .14); }
.pick-search {
  display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 11px; background: #FAF8F3;
}
.pick-search svg { color: var(--muted-2); }
.pick-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13px; }
.pick-search input::placeholder { color: #9FB6AA; }
.picklist { min-height: 90px; }
.pick-lv {
  font-style: normal; font-size: 9px; font-weight: 800; color: var(--muted-2);
  background: #F5F4EF; border-radius: 5px; padding: 1px 5px; vertical-align: 1px;
}
.pick-lv.lv-medium { color: #3C5A4A; background: #F3F1EB; }
.pick-lv.lv-minor { color: #6E7568; background: #F5F4EF; }
.pick-sum { font-size: 11px; font-weight: 750; color: var(--muted); align-self: center; }
.pick-sum b { color: var(--ocean); font-size: 12px; }
.pick-empty {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 26px 12px; color: var(--muted-2); font-size: 12px; text-align: center;
}
.pick-empty svg { color: #CFC9B5; }
.pick-empty b { color: var(--ink-2); font-size: 12.5px; }
.ch-mix { font-style: normal; font-size: 10.5px; font-weight: 750; color: var(--muted-2); margin-left: 3px; }

/* ───────── 표시위치 실시간 프리뷰 팝오버 ───────── */
.loc-q {
  display: none; width: 17px; height: 17px; border-radius: 50%;
  border: 1px solid var(--line); background: #FAF8F3; color: var(--muted);
  font-size: 9.5px; font-weight: 900; line-height: 1; padding: 0; flex: 0 0 auto;
  align-items: center; justify-content: center;
}
@media (hover: none) { .loc-q { display: inline-flex; } }
.chip-wrap { position: relative; display: inline-flex; align-items: center; gap: 3px; min-width: 0; }
.loc-pop {
  position: fixed; z-index: 500; background: #FAF8F3; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 24px 50px -24px rgba(30, 55, 43, .5), 0 2px 6px rgba(30, 55, 43, .06);
  padding: 9px; display: flex; flex-direction: column; gap: 7px; max-width: calc(100vw - 16px);
}
.loc-pop[hidden] { display: none; }
.loc-pop-head b { display: block; font-size: 11.5px; font-weight: 850; color: var(--navy); letter-spacing: -0.03em; }
.loc-pop-sub { display: block; font-size: 10px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.loc-pop-body { display: flex; justify-content: center; }
.loc-frame {
  position: relative; overflow: hidden; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); flex: 0 0 auto;
}
.loc-frame iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: top left; background: #FAF8F3; pointer-events: none; }
.loc-pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.loc-open { font-size: 10.5px; font-weight: 800; color: var(--ocean); text-decoration: none; }
.loc-open.muted { color: var(--muted-2); }
.loc-live { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800; color: var(--muted-2); white-space: nowrap; }
.loc-live i { width: 5px; height: 5px; border-radius: 50%; background: #879572; display: block; }
.loc-card { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
.loc-card-foot { font-size: 9.5px; color: var(--muted-2); font-weight: 650; text-align: center; }

.labelpreview {
  width: 218px; border: 1px dashed #DFDBCD; border-radius: 6px; padding: 8px 9px; background: #FAF8F3;
  font-size: 9px; line-height: 1.4; color: #0F1311;
}
.labelpreview .lp-name { font-size: 12px; font-weight: 850; letter-spacing: -0.02em; }
.labelpreview .lp-price { font-size: 13.5px; font-weight: 900; margin-top: 2px; }
.labelpreview .lp-row { display: flex; justify-content: space-between; gap: 6px; border-top: 1px dotted #DFDBCD; padding-top: 2px; margin-top: 3px; }

.talk-prev { width: 218px; border: 1px solid var(--line); border-radius: 12px; background: #FAF8F3; overflow: hidden; }
.talk-head { display: flex; align-items: center; gap: 7px; padding: 8px 9px; background: #F5F4EF; border-bottom: 1px solid var(--line-soft); }
.talk-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--navy); color: #FAF8F3; display: grid; place-items: center; font-size: 11px; font-weight: 900; flex: 0 0 auto; }
.talk-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.talk-name b { font-size: 10.5px; font-weight: 850; }
.talk-name em { font-style: normal; font-size: 8.5px; color: var(--muted-2); font-weight: 700; }
.talk-body { padding: 9px; font-size: 9.5px; line-height: 1.65; color: #223F31; }
.talk-body b { font-size: 10px; color: var(--navy); }
.talk-btn { display: block; margin: 0 9px 9px; width: calc(100% - 18px); height: 24px; border: 0; border-radius: 6px; background: #F5F4EF; color: var(--navy-2); font-size: 9.5px; font-weight: 800; }

.master-prev { width: 218px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #FAF8F3; }
.mp-head { display: flex; justify-content: space-between; gap: 6px; padding: 7px 9px; background: var(--navy); color: #FAF8F3; font-size: 9.5px; font-weight: 800; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-soft); }
.mp-grid > div { background: #FAF8F3; padding: 8px 9px; display: flex; flex-direction: column; gap: 1px; }
.mp-grid b { font-size: 13px; font-weight: 900; color: var(--navy); font-variant-numeric: tabular-nums; }
.mp-grid span { font-size: 8.5px; color: var(--muted-2); font-weight: 750; }

.server-prev { width: 218px; border: 1px solid var(--line); border-radius: 11px; background: #FAF8F3; padding: 3px 9px; }
.sp-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-soft); font-size: 9.5px; }
.sp-row:last-child { border-bottom: 0; }
.sp-row span { color: var(--muted); }
.sp-row b { color: var(--navy); font-weight: 850; }

/* ───────── 범위 매트릭스: 컬럼 헤더 상단 고정 ───────── */
@media (min-width: 900px) {
  .mrow.head {
    position: sticky; top: var(--topbar-h, 104px); z-index: 22;
    background: var(--bg);
    padding-top: 9px; padding-bottom: 9px;
    border-bottom: 1px solid var(--line); border-radius: 0;
    box-shadow: 0 10px 14px -14px rgba(30, 55, 43, .55);
  }
  .matrix .mrow.head > div { font-weight: 850; color: var(--muted); letter-spacing: -0.02em; }
}
.pad.matrix-view { padding-bottom: 110px; }

/* 범위 매트릭스: 표시위치 컬럼을 넓혀 줄 수를 줄이고 칩을 작게 */
@media (min-width: 900px) {
  .mrow { grid-template-columns: minmax(150px, 1fr) repeat(3, minmax(112px, .8fr)) minmax(236px, 1.3fr); gap: 10px; }
  .matrix .mchips .chip { height: 22px; padding: 0 7px; font-size: 9.5px; border-radius: 6px; }
  .matrix .mchips { gap: 3px; }
  .matrix .mrow { padding: 10px 12px; }
  .matrix .mrow.head { padding: 9px 12px; }
}

/* 공통 뒤로 버튼 */
.nav-back {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 10px;
  background: #F5F4EF; color: var(--ink-2); border: 1px solid var(--line);
}
.nav-back:active { background: #E2DBC9; }
.hero-back { background: rgba(250, 248, 243, .12); border: 1px solid rgba(250, 248, 243, .2); color: #F5F3EF; backdrop-filter: blur(8px); }
.hero-back:active { background: rgba(250, 248, 243, .22); }

/* ═════════ 통합 관제 (관제허브) — 같은 화면 안 네이티브 탭 ═════════ */
.hub-native { padding-bottom: 100px; }
.hub-lock { display: flex; justify-content: center; padding: 4px 0 0; }
.hl-card {
  width: min(430px, 100%);
  background: var(--navy);
  border-radius: 22px;
  padding: 26px 22px 20px;
  text-align: center;
  color: #F5F4EF;
  box-shadow: 0 34px 64px -46px rgba(30, 55, 43, .95);
}
.hl-mark {
  display: inline-grid; place-items: center; height: 42px; padding: 0 13px;
  border-radius: 12px; background: #E6E0D1; margin-bottom: 12px;
}
.hl-card h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.05em; color: #F7F4EC; }
.hl-sub { font-size: 12px; color: #ADC1B7; margin-top: 4px; }
.pin-dots { display: flex; justify-content: center; gap: 10px; margin: 18px 0 8px; }
.pin-dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #5D7B6C; background: transparent; transition: background .15s, border-color .15s; }
.pin-dots i.on { background: #E6E0D1; border-color: #E6E0D1; }
.pin-msg { min-height: 18px; font-size: 11.5px; font-weight: 700; color: #DECCC7; }
.pin-msg.ok { color: #BBC3AF; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 6px; }
.keypad button {
  height: 52px; border-radius: 14px; background: rgba(250, 248, 243, .07);
  border: 1px solid rgba(173, 193, 183, .22); color: #F7F4EC;
  font-size: 19px; font-weight: 700;
}
.keypad button:active { background: rgba(250, 248, 243, .16); }
.keypad button.fn { font-size: 12px; color: #ADC1B7; display: grid; place-items: center; }
.keypad button.fn.wide { grid-column: 1 / -1; color: var(--forest, #1E372B); font-weight: 800; background: rgba(255,255,255,.9); }
.hl-note { font-size: 10.5px; line-height: 1.7; color: #8AA798; margin-top: 8px; }
.hl-note b { color: #C9B98F; }

.hub-dash { display: flex; flex-direction: column; gap: 14px; }
.hd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hd-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.05em; }
.hd-head p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hd-act { display: flex; gap: 6px; flex-wrap: wrap; }
.sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.sum-card {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 13px 12px; box-shadow: var(--shadow); min-width: 0;
}
.sum-card.warn { border-color: #DAD2BF; background: #E6E0D1; }
.sum-card.good { border-color: #DADED4; background: #F0F2EE; }
.sc-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: #F5F4EF; color: var(--navy-2); margin-bottom: 3px;
}
.sc-label { font-size: 10.5px; font-weight: 800; color: var(--muted-2); letter-spacing: -0.01em; }
.sc-value { font-size: 20px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.15; }
.sc-value small { font-size: 11px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.sc-sub { font-size: 10.5px; font-weight: 600; color: var(--muted); line-height: 1.45; }
.hub-sec { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); }
.hs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.hs-head h3 { font-size: 14.5px; font-weight: 800; letter-spacing: -0.04em; }
.hs-head span { font-size: 11px; color: var(--muted); font-weight: 600; }
.fchip-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.fchip-row::-webkit-scrollbar { display: none; }
.fchip {
  flex: 0 0 auto; height: 30px; padding: 0 11px; border-radius: 999px;
  background: #FAF8F3; border: 1px solid var(--line); color: #3D7158;
  font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px;
}
.fchip em { font-style: normal; font-size: 10.5px; color: var(--muted-2); font-weight: 800; }
.fchip.on { background: var(--navy); border-color: var(--navy); color: #F7F4EC; }
.fchip.on em { color: #C9B98F; }
.hub-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.hub-row { border: 1px solid var(--line-soft); border-radius: 14px; padding: 11px 12px; background: var(--soft); }
.hr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hr-top b { font-size: 13.5px; font-weight: 800; letter-spacing: -0.03em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 2px; }
.hr-meta i { width: 3px; height: 3px; border-radius: 50%; background: #DAD5C5; }
.hr-flag { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--amber); }
.hr-act { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chip.blue { background: #F5F4EF; color: #698C7B; border-color: #E8E4DA; }
.chip.amber { background: #E6E0D1; color: #71624C; border-color: #DDD6C6; }
.chip.green { background: #F0F2EE; color: #2F4D3E; border-color: #DADED3; }
.chip.red { background: #F4EDEC; color: #8F5046; border-color: #E8DBD7; }
.hub-empty { padding: 22px 14px; text-align: center; border: 1px dashed var(--line); border-radius: 14px; }
.hub-empty b { display: block; font-size: 13px; font-weight: 800; }
.hub-empty p { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.hub-dock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dock-btn {
  display: flex; align-items: center; gap: 9px; text-align: left;
  padding: 11px 12px; border-radius: 14px; background: var(--soft);
  border: 1px solid var(--line); color: var(--ink);
}
.dock-btn.solid { background: var(--navy); border-color: var(--navy); color: #F7F4EC; }
.dk-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #FAF8F3; color: var(--navy-2); flex: 0 0 auto; }
.dock-btn.solid .dk-ico { background: rgba(250, 248, 243, .14); color: #E6E0D1; }
.dk-txt { min-width: 0; }
.dk-txt b { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: -0.03em; }
.dk-txt span { display: block; font-size: 10.5px; color: var(--muted); }
.dock-btn.solid .dk-txt span { color: #CDC6B2; }
.hub-note { font-size: 11px; color: var(--muted-2); line-height: 1.6; }
.hub-pin-msg { font-size: 11.5px; font-weight: 700; color: var(--red); margin-top: 8px; min-height: 16px; }
@media (min-width: 760px) {
  .sum-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hub-dock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hub-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 업체관리 검색 */
.store-search {
  display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 12px;
  background: #FAF8F3; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow);
}
.store-search:focus-within { border-color: #DFDBCE; box-shadow: 0 0 0 3px rgba(47, 85, 68, .10); }
.store-search .ss-ico { color: var(--muted-2); display: grid; place-items: center; }
.store-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; font-weight: 600; }
.store-search input::placeholder { color: #9CB5A8; font-weight: 500; }
.store-search .ss-clear { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--soft); flex: 0 0 auto; }
.store-result-sub { font-size: 11.5px; font-weight: 700; color: var(--muted); margin: -4px 2px 0; }

/* 업종별 법률·필수 블럭 매칭 */
.lm-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--soft); margin-top: 10px; }
.lm-card.empty { border-style: dashed; }
.lm-card.empty b { display: block; font-size: 13px; font-weight: 800; }
.lm-card.empty p { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.65; }
.lm-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.lm-head b { font-size: 15px; font-weight: 800; letter-spacing: -0.04em; }
.lm-books { font-size: 11.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.6; }
.lm-books b { font-weight: 800; color: var(--navy); margin-right: 4px; }
.lm-group { margin-top: 12px; }
.lm-group-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; color: var(--muted-2); letter-spacing: -0.01em; margin-bottom: 6px; }
.lm-group-label em { font-style: normal; font-size: 10px; font-weight: 700; color: #9AB2A6; background: #F5F4EF; border-radius: 999px; padding: 2px 7px; }
.lm-list { display: flex; flex-direction: column; gap: 6px; }
.lm-item { display: flex; align-items: center; gap: 8px; background: #FAF8F3; border: 1px solid var(--line-soft); border-radius: 11px; padding: 9px 10px; }
.lm-item.off { background: #F4EDEC; border-color: #EADEDB; }
.lm-check { width: 18px; height: 18px; display: grid; place-items: center; color: var(--green); flex: 0 0 auto; }
.lm-item.off .lm-check { color: var(--red); }
.lm-item.locked .lm-check { color: var(--muted-2); }
.lm-txt { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; line-height: 1.5; }
.lm-item.off .lm-txt { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(162, 109, 96, .35); }
.lm-lock { font-size: 10px; font-weight: 800; color: var(--muted-2); background: #F5F4EF; border-radius: 999px; padding: 2px 8px; flex: 0 0 auto; }
.lm-note { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; color: var(--ink-2); line-height: 1.6; margin-top: 10px; }
.lm-note svg { color: var(--green); margin-top: 2px; }
.lm-note.warn { color: #6B3C35; background: #E6E0D1; border: 1px solid #E3DDCE; border-radius: 11px; padding: 9px 10px; }
.lm-note.warn svg { color: var(--amber); }
.lm-foot { font-size: 10.5px; color: var(--muted-2); line-height: 1.6; margin-top: 8px; }
/* hidden 속성이 항상 이기도록 */
[hidden] { display: none !important; }
