/* 두리 v6 기준 CSS — 업체관리 · 업체 세팅 창 · PIN 잠금 · 라벨프린트
   6번 하이브리드 실무형 (딥네이비 #1E372B / 오션블루 #2F5544 / 아이스그레이 #F2EFE6, 이모지 0, 단색 선형 SVG)
   v7 확장 CSS(store-ui.css)보다 먼저 불러오고, 겹치는 이름은 쓰지 않는다. */

/* ───────── 터치: 두 번 연속 누를 때 화면 확대 방지 ─────────
   touch-action: manipulation 은 스크롤·핀치 확대는 그대로 두고 더블탭 확대만 끈다.
   글자 크기 3단계(readerscale)는 html zoom 으로 칸까지 함께 키우므로 영향 없다.
   (터치 시작점 기준으로 적용되도록 html·body·누를 수 있는 요소 모두에 둔다) */
html { touch-action: manipulation; }
body, button, [role="button"], a, input, select, textarea, label, summary { touch-action: manipulation; }

/* ───────── 하단 탭: 5칸도 한 줄에 ───────── */
.tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tab { font-size: 10px; padding: 9px 1px 8px; }
.tab svg { width: 21px; height: 21px; }
@media (max-width: 400px) {
  .tab { font-size: 9.5px; letter-spacing: -0.05em; gap: 2px; }
}

/* ───────── 마스터 미리보기 업체 배지 ───────── */
.pv-store {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; color: #FAF8F3;
  background: rgba(250, 248, 243, .12); border: 1px solid rgba(250, 248, 243, .18);
  padding: 5px 10px; border-radius: 999px; max-width: 46vw;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pv-store i { width: 6px; height: 6px; border-radius: 50%; background: #97A385; flex: none; }

/* ───────── 업체관리 목록 ───────── */
.store-page { padding-bottom: 40px; }
.store-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.store-eyebrow { font-size: 11px; font-weight: 800; color: var(--ocean); letter-spacing: .04em; }
.store-top h2 { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; margin: 2px 0 6px; }
.store-top p { font-size: 12.5px; color: var(--muted); line-height: 1.6; max-width: 620px; }
.store-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 46px 22px; text-align: center; box-shadow: var(--shadow);
}
.store-empty .se-ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: #F5F4EF; color: var(--ocean); }
.store-empty .se-ico svg { width: 26px; height: 26px; }
.store-empty b { font-size: 16px; color: var(--ink); }
.store-empty p { font-size: 12.5px; color: var(--muted); line-height: 1.6; max-width: 380px; }
.store-empty .btn { margin-top: 6px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.store-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.store-card-main { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px 16px 12px; background: transparent; border: 0; width: 100%; }
.stc-top { display: flex; align-items: center; gap: 8px; }
.stc-name { font-size: 15.5px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stc-cats { font-size: 12px; color: var(--ink-2); font-weight: 650; }
.stc-meta { font-size: 11.5px; color: var(--muted); }
.stc-id { font-size: 10.5px; color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, monospace; }
.stc-urls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 0 16px 10px; }
.stc-url { border: 1px solid var(--line); background: var(--soft); color: var(--ink-2); border-radius: 9px; padding: 7px 2px; font-size: 10.5px; font-weight: 700; }
.stc-url:hover { border-color: var(--ocean); color: var(--ocean); }
.stc-url.off { opacity: .45; }
.stc-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line-soft); margin-top: auto; }
.stc-foot .btn { flex: 1; }

/* ───────── 업체 세팅 창 ───────── */
.store-detail { padding-bottom: 130px; }
.store-back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; padding: 4px 0 12px; }
.store-back:hover { color: var(--ocean); }
.sd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.sd-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-title h2 { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.sd-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.sd-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sd-step { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted-2); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px 5px 6px; }
.sd-step i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: #FAF8F3; border: 1px solid var(--line); font-style: normal; font-size: 10px; font-weight: 800; }
.sd-step.on { color: var(--navy); background: #F5F4EF; border-color: #E8E5DB; }
.sd-step.on i { background: var(--navy); border-color: var(--navy); color: #FAF8F3; }
.sd-step-line { width: 12px; height: 1px; background: var(--line); }
.sd-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.sd-sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.sd-sec-head h3 { font-size: 15px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.sd-sec-head h3 i { width: 20px; height: 20px; border-radius: 6px; background: var(--navy); color: #FAF8F3; font-style: normal; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.sd-sec-head span { font-size: 11.5px; color: var(--muted); }
.sd-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sd-form .field.span2 { grid-column: 1 / -1; }
.sd-form .field em { font-style: normal; color: var(--red); font-weight: 700; font-size: 10.5px; }
.sd-form .field-note { grid-column: 1 / -1; margin: -2px 0 0; font-size: 11px; color: var(--muted); line-height: 1.55; }
.sd-form .field-note b { color: var(--navy); }
.sd-form-act { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.sd-foot {
  position: fixed; left: 0; right: 0; bottom: 62px; z-index: 40;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 248, 243, .97); border-top: 1px solid var(--line);
  box-shadow: var(--shadow-up); backdrop-filter: blur(12px); max-width: 100%;
}
.sd-foot-state { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); min-width: 0; flex: 1; }
.sd-foot-act { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 760px) {
  .sd-foot { bottom: 0; padding-left: 28px; padding-right: 28px; }
  .store-detail { padding-bottom: 100px; }
}

/* ───────── 고유 URL 카드 ───────── */
.url-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.url-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--soft); display: flex; flex-direction: column; gap: 8px; }
.url-card.off { opacity: .72; background: #F5F4EF; }
.uc-top { display: flex; align-items: center; gap: 8px; }
.uc-top b { font-size: 13.5px; color: var(--ink); }
.uc-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.uc-url { display: block; font-size: 11px; color: var(--ink-2); background: #FAF8F3; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; word-break: break-all; font-family: ui-monospace, SFMono-Regular, monospace; }
.uc-act { display: flex; gap: 6px; }
.uc-act .btn { flex: 1; justify-content: center; }

/* ───────── 업체 전용 블럭 ───────── */
.sb-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sb-seg { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #FAF8F3; color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; }
.sb-seg b { color: var(--muted-2); font-size: 11px; }
.sb-seg.on { background: var(--navy); color: #FAF8F3; border-color: var(--navy); }
.sb-seg.on b { color: #E3DFD2; }
.sb-bar .btn { margin-left: auto; }
.sb-list { display: grid; gap: 8px; }
.sb-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #FAF8F3; border-radius: 12px; padding: 10px 12px; }
.sb-row.off { background: #F5F4EF; }
.sb-row.off .sb-name { color: var(--muted-2); }
.sb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; background: transparent; border: 0; }
.sb-name { font-size: 13px; font-weight: 750; color: var(--ink); }
.sb-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-meta { font-size: 10.5px; color: var(--muted-2); }
.sb-empty { font-size: 12px; color: var(--muted); background: var(--soft); border: 1px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; line-height: 1.6; }

/* ───────── 사장님용 노출블럭 ───────── */
.ob-wrap { display: flex; flex-direction: column; gap: 10px; }
.ob-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ob-count { font-size: 12px; color: var(--muted); }
.ob-count b { color: var(--ink); }
.ob-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ob-list { display: grid; gap: 8px; }
.ob-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr) auto auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #FAF8F3; }
.ob-row input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; background: var(--soft); min-width: 0; }
.ob-row input:focus { border-color: var(--ocean); background: #FAF8F3; outline: none; }
.ob-empty { font-size: 12px; color: var(--muted); background: var(--soft); border: 1px dashed var(--line); border-radius: 12px; padding: 18px; line-height: 1.6; text-align: center; }
@media (max-width: 640px) {
  .ob-row { grid-template-columns: 1fr auto auto; }
  .ob-row .ob-desc { grid-column: 1 / -1; }
  .ob-acts { width: 100%; }
  .ob-acts .btn { flex: 1; justify-content: center; }
}

/* ───────── 테스트 초기화 ───────── */
.sd-clean { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sd-clean b { font-size: 13.5px; color: var(--ink); }
.sd-clean p { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 4px; max-width: 520px; }

/* ───────── 새 업체 만들기 (1단계) ───────── */
.store-new { max-width: 900px; }
.sn-body { padding: 4px 18px 0; max-height: 66vh; overflow-y: auto; }
.sn-step { font-size: 11.5px; font-weight: 800; color: var(--ocean); letter-spacing: .02em; margin: 4px 0 10px; }
.sn-groups { display: grid; gap: 10px; }
.sn-group { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--soft); }
.sn-group.on { background: #FAF8F3; border-color: #E8E5DB; }
.sn-ind { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sn-ind input { width: 18px; height: 18px; accent-color: var(--ocean); }
.sn-ind-txt { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.sn-ind-txt b { font-size: 14px; color: var(--ink); }
.sn-ind-txt em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.sn-subs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0 28px; }
.sn-subs.dim { opacity: .5; }
.sn-sub { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 650; color: var(--ink-2); background: #FAF8F3; cursor: pointer; }
.sn-sub input { width: 15px; height: 15px; accent-color: var(--ocean); }
.sn-sub.on { border-color: var(--navy); background: var(--navy); color: #FAF8F3; }
.sn-sub.on em { color: #E3DFD2; }
.sn-sub em { font-style: normal; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.sn-sub em.ready { background: rgba(47, 85, 68, .12); color: var(--ocean); }
.sn-sub.on em.ready { background: rgba(250, 248, 243, .18); color: #FAF8F3; }
.sn-sub em.soon-t { background: #F5F4EF; color: var(--muted-2); }
.sn-sub.soon { color: var(--muted); }
.sn-preview { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #F5F4EF; }
.sn-preview-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sn-preview-head b { font-size: 13px; color: var(--ink); }
.sn-preview-head span { font-size: 11.5px; color: var(--ocean); font-weight: 700; }
.sn-majors { display: flex; flex-wrap: wrap; gap: 6px; }
.sn-major { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: #FAF8F3; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; }
.sn-major i { font-style: normal; font-size: 10px; color: var(--ocean); background: #F5F4EF; border-radius: 999px; padding: 0 5px; }
.sn-note { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 10px; }
.sn-soon b { font-size: 12.5px; color: var(--ink); }
.sn-soon p { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-top: 4px; }
.sn-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--line-soft); margin-top: 12px; }
.sn-sum { font-size: 11.5px; color: var(--muted); min-width: 0; }
.sn-sum b { color: var(--ink); }
.sn-acts { display: flex; gap: 8px; }

/* ───────── 표준 블럭 넣기·빼기 (pk-*) ───────── */
.pk-search {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 18px 6px; padding: 0 11px; height: 42px;
  border: 1px solid var(--line); border-radius: 11px; background: #FAF8F3;
}
.pk-search svg { color: var(--muted); flex: 0 0 auto; }
.pk-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.pk-search input::placeholder { color: #9CB5A8; font-weight: 500; }
.pk-search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(30, 55, 43, .08); }
.pk-find { font-size: 11px; font-weight: 800; color: var(--muted); flex: 0 0 auto; white-space: nowrap; }
.pk-empty { padding: 14px 18px 18px; text-align: center; font-size: 12px; color: var(--muted); }
.pk-list { max-height: 48vh; overflow-y: auto; padding: 4px 18px; display: grid; gap: 6px; }
.pk-row[hidden] { display: none; }
.pk-row { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #FAF8F3; cursor: pointer; }
.pk-row input { margin-top: 2px; width: 17px; height: 17px; accent-color: var(--ocean); }
.pk-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pk-name { font-size: 12.5px; font-weight: 750; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.pk-sub { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-row.lv-major { background: #F5F4EF; }

/* ───────── PIN 잠금 (사장님·포스·라벨) ───────── */
body.pin-locked { overflow: hidden; }
.pin-lock {
  position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(1100px 500px at 50% -10%, #34614C 0%, #1E372B 55%, #13261F 100%);
}
.pin-card {
  width: min(360px, 100%); background: #FAF8F3; border-radius: 20px; padding: 26px 22px 20px;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .6); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.pin-ico { width: 52px; height: 52px; border-radius: 15px; background: #F5F4EF; color: var(--ocean); display: grid; place-items: center; }
.pin-card h1 { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.pin-card p { font-size: 12px; color: var(--muted); line-height: 1.6; }
.pin-card form { display: grid; gap: 8px; width: 100%; margin-top: 6px; }
.pin-card input {
  width: 100%; text-align: center; font-size: 22px; letter-spacing: .5em; font-weight: 800;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px 12px 18px;
  background: var(--soft); color: var(--ink); outline: none;
}
.pin-card input:focus { border-color: var(--ocean); background: #FAF8F3; box-shadow: 0 0 0 3px rgba(47, 85, 68, .12); }
.pin-btn { width: 100%; border: 0; border-radius: 12px; padding: 12px; background: var(--navy); color: #FAF8F3; font-size: 14px; font-weight: 800; }
.pin-btn:disabled { opacity: .6; }
.pin-err { min-height: 16px; font-size: 11.5px; color: var(--red); font-weight: 700; }
.pin-note { font-size: 10.5px; color: var(--muted-2); }

/* ───────── 사장님용 기능 설정 카드 ───────── */
.oc-wrap { display: flex; flex-direction: column; gap: 12px; }
.oc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.oc-head h2 { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.oc-head p { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.oc-card { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow); }
.oc-card.off { background: #F5F4EF; }
.oc-card.off b { color: var(--muted-2); }
.oc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.oc-body b { font-size: 13px; font-weight: 750; color: var(--ink); }
.oc-body span { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.oc-note { font-size: 11px; color: var(--muted-2); line-height: 1.6; }

/* ═════════ 라벨프린트 (/label) ═════════ */
.lb-body { background: var(--bg); }
.lb-wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }
.lb-head-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.lb-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #FAF8F3; display: grid; place-items: center; flex: none; }
.lb-brand h1 { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.lb-brand p { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.lb-head-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lb-chip { font-size: 11px; font-weight: 750; border-radius: 999px; padding: 5px 10px; background: #F5F4EF; color: var(--muted); }
.lb-chip.ok { background: #F0F2EE; color: var(--green); }
.lb-chip.off { background: #F4EDEC; color: var(--red); }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: #FAF8F3; color: var(--ink-2); border-radius: 11px; padding: 9px 14px; font-size: 12.5px; font-weight: 750; }
.lb-btn svg { width: 16px; height: 16px; }
.lb-btn.primary { background: var(--navy); border-color: var(--navy); color: #FAF8F3; }
.lb-btn.line { width: 100%; margin-top: 8px; }
.lb-main { margin-top: 14px; }
.lb-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 860px) { .lb-grid { grid-template-columns: 1fr; } }
/* 좁은 화면에서도 패널이 화면 밖으로 밀리지 않게 — 그리드 아이템 축소 허용 + 규격 줄 줄바꿈 */
.lb-grid > .lb-panel { min-width: 0; max-width: 100%; }
@media (max-width: 620px) {
  .lb-size-row { gap: 5px; }
  .lb-size-custom { flex-wrap: wrap; margin-left: 0; }
  .lb-size-custom input { width: 46px; }
  .lb-size-custom .lb-btn.small { padding: 0 8px; }
  .lb-preview { width: 100%; }
  .lb-head-in { padding: 12px; }
  .lb-brand p { line-height: 1.35; }
}
.lb-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.lb-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.lb-panel-head h2 { font-size: 14px; font-weight: 800; color: var(--ink); }
.lb-panel-head span { font-size: 11px; color: var(--muted); }
.lb-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; max-height: 44vh; overflow-y: auto; }
.lb-row { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 8px 10px; background: #FAF8F3; }
.lb-row.on { border-color: #E8E5DB; background: #F5F4EF; }
.lb-row-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left; background: transparent; border: 0; overflow: hidden; }
.lb-row-name { font-size: 12.5px; font-weight: 750; color: var(--ink); }
.lb-row-meta { font-size: 11px; color: var(--muted); }
.lb-row-origin { font-size: 10.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-qty { display: flex; align-items: center; gap: 4px; flex: none; }
.lb-q { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); background: #FAF8F3; color: var(--ink-2); font-size: 14px; font-weight: 800; line-height: 1; }
.lb-n { min-width: 18px; text-align: center; font-size: 12.5px; font-weight: 800; color: var(--ink); }
.lb-panel-foot { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.lb-made-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); }
.lb-made-head b { color: var(--ink); font-size: 12.5px; }
.lb-made { display: grid; gap: 5px; margin-top: 6px; max-height: 22vh; overflow-y: auto; }
.lb-made-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); background: var(--soft); border-radius: 8px; padding: 6px 9px; }
.lb-made-row span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-made-q { font-weight: 800; color: var(--ocean); font-size: 11.5px; }
.lb-x { border: 0; background: transparent; color: var(--muted-2); font-size: 15px; line-height: 1; padding: 0 2px; }
.lb-preview { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 6px 0 2px; }
.lb-prev-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); padding: 30px 10px; text-align: center; }
.lb-prev-empty span { width: 46px; height: 46px; border-radius: 13px; background: #F5F4EF; color: var(--ocean); display: grid; place-items: center; }
.lb-prev-empty p { font-size: 11.5px; line-height: 1.6; max-width: 260px; }
.lb-note { margin-top: 10px; border-top: 1px solid var(--line-soft); padding-top: 10px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.lb-muted { color: var(--muted); font-size: 11.5px; }
.lb-muted.pad { padding: 16px 4px; }
.lb-empty { max-width: 520px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 22px; text-align: center; }
.lb-empty-ico { width: 54px; height: 54px; border-radius: 15px; background: #F4EDEC; color: var(--red); display: grid; place-items: center; margin: 0 auto 10px; }
.lb-empty h2 { font-size: 16px; font-weight: 800; color: var(--ink); }
.lb-empty p { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 6px; }

/* 라벨 — 규격(mm)은 매장 설정(settings.label)에 따라 --lw·--lh·--ls 로 바뀐다.
   화면 미리보기와 인쇄가 같은 mm 치수라 화면 그대로 나온다. */
.lb-label {
  width: var(--lw, 60mm); height: var(--lh, 40mm); box-sizing: border-box;
  padding: calc(1.8mm * var(--ls, 1)) calc(2.2mm * var(--ls, 1));
  background: #FAF8F3; color: #0F1311; border: 1px solid #E6E3D9;
  display: flex; flex-direction: column; gap: calc(.4mm * var(--ls, 1)); overflow: hidden;
  font-family: Pretendard, "Malgun Gothic", sans-serif; letter-spacing: -0.01em;
}
.lb-label.pv { box-shadow: 0 8px 20px -14px rgba(30, 55, 43, .5); }
.lb-l1 { display: flex; justify-content: space-between; align-items: baseline; gap: calc(1mm * var(--ls, 1)); font-size: calc(2.2mm * var(--ls, 1)); font-weight: 800; color: #36654F; border-bottom: .22mm solid #E1DDD1; padding-bottom: calc(.4mm * var(--ls, 1)); }
.lb-l1 span:last-child { font-weight: 650; font-size: calc(1.9mm * var(--ls, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.lb-l2 { font-size: calc(3.9mm * var(--ls, 1)); font-weight: 800; line-height: 1.1; max-height: calc(8.6mm * var(--ls, 1)); overflow: hidden; }
.lb-l3 { display: flex; justify-content: space-between; align-items: baseline; font-size: calc(3.1mm * var(--ls, 1)); font-weight: 800; }
.lb-l3 span { font-size: calc(2.1mm * var(--ls, 1)); font-weight: 600; color: #396A53; }
.lb-l4 { display: flex; gap: calc(1.2mm * var(--ls, 1)); font-size: calc(2.05mm * var(--ls, 1)); line-height: 1.16; color: #1F2522; }
.lb-l4 span:first-child { flex: none; width: calc(11mm * var(--ls, 1)); font-weight: 700; color: #3D7158; }
.lb-l4 span:last-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-l5 { margin-top: auto; padding-top: calc(.4mm * var(--ls, 1)); border-top: .22mm solid #E1DDD1; font-size: calc(1.75mm * var(--ls, 1)); line-height: 1.15; color: #4A5548; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 라벨 규격 선택 (프리셋 + 직접 입력) */
.lb-size { border: 1px solid var(--line); border-radius: 13px; background: #F5F4EF; padding: 11px 12px; margin-bottom: 12px; }
.lb-size-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lb-size-head b { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.lb-size-head span { font-size: 11px; color: var(--muted); }
.lb-size-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.lb-size-chip { height: 30px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: #FAF8F3; color: var(--ink-2); font-size: 12px; font-weight: 800; }
.lb-size-chip.on { background: var(--navy); border-color: var(--navy); color: #FAF8F3; }
.lb-size-custom { display: inline-flex; align-items: center; gap: 5px; margin-left: 2px; }
.lb-size-custom input { width: 52px; height: 30px; border-radius: 9px; border: 1px solid var(--line); background: #FAF8F3; text-align: center; font-size: 12px; font-weight: 750; color: var(--ink); }
.lb-size-custom i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.lb-size-custom .lb-btn.small { height: 30px; padding: 0 10px; font-size: 11.5px; }
.lb-size-custom .lb-btn.small svg { width: 14px; height: 14px; }

.lb-print { display: none; }
/* @page 는 이 파일에 두지 않는다 — 이 CSS 를 쓰는 손님·사장님·포스 화면까지 60×40mm 로 찍히면 안 되므로
   라벨 화면(label.html 의 인라인 @page + label.js 동적 주입)에서만 규격을 잡는다. */
@media print {
  body.lb-body { background: #FAF8F3; }
  .lb-body .pv, .lb-body .lb-wrap, .lb-body .toast, .pin-lock { display: none !important; }
  body.printing .lb-print { display: block; }
  body.printing .lb-print .lb-label { width: var(--lw, 60mm); height: var(--lh, 40mm); border: 0; page-break-after: always; break-after: page; }
}

/* ───────── 새 업체 만들기 — 사업자등록증 자동 입력 · 기본 정보 ───────── */
.biz-top {
  border: 1px solid #ECEAE2; background: #F5F4EF; border-radius: 14px;
  padding: 13px 14px; margin-bottom: 14px;
}
.biz-head b { display: block; font-size: 13.5px; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
.biz-head span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.biz-acts { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.biz-top textarea {
  width: 100%; margin-top: 9px; padding: 10px 11px; border-radius: 11px;
  border: 1px solid var(--line); background: #FAF8F3; font-size: 12.5px; line-height: 1.6;
  color: var(--ink); resize: vertical; min-height: 74px; outline: 0;
}
.biz-top textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(30, 55, 43, .07); }
.biz-apply { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 9px; }
.biz-hint { font-size: 11px; color: var(--muted); line-height: 1.5; }
.biz-thumb { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 8px; background: #FAF8F3; border: 1px solid var(--line); border-radius: 11px; }
.biz-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.biz-thumb span { flex: 1; min-width: 0; font-size: 11px; color: var(--muted); line-height: 1.5; }
.sn-step-sub { font-size: 10.5px; font-weight: 700; color: var(--muted-2); margin-left: 4px; }
.sn-basic {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #FAF8F3; margin-bottom: 14px;
}
.sn-basic .field { min-width: 0; }
.sn-basic .field.span2 { grid-column: 1 / -1; }
.sn-basic .field > span { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.sn-basic .field em { font-style: normal; color: var(--red); font-weight: 700; font-size: 10.5px; }
.sn-basic .field input, .sn-basic .field select {
  width: 100%; height: 40px; padding: 0 11px; border-radius: 10px;
  border: 1px solid var(--line); background: #FAF8F3; font-size: 13px; font-weight: 600; color: var(--ink); outline: 0;
}
.sn-basic .field input:focus, .sn-basic .field select:focus { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(30, 55, 43, .07); }
.sn-basic .addr-row { display: flex; gap: 6px; }
.sn-basic .addr-row input { flex: 1; min-width: 0; }
.sn-basic .addr-row .btn { flex: 0 0 auto; height: 40px; }
.sn-basic .field-easy { display: block; font-style: normal; font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }

.sn-basic .field textarea { width: 100%; min-height: 58px; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; color: var(--ink); outline: 0; resize: vertical; }
.sn-basic .field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(30, 55, 43, .07); }
.acc-warn { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-style: normal; font-size: 10.5px; font-weight: 800; color: #71624C; background: #E6E0D1; border-radius: 6px; padding: 3px 7px; }
.acc-warn svg { flex: 0 0 auto; }

/* ───────── v11: 업체 카드 대표 사진 · 간단 설명 ───────── */
.stc-cover { width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: none; background: #F5F4EF; display: grid; place-items: center; color: var(--ocean); }
.stc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stc-cover-ph { display: grid; place-items: center; }
.stc-cover-ph svg { width: 22px; height: 22px; }
.stc-top { align-items: center; }
.stc-desc { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.cover-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cover-thumb { width: 78px; height: 58px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); background: #FAF8F3; display: grid; place-items: center; font-size: 10.5px; color: var(--muted-2); }
.cover-url { display: flex; gap: 6px; margin-top: 8px; }
.cover-url input { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; font-size: 12px; }

/* ───────── v11: 업체별 라벨 출력 규격 ───────── */
.label-size-card { margin-top: 12px; border: 1px solid #ECEAE2; background: #F5F4EF; border-radius: 14px; padding: 12px 13px; }
.lsc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lsc-head b { font-size: 13px; font-weight: 800; color: var(--navy); }
.lsc-head span { font-size: 11px; color: var(--muted); }
.lsc-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.lsc-custom { display: inline-flex; align-items: center; gap: 5px; }
.lsc-custom input { width: 56px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: #FAF8F3; text-align: center; font-size: 12px; font-weight: 750; color: var(--ink); }
.lsc-custom i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.lsc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 9px; font-size: 11px; color: var(--muted); }
.lsc-foot b { color: var(--ink); }
.lbpick { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; }
.lbpick .chip { height: 32px; padding: 0 12px; }

/* ───────── v11: 마스터 안 통합 관제 허브 탭 ───────── */
.hub-embed { padding: 12px 14px 20px; }
.hub-embed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.hub-embed-head b { display: block; font-size: 15px; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
.hub-embed-head span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.hub-frame { width: 100%; height: calc(100dvh - var(--topbar-h, 150px) - 132px); min-height: 540px; border: 1px solid var(--line); border-radius: 16px; background: #13261F; box-shadow: var(--shadow); }

/* v33) 인쇄물 탭(iframe) 안에서는 양식만 — 목록이 오른쪽으로 잘리지 않게 모든 줄을 폭 안에 가둔다 */
.lb-list, .lb-row, .lb-row-main, .lb-row-name, .lb-row-meta, .lb-row-origin { max-width: 100%; }
.lb-row-name, .lb-row-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-embed-wrap { display: grid; gap: 12px; }
.lb-embed-wrap .lb-panel { min-width: 0; }
body.lb-embed .lb-head-act .lb-chip { display: none; }
