/* 지얼 관리자 — 휴대폰 우선. 휴대폰: 아래 탭 + 화면 전체 편집 창 / PC(900px 이상): 위 진한 띠 + 왼쪽 메뉴 + 오른쪽 편집 창
   디자인 토큰 = 네이버 스마트스토어센터 실측값 (2026-10-22, 대시보드·상품·등록·발주·정산·문의·통계 7쪽 getComputedStyle) — DESIGN.md
   대표님: "관리자 페이지는 우리만 보니 최대한 비슷하게". 휴대폰은 큰 글자·큰 버튼 유지(모바일 규칙), 색·선·모서리만 같게 */
:root {
  --bg: #edf0f5; --card: #ffffff; --text: #303236; --body: #4d5159; --muted: #767a83; --line: #dbdde2; --line-soft: #e3e7ee; --soft: #f5f7fa;
  --accent: #00c73c; --accent-ink: #1e8a33; --accent-text: #ffffff; --accent-soft: #e6f8ec; --link: #608cba;
  --ok: #1e8a33; --ok-soft: #e6f8ec; --bad: #e5343c; --bad-soft: #fdecee; --warn: #a86400; --warn-soft: #fff4dc;
  --sale: #ff545c; --field: #ffffff; --shadow: 0 6px 24px rgba(0, 0, 0, .22); --shadow-card: 0 1px 2px rgba(0, 0, 0, .08);
  --gnb: #2d3539; --lnb: #39404c; --lnb-line: #515d6e; --lnb-text: #ffffff; --lnb-mute: rgba(255, 255, 255, .55); --lnb-on: #2d3539;
  --r-card: 0px; --r-ctl: 2px; --r-pill: 999px;
  --font: Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --nav-h: 64px; --gnb-h: 55px; --lnb-w: 210px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181c; --card: #1f2328; --text: #eceef1; --body: #c9cdd3; --muted: #9aa0a8; --line: #343a42; --line-soft: #2b3037; --soft: #1a1e22;
    --accent: #00c73c; --accent-ink: #4fdc78; --accent-text: #ffffff; --accent-soft: #163322; --link: #8fb3da;
    --ok: #4fdc78; --ok-soft: #163322; --bad: #ff7a80; --bad-soft: #3a1f22; --warn: #f2c14e; --warn-soft: #3a3019;
    --sale: #ff6b72; --field: #23282e; --shadow: 0 6px 24px rgba(0, 0, 0, .55); --shadow-card: 0 1px 2px rgba(0, 0, 0, .4);
    --gnb: #0f1215; --lnb: #1b1f24; --lnb-line: #2c333b; --lnb-on: #0f1215;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15181c; --card: #1f2328; --text: #eceef1; --body: #c9cdd3; --muted: #9aa0a8; --line: #343a42; --line-soft: #2b3037; --soft: #1a1e22;
  --accent: #00c73c; --accent-ink: #4fdc78; --accent-text: #ffffff; --accent-soft: #163322; --link: #8fb3da;
  --ok: #4fdc78; --ok-soft: #163322; --bad: #ff7a80; --bad-soft: #3a1f22; --warn: #f2c14e; --warn-soft: #3a3019;
  --sale: #ff6b72; --field: #23282e; --shadow: 0 6px 24px rgba(0, 0, 0, .55); --shadow-card: 0 1px 2px rgba(0, 0, 0, .4);
  --gnb: #0f1215; --lnb: #1b1f24; --lnb-line: #2c333b; --lnb-on: #0f1215;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* ---------- 머리 ---------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: var(--gnb-h);
  background: var(--gnb); color: #fff; }
.top .brand { color: inherit; text-decoration: none; font-weight: 800; letter-spacing: .02em; font-size: 18px; }
.top .brand small { display: block; font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--lnb-mute); }
.top .who { margin-left: auto; font-size: 14px; color: rgba(255, 255, 255, .8); }

/* ---------- 탭 (휴대폰: 아래 / PC: 머리 아래) ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--card); border-top: 1px solid var(--line); }
.tabs button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button .ic { font-size: 20px; line-height: 1; }
.tabs button[aria-current="page"] { color: var(--accent-ink); }
main { padding: 16px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom)); max-width: 1280px; margin: 0 auto; }

/* ---------- 공통 ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 16px; margin-bottom: 14px; box-shadow: var(--shadow-card); color: var(--body); }
.card h2, .card h3, .card b { color: var(--text); }
.card h2 { font-size: 20px; margin: 0 0 6px; }
.card > p, .desc { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
h1.page { font-size: 24px; margin: 4px 0 14px; }
label.f { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
.in, select.in, textarea.in { width: 100%; font-size: 18px; padding: 12px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--field); color: var(--text); }
textarea.in { resize: vertical; min-height: 84px; }
.in:focus { outline: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); outline-offset: 0; border-color: var(--accent); }
.in.changed { border-color: var(--accent); background: var(--accent-soft); }
.hint { font-size: 14px; color: var(--muted); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 16px; border-radius: var(--r-ctl); border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 85%, #000); font-weight: 700; }
.btn:hover:not(:disabled) { border-color: var(--muted); } .btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #000); }
a:not(.btn) { color: var(--link); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.block { width: 100%; font-size: 18px; padding: 15px; }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: var(--r-ctl); }
.btn:disabled { opacity: .5; cursor: default; }
.msg { margin-top: 12px; font-size: 15px; min-height: 1.4em; }
.msg.bad { color: var(--bad); } .msg.ok { color: var(--ok); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill.sale { background: var(--sale); color: #fff; border-color: transparent; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 4px; }
.seg button { border: 0; background: none; padding: 10px 6px; border-radius: var(--r-ctl); font-size: 16px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.switch:last-child { border-bottom: 0; }
.switch input { width: 52px; height: 30px; appearance: none; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 25px; }

/* ---------- 알림 (맨 위, 크게) ---------- */
#toast { position: fixed; top: 10px; left: 50%; transform: translate(-50%, -140%); z-index: 100; width: min(560px, calc(100% - 24px));
  padding: 15px 18px; border-radius: 4px; font-size: 17px; font-weight: 700; box-shadow: var(--shadow); transition: transform .25s; }
#toast.show { transform: translate(-50%, 0); }
#toast.ok { background: var(--ok); color: #fff; }
#toast.bad { background: var(--bad); color: #fff; }

/* ---------- 제품 목록 ---------- */
.tools { display: grid; gap: 10px; margin-bottom: 12px; }
.search { position: relative; }
.search .in { padding-left: 42px; }
.search::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); font-size: 22px; color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 8px 14px; border-radius: 99px; font-size: 15px; font-weight: 600; cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips button.warn[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }
.filters { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.filters select { font-size: 15px; padding: 10px 8px; }
.count { color: var(--muted); font-size: 15px; margin: 4px 2px 10px; display: flex; justify-content: space-between; gap: 10px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; } }
.item { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; }
.item:focus-visible, .item.sel { outline: 3px solid var(--accent); }
.item .ph { aspect-ratio: 1; background: var(--soft); display: flex; align-items: center; justify-content: center; position: relative; }
.item .ph img { max-width: 92%; max-height: 92%; object-fit: contain; }
.item .ph .noimg { color: var(--muted); font-size: 13px; }
.item .tags { position: absolute; left: 6px; top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.item .meta { padding: 9px 10px 11px; display: grid; gap: 2px; }
.item .nm { font-weight: 700; font-size: 16px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item .sz { font-size: 13px; color: var(--muted); }
.item .pr { font-size: 16px; font-weight: 800; }
.item .pr.none { color: var(--bad); font-weight: 600; font-size: 14px; }
.item.off { opacity: .55; }

/* ---------- 편집 창 (휴대폰: 전체 / PC: 오른쪽) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.sheet .dim { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.sheet .panel { position: relative; width: 100%; height: 100%; background: var(--bg); display: flex; flex-direction: column; animation: up .2s ease-out; }
@media (min-width: 900px) { .sheet .panel { width: 560px; box-shadow: var(--shadow); animation: left .2s ease-out; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes left { from { transform: translateX(40px); opacity: 0; } }
.sheet .head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.sheet .head .t { flex: 1; min-width: 0; }
.sheet .head .t b { display: block; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .head .t small { color: var(--muted); font-size: 13px; }
.sheet .x { border: 0; background: var(--soft); width: 42px; height: 42px; border-radius: 50%; font-size: 22px; cursor: pointer; color: var(--text); flex: none; }
.sheet .body { flex: 1; overflow: auto; padding: 14px 14px 24px; -webkit-overflow-scrolling: touch; }
.sheet .foot { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.sheet .foot .state { flex: 1; font-size: 14px; color: var(--muted); }
.sheet .foot .state.dirty { color: var(--accent-ink); font-weight: 700; }
.sheet .foot .btn.primary { min-width: 140px; }
.hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.hero img { width: 104px; height: 104px; object-fit: contain; background: var(--soft); border-radius: var(--r-ctl); flex: none; }
.hero .info { font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
.spec { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 4px 12px 14px; margin-bottom: 12px; background: var(--soft); }
.spec .sh { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-weight: 700; }
.retail { margin-top: 8px; font-size: 15px; color: var(--muted); }
.retail b { color: var(--text); font-size: 17px; }
.loglist { list-style: none; padding: 0; margin: 0; }
.loglist li { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.loglist li:last-child { border-bottom: 0; }
.loglist .when { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.loglist .what { font-size: 15px; }
.loglist .what del { color: var(--muted); }
.loglist .what ins { text-decoration: none; font-weight: 700; }

/* ---------- 특가 ---------- */
.sale-grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .sale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sale-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sitem { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px; display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.sitem img { width: 96px; height: 96px; object-fit: contain; background: var(--soft); border-radius: var(--r-ctl); }
.sitem .pct { color: var(--sale); font-weight: 800; }
.sitem .acts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.sitem .acts .btn { flex: 1; }
.sitem.hidden { opacity: .55; }
.bulk { display: grid; gap: 10px; }
.bulk .b { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.bulk .b .lbl { grid-column: 1 / -1; font-weight: 700; }

/* ---------- 상세페이지 편집기 ---------- */
#detail { position: fixed; inset: 0; z-index: 80; background: var(--bg); display: flex; flex-direction: column; }
#detail .bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
#detail .bar b { flex: 1; min-width: 140px; font-size: 17px; }
#detail .area { flex: 1; min-height: 0; }
#detail .tip { font-size: 13px; color: var(--muted); padding: 6px 12px; background: var(--card); border-bottom: 1px solid var(--line); }

/* 작은 버튼 글자가 두 줄로 꺾이지 않게 */
.btn.small { white-space: nowrap; }
.sitem .acts .btn { padding: 10px 6px; font-size: 14px; white-space: nowrap; }

/* 새 타일 사진 올리기 */
.drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 26px 12px; border: 2px dashed var(--line); border-radius: var(--r-ctl); background: var(--soft); cursor: pointer; }
.drop b { font-size: 18px; color: var(--accent-ink); }
.drop span { font-size: 14px; color: var(--muted); }
.drop.on { border-color: var(--accent); background: var(--accent-soft); }
.uplist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.uplist li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 15px; }
.uplist .nm { font-weight: 600; word-break: break-all; }
.uplist .st { grid-column: 1; color: var(--muted); }
.uplist .act { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.uplist .act img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-ctl); }
.uplist li.ok { border-color: var(--ok); background: var(--ok-soft); } .uplist li.ok .st { color: var(--ok); }
.uplist li.bad { border-color: var(--bad); background: var(--bad-soft); } .uplist li.bad .st { color: var(--bad); }
.uplist li.warn { border-color: var(--warn); background: var(--warn-soft); } .uplist li.warn .st { color: var(--warn); }
.uplist li.busy .st { color: var(--accent-ink); }
@media (max-width: 520px) { .uplist li { grid-template-columns: 1fr; } .uplist .act { grid-column: 1; grid-row: auto; justify-content: flex-start; } }

/* 카탈로그 앞부분 (디자인 PDF) 쪽 그림 */
.dpgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dpgrid a { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--r-ctl); overflow: hidden; background: var(--soft); }
.dpgrid img { display: block; width: 100%; aspect-ratio: 1200 / 1697; object-fit: cover; }
.dpgrid span { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: var(--r-ctl); background: rgba(0,0,0,.6); color: #fff; font-size: 13px; }

/* [제품] 사이즈별 묶음 + 타일 사진 실제 크기 비율 (1mm = 0.13px, products.js MM_PX) */
.pgroup { margin-bottom: 22px; }
.pgroup h3 { font-size: 18px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.pgroup h3 small { color: var(--muted); font-weight: 500; font-size: 14px; margin-left: 4px; }
.item.realsize .ph { aspect-ratio: auto; height: var(--ph, 120px); min-height: 70px; }
.item .ph img.real { max-width: none; max-height: none; object-fit: fill; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.item .ph img.real.rot { transform: rotate(90deg); flex: none; }   /* 가로 사진 → 세로로 (products.js fitTile) */
.item .ph img.fit { width: auto; height: auto; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }   /* 폼세라믹·빅슬랩·부자재: 예전 카드 크기, 테두리는 사진 크기만큼 */

/* [제품] 맨 위로 버튼 */
.pgroup { scroll-margin-top: calc(var(--stick, 61px) + var(--pih, 62px)); }
.totop { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 35; width: 56px; height: 56px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--accent-ink); box-shadow: var(--shadow); font-size: 18px; font-weight: 800; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.totop span { font-size: 12px; font-weight: 600; margin-top: 2px; }
.totop[hidden] { display: none; }
@media (min-width: 900px) { .totop { bottom: 24px; } }

/* [계정] 직원 목록 한 줄: 이름 칸 | 버튼 칸 — 이름이 길어도 버튼은 늘 같은 자리 (2026-10-22). 휴대폰은 버튼을 이름 아래 한 줄로 */
.loglist .when.staffrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; font-size: 16px; color: var(--text); }
.staffrow > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.staffbtns { display: flex; gap: 6px; flex-wrap: nowrap; }
@media (max-width: 560px) { .loglist .when.staffrow { display: grid; grid-template-columns: 1fr; } .staffbtns { flex-wrap: wrap; } }

/* PC: 스마트스토어센터 배치 (파일 맨 끝 — 위의 기본 크기보다 나중에 와야 이김) — 위 진한 띠(55px) + 왼쪽 진남색 메뉴(210px, 흰 글자 15px 굵게, 칸 사이 선) + 회청색 바탕 위 흰 판 */
@media (min-width: 900px) {
  body { font-size: 14px; color: var(--body); }
  .top { padding: 0 24px; }
  .top .brand { font-size: 17px; }
  .tabs { position: fixed; top: var(--gnb-h); bottom: 0; left: 0; right: auto; width: var(--lnb-w); height: auto; padding: 6px 0 24px; display: flex; flex-direction: column;
    overflow-y: auto; border: 0; background: var(--lnb); }
  .tabs button { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 0 20px; min-height: 48px; font-size: 15px; font-weight: 700;
    color: var(--lnb-text); border-bottom: 1px solid var(--lnb-line); border-left: 4px solid transparent; text-align: left; }
  .tabs button .ic { font-size: 16px; opacity: .75; }
  .tabs button:hover { background: color-mix(in srgb, var(--lnb-on) 60%, var(--lnb)); }
  .tabs button[aria-current="page"] { color: #fff; background: var(--lnb-on); border-left-color: var(--accent); }
  main { margin-left: var(--lnb-w); max-width: none; padding: 20px 28px 48px; }
  /* 판 안: 스마트스토어 크기 (본문 13~15px, 버튼·칸 높이 34px) */
  .card { padding: 20px 24px; }
  .card h2 { font-size: 17px; }
  .card > p, .desc, .hint { font-size: 13px; }
  h1.page { font-size: 24px; font-weight: 400; color: var(--text); }
  label.f { font-size: 13px; font-weight: 700; color: var(--text); }
  .in, select.in, textarea.in { font-size: 13px; padding: 7px 10px; min-height: 34px; }
  .btn { font-size: 13px; font-weight: 500; padding: 6px 14px; min-height: 34px; }
  .btn.primary { font-weight: 700; }
  .btn.block { font-size: 15px; padding: 10px; min-height: 44px; }
  .btn.small { font-size: 12px; padding: 4px 10px; min-height: 30px; }
  .seg button, .chips button { font-size: 13px; }
  .switch { font-size: 14px; }
  .loglist .what { font-size: 13px; }
  .item .nm { font-size: 14px; } .item .pr { font-size: 14px; }
  #toast { font-size: 15px; }
}

/* [제품] 첫 화면 정리 (2026-10-22): 판매 상태 단추 · 카드 아래 노출 단추 · 묶음 전체 보임/숨김 · PC 사이즈 단추 여러 줄 */
.stabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--card); }
.stabs button { border: 0; border-right: 1px solid var(--line); background: none; color: var(--body); padding: 11px 4px; font-size: 15px; font-weight: 600; cursor: pointer; }
.stabs button:last-child { border-right: 0; }
.stabs button small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.stabs button[aria-pressed="true"] { background: var(--text); color: var(--card); }
.stabs button[aria-pressed="true"] small { color: inherit; opacity: .8; }
.itemw { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.itemw .item { flex: 1; }
.chs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.chs button { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: var(--r-ctl); padding: 7px 2px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chs button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.chs button:disabled { opacity: .5; }
.pgroup h3 { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; }
.gbulk { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 500; color: var(--muted); }
.gb { display: inline-flex; align-items: center; gap: 4px; }
.gb b { color: var(--body); font-weight: 700; }
.gb i { font-style: normal; margin-right: 2px; }
.gb .btn.small { min-height: 28px; padding: 3px 8px; font-size: 12px; }
@media (min-width: 900px) {
  .stabs { max-width: 520px; }
  .stabs button { font-size: 13px; padding: 8px 4px; }
  .chs button { font-size: 12px; padding: 5px 2px; }
}

/* [제품] 찾기 조건 상자 · 표 보기 · 체크 일괄 (2026-10-22 스마트스토어식, 분류 = 홈페이지 대표 분류 → 중 → 소) */
.qbox { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; display: grid; gap: 8px; margin-bottom: 10px; }
.qrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qrow .search { flex: 1 1 100%; }
.qcls select { flex: 1 1 140px; min-width: 0; }
.ql { font-size: 13px; font-weight: 700; color: var(--text); flex: none; }
.qa { color: var(--muted); flex: none; }
.qmore select { flex: 1 1 160px; min-width: 0; }
.qchk { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--body); }
.phead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.phead .stabs { flex: 1 1 320px; }
.pcount { color: var(--muted); font-size: 14px; }
.vtoggle { display: none; border: 1px solid var(--line); background: var(--card); }
.vtoggle button { border: 0; background: none; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--body); }
.vtoggle button[aria-pressed="true"] { background: var(--text); color: var(--card); }
.pgroup h3 { justify-content: flex-start; gap: 8px; }
.gsel, .psel { display: inline-flex; align-items: center; }
.gsel input, .psel input, .ptable input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.itemw { position: relative; }
.itemw .psel { position: absolute; z-index: 2; right: 6px; top: 6px; background: var(--card); padding: 4px; border: 1px solid var(--line); border-radius: var(--r-ctl); }
.itemw.on .item { outline: 3px solid var(--accent); }
.ptable { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
.ptable th { text-align: left; font-weight: 700; color: var(--muted); background: var(--soft); padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ptable td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--body); }
.ptable tbody tr { cursor: pointer; }
.ptable tbody tr:hover { background: var(--soft); }
.ptable tr.on { background: var(--accent-soft); }
.ptable tr.off td { opacity: .6; }
.ptable .c { width: 28px; }
.ptable .ph { width: 52px; }
.ptable .ph img { width: 44px; height: 44px; object-fit: contain; display: block; background: var(--soft); }
.ptable .nm b { display: block; color: var(--text); font-weight: 700; }
.ptable .nm small { color: var(--muted); }
.ptable .nm em { font-style: normal; color: var(--bad); }
.ptable .r { text-align: right; white-space: nowrap; }
.ptable small { color: var(--muted); }
.ptable .none { color: var(--bad); }
.ptable .chs { min-width: 170px; }
.pill.ok { background: var(--accent-soft); color: var(--accent-ink); }
.bulk { position: sticky; bottom: calc(var(--nav-h, 0px) + 8px); z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px;
  padding: 10px 14px; background: var(--gnb); color: #fff; border-radius: var(--r-ctl); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.bulk .bg { display: inline-flex; gap: 4px; }
.bulk select { min-height: 30px; font-size: 13px; }
@media (min-width: 900px) {
  .qrow .search { flex: 1 1 auto; }
  .vtoggle { display: inline-flex; }
  .bulk { bottom: 12px; }
}
@media (max-width: 899px) {
  .qcls .qa { display: none; }
  .qcls select, .qmore select { flex: 1 1 100%; }
}

/* 카탈로그 자리 바꾸기 (js/swap.js) — 쪽 그림 위 타일 칸 */
body.swv-on { overflow: hidden; }
.swv { position: fixed; inset: 0; z-index: 90; background: rgba(20,24,28,.94); display: none; flex-direction: column; color: #fff; }
.swv.open { display: flex; }
.swv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; background: var(--gnb); }
.swv-title { font-size: 15px; flex: 1 1 auto; }
.swv-which { display: inline-flex; border: 1px solid #586068; }
.swv-which button { border: 0; background: none; color: #ccd; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.swv-which button[aria-pressed="true"] { background: #fff; color: var(--text); font-weight: 700; }
.swv-nav { display: inline-flex; gap: 4px; align-items: center; }
.swv-nav select { max-width: 280px; min-height: 30px; font-size: 13px; }
.swv-top .btn { background: #fff; color: var(--text); }
.swv-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 10px; overflow: auto; }
.swv-page { position: relative; height: 100%; aspect-ratio: 1200 / 1697; max-width: 100%; }
.swv-page > img { width: 100%; height: 100%; display: block; background: #fff; object-fit: contain; }
.swv-hots { position: absolute; inset: 0; }
.swv-hot { position: absolute; border: 2px dashed rgba(0,199,60,.6); cursor: pointer; overflow: hidden; }
.swv-hot:hover { background: rgba(0,199,60,.12); border-style: solid; }
.swv-hot img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; }
.swv-hot .tag { position: absolute; left: 0; bottom: 0; max-width: 100%; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.swv-hot:hover .tag, .swv-hot.pick .tag, .swv-hot.moved .tag { display: block; }
.swv-hot.pick { border: 3px solid var(--accent); background: rgba(0,199,60,.25); }
.swv-hot.can { border: 2px solid var(--accent); }
.swv-hot.no { border-color: transparent; background: rgba(0,0,0,.35); cursor: not-allowed; }
.swv-hot.moved { border: 3px solid #fab005; }
.swv-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; background: var(--gnb); font-size: 13px; }
.swv-msg { flex: 1 1 300px; }
.swv-msg.bad { color: #ff8a8a; font-weight: 700; }
.swv-act { display: inline-flex; gap: 10px; align-items: center; color: #ccd; }
.swv-act .btn { background: #fff; color: var(--text); }
@media (max-width: 899px) {
  .swv-stage { align-items: flex-start; }
  .swv-page { height: auto; width: 100%; }
  .swv-hot .tag { font-size: 10px; }
}
/* [제품] 왼쪽 분류 목차 (ptree.js, 2026-10-24 B안): 넓은 화면은 왼쪽에 붙어 따라옴, 좁은 화면은 목록 위 상자 */
.ptree { background: var(--card); border: 1px solid var(--line); margin: 0 0 12px; max-height: 45vh; overflow: auto; font-size: 14px; }
@media (min-width: 900px) {
  .pbody { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
  .ptree { position: sticky; top: calc(var(--stick, 61px) + 8px); max-height: calc(100vh - var(--stick, 61px) - 24px); margin: 0; }
}
.pt-top { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.pt-top span { font-size: 12px; color: var(--muted); }
.pt-clear { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent-ink); font: 700 12px/1 var(--font); padding: 6px 8px; cursor: pointer; }
.ptree details { border-bottom: 1px solid var(--line-soft); }
.ptree summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-weight: 800; cursor: pointer; }
.ptree summary::-webkit-details-marker { display: none; }
.ptree summary::after { content: '+'; margin-left: 4px; color: var(--muted); font-weight: 600; }
.ptree details[open] summary::after { content: '–'; }
.ptree summary small, .pt-mid small, .pt-leaf small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.ptree details.here > summary span { color: var(--accent-ink); }
.pt-mid { display: flex; align-items: center; gap: 8px; padding: 6px 12px 4px 24px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pt-leaf { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 36px; }
.pt-leaf button { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--body); padding: 6px 0; font: 500 14px/1.3 var(--font); text-align: left; cursor: pointer; }
.pt-leaf button:hover { color: var(--accent-ink); }
.pt-leaf button[aria-current="true"] { color: var(--accent-ink); font-weight: 800; }
.pt-leaf:has(button[aria-current="true"]) { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ptree input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); flex: none; cursor: pointer; }

/* 관리자 [제품] 제조사 고르기: 카탈로그 노출 보임 / 전체 · % 줄 맞춤 (public/js/makerpick.js) */
.mpk { text-align: left; min-width: 150px; cursor: pointer; background: var(--bg, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 28px; }
.mpk-pop { position: absolute; z-index: 60; background: #fff; border: 1px solid #d5d5d5; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.14); max-height: 420px; overflow: auto; min-width: 340px; padding: 4px 0; }
.mpk-h, .mpk-r { display: grid; grid-template-columns: minmax(110px, 1fr) 104px 96px; align-items: center; column-gap: 12px; padding: 7px 14px; }
.mpk-h { font-size: 12px; color: #888; border-bottom: 1px solid #eee; position: sticky; top: -4px; background: #fff; z-index: 2; }   /* 스크롤할 때 아래 줄 막대가 비치지 않게 */
.mpk-h span:nth-child(2), .mpk-r .c { text-align: right; font-variant-numeric: tabular-nums; }
.mpk-r { width: 100%; border: 0; background: none; font: inherit; font-size: 14px; text-align: left; cursor: pointer; color: #222; }
.mpk-r:hover { background: #f3f6fb; }
.mpk-r.on { background: #e8f0fe; font-weight: 600; }
.mpk-r .c { color: #555; }
.mpk-r .p { position: relative; height: 18px; background: #f0f0f0; border-radius: 9px; overflow: hidden; }
.mpk-r .p i { position: absolute; inset: 0 auto 0 0; background: #03c75a; opacity: .28; }
.mpk-r .p b { position: relative; display: block; text-align: right; padding-right: 7px; font-size: 12px; line-height: 18px; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (max-width: 640px) { .mpk-pop { left: 8px !important; right: 8px; min-width: 0; } .mpk-h, .mpk-r { grid-template-columns: 1fr 92px 76px; padding: 10px 12px; font-size: 15px; } }
@media (min-width: 641px) { .qmore .mpk { flex: 0 0 240px; width: 240px; } }
/* 목차 줄마다 카탈로그 노출 막대 (제조사 고르기 .mpk-r .p 와 같은 모양, 작게) */
.pt-top { flex-wrap: wrap; }
.pt-top .pt-lg { order: 3; width: 100%; text-align: right; font-size: 11px; }
.ptree small { min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.pt-r { position: relative; flex: none; width: 46px; height: 15px; background: var(--soft); border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; }
.pt-r i { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); }
.pt-r b { position: relative; display: block; text-align: center; font: 700 10px/13px var(--font); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .pbody { grid-template-columns: 290px minmax(0, 1fr); } }
