:root { --bg:#eef1f6; --panel:#fff; --line:#c8d0dc; --head:#dfe6f0; --tag:#1d3f9a; --tag-text:#fff; --sel:#2f6fd6; --text:#1b2230; --muted:#5b6678; --ok:#1d7a3e; --err:#b42318; }
* { box-sizing: border-box; }
body { margin:0; font: 13px/1.4 "Malgun Gothic","맑은 고딕",system-ui,sans-serif; background:var(--bg); color:var(--text); }
.topbar { display:flex; gap:16px; align-items:center; padding:6px 12px; background:#24324a; color:#fff; }
.topbar .who { color:#cfd6e3; } .topbar form { margin:0; } .topbar .company-switch { margin-left:auto; }
button.link { background:none; border:0; color:#cfd6e3; cursor:pointer; }
.net-banner { background:#fff4ce; color:#6b4e00; padding:6px 12px; border-bottom:1px solid #e8d48a; }
.toast { position:fixed; right:16px; bottom:16px; padding:8px 14px; border-radius:6px; background:#24324a; color:#fff; z-index:10; }
.toast.ok { background:var(--ok); } .toast.err { background:var(--err); }
.toolbar { display:flex; gap:4px; padding:6px 12px; background:var(--head); border-bottom:1px solid var(--line); flex-wrap:wrap; }
.toolbar button { padding:4px 10px; border:1px solid var(--line); background:#fff; border-radius:3px; cursor:pointer; }
.screen { padding:8px 12px; } .screen h2 { font-size:14px; margin:4px 0 8px; } .screen h2 small { color:var(--muted); font-weight:normal; }
.search { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.search #q { width:240px; } .count { color:var(--muted); }
.tag { display:inline-block; min-width:76px; padding:3px 6px; background:var(--tag); color:var(--tag-text); text-align:center; border-radius:2px; }
input, select, textarea { font:inherit; padding:3px 5px; border:1px solid var(--line); border-radius:2px; background:#fff; color:var(--text); }
input.n { text-align:right; } input[readonly] { background:#f3f5f8; }
.split { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:10px; }
.grid-wrap { background:var(--panel); border:1px solid var(--line); overflow:auto; max-height:calc(100vh - 170px); }
.grid { border-collapse:collapse; width:100%; white-space:nowrap; }
.grid th { position:sticky; top:0; background:var(--head); border:1px solid var(--line); padding:3px 6px; font-weight:normal; }
.grid td { border:1px solid #e3e7ee; padding:2px 6px; } .grid .n { text-align:right; }
.grid tr:hover td { background:#f4f7fc; } .grid tr.sel td { background:var(--sel); color:#fff; }
.detail { background:var(--panel); border:1px solid var(--line); padding:8px; display:flex; flex-direction:column; gap:4px; align-self:start; }
.detail .row { display:flex; gap:4px; align-items:center; } .detail .row input, .detail .row textarea { flex:1; min-width:0; }
.detail .row.two input { width:80px; } .detail output { min-width:44px; text-align:right; color:var(--muted); }
.detail .chk { white-space:nowrap; } .detail .checks { gap:16px; }
.login { display:grid; place-items:center; min-height:100vh; }
.login-box { background:#fff; padding:24px; border:1px solid var(--line); display:grid; gap:10px; width:min(320px, calc(100vw - 32px)); }
.login-box h1 { font-size:16px; margin:0 0 6px; } .login-box label { display:grid; gap:4px; } .login-box .err { color:var(--err); margin:0; }
@media (max-width: 900px) { .split { grid-template-columns:1fr; } }
.split.cp { grid-template-columns: 300px minmax(0,1fr); }
.grid-wrap.small { max-height: 260px; margin-bottom: 8px; }
.upload { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.upload .hint { color:var(--muted); }
.grid tr.bad td { background:#fdecea; }
.toolbar-link { margin-left:auto; align-self:center; color:var(--tag); }
.split.cust { grid-template-columns: minmax(0,1fr) minmax(0,620px); }
.detail.wide .row input:not([type=radio]):not([type=checkbox]), .detail.wide .row select { flex:1; min-width:0; }
.detail.wide .row input.short { flex:0 0 70px; } .detail.wide .row input.code { flex:0 0 90px; }
.detail .radios { display:flex; gap:8px; flex-wrap:wrap; flex:1; } .detail .radios label { white-space:nowrap; }
.detail hr { border:0; border-top:1px solid var(--line); margin:4px 0; width:100%; }
.tag.red { background:var(--err); } .sep { width:12px; }
.toolbar-link2 { align-self:center; color:var(--tag); margin-left:12px; }
.hint { color:var(--muted); margin:4px 0 0; }
.grid tr.stopped td { color:#98a2b3; }
.slip-head { background:var(--panel); border:1px solid var(--line); padding:6px 8px; display:flex; flex-direction:column; gap:4px; margin-bottom:6px; }
.slip-head .row, .row.pay { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.slip-head input:not(.short) { flex:1; min-width:120px; } .slip-head input.short { width:90px; }
.slip-head output { min-width:90px; padding:2px 6px; border:1px solid var(--line); background:#f3f5f8; }
.cust-q { max-width:260px; } .cust-name { font-weight:bold; min-width:160px; background:#fff59d; padding:2px 6px; }
.slip-no { margin-left:auto; color:var(--muted); }
.grid-wrap.lines { max-height:calc(100vh - 470px); min-height:180px; }
.grid input.cell { width:100%; min-width:0; border:0; background:transparent; padding:1px 3px; }
.grid input.cell.n { text-align:right; } .grid input.cell:focus { background:#fffbe6; outline:1px solid var(--sel); }
.grid td.short-cell { min-width:220px; } .grid tfoot td { background:var(--head); font-weight:bold; }
.row.pay { margin-top:6px; } .row.pay input { width:110px; }
.picker { width:min(900px, calc(100vw - 32px)); padding:10px; border:1px solid var(--line); }
.picker .row { display:flex; gap:8px; align-items:center; margin-bottom:6px; } .picker #picker-q { flex:1; }
.picker .grid-wrap { max-height:60vh; }
.warn { color:var(--err); font-weight:bold; }
#lines input.qty { width:70px; } #lines input.price { width:90px; } #lines input.memo { width:140px; }
#lines td.name { max-width:260px; overflow:hidden; text-overflow:ellipsis; } #lines td.spec { max-width:220px; overflow:hidden; text-overflow:ellipsis; }
.tb-chk { align-self:center; margin-left:6px; }
.split.pay-split { grid-template-columns: 360px minmax(0,1fr); }

/* 재고 화면 */
.grid-wrap.tall { max-height: calc(100vh - 230px); }
.grid td.strong { font-weight: 600; }
.grid tr.carried td { background: var(--head-bg, #f3f4f6); font-weight: 600; }
.grid td a { color: inherit; }
.grid tr.muted td { color: #9ca3af; text-decoration: line-through; }
.grid tr.warn td { background: #fff7ed; }
tr.done td { color:#7a8494; }

/* 전체 메뉴 */
.menu-grid { columns: 4 260px; column-gap: 16px; }
.menu-group { break-inside: avoid; background:#fff; border:1px solid #d5dbe6; border-radius:6px; padding:10px 14px; margin:0 0 16px; }
.menu-group h3 { margin:0 0 6px; font-size:14px; color:var(--tag); }
.menu-group ul { list-style:none; margin:0; padding:0; }
.menu-group li { padding:2px 0; font-size:13px; }
.menu-group a { color:#0b3d91; font-weight:600; text-decoration:none; }
.menu-group a:hover { text-decoration:underline; }
.menu-group .soon { color:#9aa3b2; }
.topbar a.brand { color:#fff; text-decoration:none; margin-right:14px; }
table.grid tr.err td { color:var(--err); }
.tabs { display:flex; gap:2px; margin:0 0 6px; border-bottom:2px solid var(--tag); }
.tabs button { border:1px solid var(--line); border-bottom:0; background:var(--head); padding:5px 12px; border-radius:4px 4px 0 0; cursor:pointer; }
.tabs button.on { background:var(--tag); color:var(--tag-text); font-weight:bold; }
.tb-chk.warn { color:var(--err); font-weight:bold; }
.as .grid td label { white-space:nowrap; margin-right:4px; }
.as .grid input.cell.short { width:56px; } .as .grid input.cell.n { width:70px; } .as .grid td { white-space:nowrap; }
.as [hidden] { display:none !important; }
.as .slip-head #date { flex:0 0 150px; } .as .slip-head #message { flex:0 1 420px; } .as .slip-head #scan { flex:1 1 320px; }
.as .grid input.cell.serial { width:104px; } .as .grid input.cell.ns-batch { width:130px; } .as .grid input.cell.memo, .as .grid input.cell.cmemo, .as .grid input.cell.account { width:170px; }
.as .grid select.requester { max-width:170px; }
.as .grid-wrap.tall { max-height: calc(100vh - 330px); }
.count .grid td.plus { color:#0a6b2b; font-weight:600; } .count .grid td.minus { color:#b3261e; font-weight:600; }
.count .grid input.cell.counted { width:90px; } .count .grid-wrap.lines { max-height:calc(100vh - 520px); min-height:220px; }
.count [hidden] { display:none !important; }
.report .grid tr.sum td { background:#eef2f9; font-weight:600; }
.ledger .grid tr.sum td { background:#eef2f9; font-weight:600; } .ledger .grid tr.sub td { color:#556; font-size:12px; }
.ledger #list tbody tr { cursor:pointer; }
.grid td.hl { background:#fff9c4; } .grid tfoot tr.sum td { background:#eef2f9; font-weight:600; position:sticky; bottom:0; }
[hidden] { display:none !important; }

/* 화면 틀(왼쪽 메뉴 + 탭) 안에서는 화면마다 있는 위쪽 띠를 숨긴다 */
html.in-shell .topbar { display:none; }

/* 찾기 창: 화면 가득 크게, 좌우 스크롤 없이(긴 글은 줄바꿈) */
.picker { width:min(1500px, calc(100vw - 24px)); max-width:none; height:calc(100vh - 24px); max-height:none; }
.picker[open] { display:flex; } .picker form { flex:1; display:flex; flex-direction:column; min-height:0; min-width:0; }
.picker .grid-wrap { flex:1; max-height:none; min-height:0; overflow-x:hidden; overflow-y:auto; }
.picker .grid { white-space:normal; } .picker .grid td { overflow-wrap:anywhere; padding:4px 6px; cursor:pointer; }
.picker .grid td.n, .picker .grid th { white-space:nowrap; overflow-wrap:normal; }
.picker .hint { margin:6px 0 0; }
.picker { overflow:hidden; } .picker .grid-wrap { overscroll-behavior:contain; }
html.picker-open, html.picker-open body { overflow:hidden; }

/* 조회 표를 좌우 스크롤 없이: 긴 글은 줄바꿈, 숫자·날짜는 한 줄 */
.report.fit .grid { white-space:normal; } .report.fit .grid td { overflow-wrap:anywhere; }
.grid td.d { white-space:nowrap; }
.report.fit .grid td.n, .report.fit .grid td.d, .report.fit .grid th { white-space:nowrap; overflow-wrap:normal; }
.report.fit .grid-wrap.tall { max-height:calc(100vh - 150px); }
.picked-name { font-weight:bold; background:#fff59d; padding:2px 6px; } .picked-name:empty { display:none; }
.report.fit .hint { margin:4px 0 0; }

/* 조회 표: 정렬 표시, 칸 너비 손잡이, 마이너스 숫자 */
.report .grid th { cursor:pointer; position:sticky; } .report .grid th.asc::after { content:" ▲"; color:var(--tag); font-size:10px; } .report .grid th.desc::after { content:" ▼"; color:var(--tag); font-size:10px; }
.report .grid th .rz { position:absolute; top:0; right:-3px; width:7px; height:100%; cursor:col-resize; z-index:1; }
.grid td.neg, .neg { color:var(--err); } .grid tr.sel td.neg { color:#ffd9d4; }
#lines input.price.zero { background:#ffe3e0; }
.sales.no-list .grid-wrap.small { display:none; } .sales.no-list .grid-wrap.lines { max-height:calc(100vh - 330px); }
#list-toggle { padding:3px 8px; border:1px solid var(--line); background:#fff; border-radius:3px; cursor:pointer; }

.tb-printer { display:flex; align-items:center; gap:4px; margin-left:auto; } .tb-printer select { max-width:230px; } .tb-printer a { color:var(--tag); }
.tb-printer + .toolbar-link { margin-left:8px; }
.tb-btn { padding:4px 10px; border:1px solid var(--line); background:#fff; border-radius:3px; cursor:pointer; }

/* 대량 입력 화면(매출등록·발주등록): 화면 높이를 꽉 채우고 줄 표만 스크롤, 합계 줄은 아래에 고정 */
body:has(section.fill) { height:100vh; display:flex; flex-direction:column; overflow:hidden; }
body:has(section.fill) > * { flex:none; }
body:has(section.fill) > main { flex:1 1 0; min-height:0; display:flex; flex-direction:column; }
section.fill { flex:1 1 0; min-height:0; display:flex; flex-direction:column; }
section.fill > * { flex:none; }
section.fill > .grid-wrap.lines { flex:1 1 0; min-height:140px; max-height:none; scroll-padding:28px 0 32px; }
section.fill #lines tfoot td { position:sticky; bottom:0; z-index:1; background:var(--head); box-shadow:0 -1px 0 var(--line), 0 3px 0 var(--head); }
section.fill #lines tbody tr:nth-child(even) td { background:#f7f9fc; }
section.fill #lines tbody tr:hover td { background:#eef4ff; }
section.fill #lines tbody tr:focus-within td { background:#e4eeff; }
section.fill .hint { margin:2px 0 0; }
.sales.fill .grid-wrap.small { max-height:190px; }
#slips td, .top-list td { padding:6px 8px; }
#slips tbody tr, .top-list tbody tr { cursor:pointer; }
.orders.no-list .top-list { display:none; }
.orders #lines td { padding:1px 4px; }
.orders #lines input { border:1px solid transparent; background:transparent; padding:2px 3px; width:100%; box-sizing:border-box; }
.orders #lines input:hover { border-color:var(--line); }
.orders #lines input:focus { background:#fffbe6; border-color:var(--sel); outline:none; }
.orders #lines button.x { padding:0 6px; }
.big-btn { margin-left:auto; padding:8px 18px; font-size:15px; font-weight:bold; color:#fff; background:var(--tag); border:1px solid #142c6e; border-radius:5px; cursor:pointer; white-space:nowrap; }
.big-btn:hover { background:#16327c; }
.big-btn:active { transform:translateY(1px); }

/* 전 화면 공통 UI(ui.js) */
.grid-wrap:has(> table.grid:not(#lines) > tbody:empty:only-of-type)::after { content:"자료가 없습니다."; display:block; padding:16px; text-align:center; color:var(--muted); }
.picker .grid-wrap::after { content:none !important; }
.toolbar button.tb-main { background:var(--tag); color:#fff; border-color:#142c6e; font-weight:bold; }
.toolbar button.tb-search { border-color:var(--tag); color:var(--tag); font-weight:bold; }
.toolbar button.tb-danger { color:var(--err); margin-left:10px; }
.toolbar button.tb-undo { color:#8a5a00; }
.toolbar button:disabled { opacity:.45; cursor:default; }
.toolbar button:not(:disabled):hover { filter:brightness(.96); }
main button { min-height:26px; cursor:pointer; }
.grid button.x { min-width:26px; }
.quick { display:inline-flex; gap:2px; }
.quick button { padding:2px 7px; border:1px solid var(--line); background:#fff; border-radius:10px; color:var(--tag); font-size:12px; min-height:24px; }
.quick button:hover { background:#e4eeff; }
p.hint.help { display:none; } html.show-help p.hint.help { display:block; }
.help-btn { margin-left:8px; width:20px; height:20px; min-height:20px; padding:0; border:1px solid var(--line); border-radius:50%; background:#fff; color:var(--muted); font-size:12px; line-height:1; vertical-align:middle; }
.help-btn.on { background:var(--tag); color:#fff; border-color:var(--tag); }
.cond-toggle { display:none; }
@media print { .grid-wrap { height:auto !important; max-height:none !important; } }

/* 매출등록 줄 지우기 */
.line-tools { display:flex; gap:6px; align-items:center; margin:4px 0 2px; flex:none; }
.line-tools button { padding:3px 10px; border:1px solid var(--line); background:#fff; border-radius:3px; cursor:pointer; }
.line-tools button.tb-danger:not(:disabled) { background:var(--err); color:#fff; border-color:var(--err); }
.line-tools button:disabled { opacity:.5; cursor:default; }
#lines td.no { white-space:nowrap; } #lines td.no .pick, #pick-all { vertical-align:middle; margin:0 2px 0 0; }
#lines tr.picked td { background:#fdecea !important; }
#lines button.del { color:var(--err); font-size:14px; padding:0 4px; }
@media (min-width:701px) { .line-tools ~ .grid-wrap #lines button.del, .line-tools ~ .grid-wrap #lines button.x { display:none; } }
#lines button.x { color:var(--err); }
@media (max-width:700px) { .line-tools .hint, #line-del, section:not(.sales) #lines .pick, section:not(.sales) #pick-all { display:none; } }
/* 폰(좁은 화면) */
@media (max-width: 700px) {
  body { font-size:14px; }
  input, select, textarea { font-size:16px; padding:6px; }  /* 16px보다 작으면 아이폰이 화면을 확대한다 */
  .toolbar { padding:6px; gap:6px; } .toolbar button { padding:8px 10px; }
  .toolbar-link, .toolbar-link2 { margin-left:0; padding:8px 4px; }
  .screen { padding:6px; }
  .picker { position:fixed; top:0; left:0; width:100vw; height:100dvh; margin:0; padding:6px; border:0; }
  .picker .grid tr.sel td { background:#dbe7fb; color:var(--text); }  /* 폰에서는 화살표로 고르지 않으니 옅게 */
  .picker .grid tr:active td { background:var(--sel); color:#fff; }
  .picker .row button { padding:8px 12px; } .picker #picker-q { min-width:0; }
  .picker .row { flex-wrap:nowrap !important; } .picker #picker-title { white-space:nowrap; }
  .picker .row { flex-wrap:wrap; } .picker .hint { display:none; }
  .picker .grid td { padding:8px 4px; } .picker .grid th { padding:4px; }
  .picker .grid td.c-price_from { font-size:12px; color:var(--muted); overflow-wrap:normal; word-break:keep-all; } 

  .search select, .search input:not([type=checkbox]):not([type=radio]) { flex:1 1 140px; min-width:0; }
  .tag { min-width:64px; padding:6px 4px; }
  .sales .grid-wrap.small { max-height:150px; }
  .slip-head input:not(.short), .slip-head select { flex:1 1 120px; min-width:0; }
  .slip-head input.short { flex:1 1 90px; width:auto; }
  .cust-q { max-width:none; } .cust-name { flex:1 1 100%; min-width:0; }
  .slip-head output { flex:1 1 70px; min-width:0; }
  .slip-no { margin-left:0; }
  .sales .grid-wrap.lines { max-height:none; min-height:0; overflow-x:hidden; }
  /* 줄 표: 순번·품명·총재고·부가세·매입단가·단가갱신 칸은 숨긴다 */
  .sales #lines :is(th, td):is(:nth-child(1), :nth-child(3), :nth-child(5), :nth-child(10), :nth-child(11), :nth-child(13)) { display:none; }
  .sales #lines { white-space:normal; table-layout:fixed; }
  .sales #lines th { padding:4px 0; font-size:11px; letter-spacing:-1px; white-space:nowrap; overflow:hidden; }
  .sales #lines td { padding:2px; overflow-wrap:anywhere; }
  .sales #lines th:nth-child(2) { width:29%; } .sales #lines th:nth-child(4) { width:21%; }
  .sales #lines th:nth-child(6) { width:9%; } .sales #lines th:nth-child(7) { width:10%; }
  .sales #lines th:nth-child(8) { width:14%; } .sales #lines th:nth-child(9) { width:17%; }
  .sales #lines th:nth-child(12) { display:none; } .sales #lines td:nth-child(12) { display:none; }
  .sales #lines th:nth-child(14) { width:22px; }
  .sales #lines td.short-cell { min-width:0; }
  .sales #lines input.cell { width:100%; padding:6px 1px; font-size:16px; } .sales #lines input.short-in { letter-spacing:-0.5px; }
  .sales #lines td.spec, .sales #lines td.name { max-width:none; }
  .sales #lines tfoot { display:table-caption; caption-side:bottom; }
  .sales #lines tfoot tr { display:flex; flex-wrap:wrap; gap:4px 12px; justify-content:flex-end; padding:6px; background:var(--head); border:1px solid var(--line); border-top:0; }
  .sales #lines tfoot td { display:block !important; border:0; padding:0; } .sales #lines tfoot td:empty { display:none !important; }
  .sales #lines tfoot #sum-qty::before { content:"수량 "; font-weight:normal; } .sales #lines tfoot #sum-amount::before { content:"금액 "; font-weight:normal; }
  .sales #lines tfoot #sum-vat::before { content:"부가세 "; font-weight:normal; }
  .sales .row.pay label:not(.tag) { flex:1 1 40%; min-width:0; display:flex; align-items:center; gap:4px; white-space:nowrap; } .sales .row.pay .tag { flex:1 1 100%; } .sales .row.pay input { flex:1; width:auto; min-width:0; }
  .sales .row.pay .hint { flex:1 1 100%; }
  /* 입고등록: 매출등록과 같은 줄 표인데 매입단가 칸이 없어 한 칸씩 당겨진다 */
  .purchase #lines :is(th, td):nth-child(13) { display:table-cell; } .purchase #lines th:nth-child(13) { width:22px; }
  /* 여러 칸으로 나눈 입력 틀(발주·견적 등)은 한 줄에 이름표 + 칸 하나씩 */
  form.search[style*="grid"] { display:grid !important; grid-template-columns:80px minmax(0,1fr) !important; flex:1 1 100% !important; }
  form.search[style*="grid"] > * { grid-column:auto !important; min-width:0; } form.search[style*="grid"] input, form.search[style*="grid"] select, form.search[style*="grid"] textarea { width:100% !important; }
  .screen > div[style*="flex"], .screen div[style*="display:flex"] { flex-wrap:wrap; }
  .grid-wrap[style*="flex"] { flex:1 1 100% !important; }
  .detail .row { flex-wrap:wrap; } .detail .row input, .detail .row select { flex:1 1 120px; }
  .search input[size] { width:auto; }
  .grid-wrap { -webkit-overflow-scrolling:touch; }
  body:has(section.fill) { height:auto; display:block; overflow:visible; }
  body:has(section.fill) > main, section.fill { display:block; }
  section.fill #lines tfoot td { position:static; }
  .big-btn { flex:1 1 100%; margin:4px 0 0; padding:12px; }
  /* 전 화면 공통(ui.js): 이름표 + 칸 묶음, 조건 접기, 표는 옆으로 넘기고 이름 칸 고정 */
  .topbar { gap:8px; white-space:nowrap; } .topbar .who { display:none; }
  .search .pair { display:flex; flex:1 1 100%; gap:6px; align-items:center; flex-wrap:wrap; min-width:0; }
  .search .pair > .tag { flex:0 0 76px; }
  .search .pair > input:not([type=checkbox]):not([type=radio]), .search .pair > select { flex:1 1 0; min-width:0; width:auto; }
  .search .pair > .quick { flex:1 1 100%; justify-content:flex-end; } .quick button { padding:6px 12px; font-size:13px; }
  .cond-toggle { display:block; flex:1 1 100%; padding:8px; border:1px solid var(--line); background:#fff; border-radius:4px; color:var(--tag); }
  .search.folded > :not(.cond-toggle):not(#sum):not(.count) { display:none !important; }
  main button { min-height:34px; }
  .help-btn { width:26px; height:26px; min-height:26px; }
  main .grid-wrap > table.grid:not(#lines) { width:max-content; min-width:100%; white-space:nowrap; }
  main .grid-wrap > table.grid:not(#lines) td { padding:6px; }
  main .grid-wrap > table.grid:not(#lines) td:not(.n):not(.d):not(:has(input, select, button)) { max-width:11em; overflow:hidden; text-overflow:ellipsis; }
  main .grid-wrap > table.grid:not(#lines) tr.open td { white-space:normal; word-break:keep-all; overflow-wrap:break-word; }  /* 줄을 누르면 잘린 글이 다 보인다 */
  main table.grid[data-stick="1"] :is(td, th):nth-child(1) { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 var(--line), inset 0 -1px 0 #e3e7ee; } main table.grid[data-stick="1"] th:nth-child(1) { z-index:2; background:var(--head); }
  main table.grid[data-stick="2"] :is(td, th):nth-child(2) { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 var(--line), inset 0 -1px 0 #e3e7ee; } main table.grid[data-stick="2"] th:nth-child(2) { z-index:2; background:var(--head); }
  main table.grid[data-stick="3"] :is(td, th):nth-child(3) { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 var(--line), inset 0 -1px 0 #e3e7ee; } main table.grid[data-stick="3"] th:nth-child(3) { z-index:2; background:var(--head); }
  main table.grid[data-stick="4"] :is(td, th):nth-child(4) { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 var(--line), inset 0 -1px 0 #e3e7ee; } main table.grid[data-stick="4"] th:nth-child(4) { z-index:2; background:var(--head); }
  main table.grid[data-stick="5"] :is(td, th):nth-child(5) { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 var(--line), inset 0 -1px 0 #e3e7ee; } main table.grid[data-stick="5"] th:nth-child(5) { z-index:2; background:var(--head); }
  main table.grid[data-stick="6"] :is(td, th):nth-child(6) { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 var(--line), inset 0 -1px 0 #e3e7ee; } main table.grid[data-stick="6"] th:nth-child(6) { z-index:2; background:var(--head); }
  .tb-printer { display:none; }  /* 폰에는 인쇄 도우미가 없다 */
  .split, .split.cp, .split.cust, .split.pay-split { grid-template-columns:minmax(0,1fr); }  /* 좌우로 나눈 화면은 위아래로 */
  form.search[style*="grid"] > span { display:flex; flex-wrap:wrap; gap:4px; } form.search[style*="grid"] > span > input { flex:1 1 100%; }
  .toast { left:8px; right:8px; bottom:8px; text-align:center; }
}
