/* design2.css: 데스크 총개편 디자인 시스템 (2026-10-18, 차장이 고른 시안 "화려한 것" 적용). design2.js 와 짝.
   원칙: 표 구조·색 계열·박스 윤곽은 지금 화면 그대로. 새 색 없음(--ps-* 를 섞은 값만). 기존 선택자를 덮는 보조 규칙만 둔다.
   걷어내는 법: index.html 에서 이 파일의 <link> 한 줄과 design2.js 의 <script> 한 줄만 지우면 예전 모양.
   효과(배경·움직임)만 끄기: 주소 끝 ?fx=off · 계정 메뉴 '화면 효과' · 기기의 '움직임 줄이기'. 효과 규칙은 전부 html[data-fx="on"] 아래이고 transform·opacity 만 움직인다.
   숫자 정렬·같은 폭 숫자·고정 머리글은 효과와 상관없이 항상 적용(차장 결정 2026-10-18).
   달력·메모는 영향 없음: 배경은 :has 로 제외하고, 표 문법은 숫자 화면 id 안에서만 적용한다. */

/* ================= 1. 토큰: 이름만 정리(값은 전부 기존 --ps-* 를 따라가서 라이트·다크가 같이 바뀐다) ================= */
:root {
  --d2-bg: var(--ps-bg); --d2-panel: var(--ps-panel); --d2-raised: var(--ps-raised);
  --d2-line: var(--ps-hair); --d2-line-strong: var(--ps-rule); --d2-box: var(--ps-box);
  --d2-text: var(--ps-text); --d2-text2: var(--ps-text2); --d2-muted: var(--ps-muted);
  --d2-accent: var(--ps-ac, var(--ps-brand));
  --d2-bad: var(--ps-bad); --d2-warn: var(--ps-warn-ink, var(--ps-warnc)); --d2-info: var(--ps-info); --d2-good: var(--ps-good);
  --d2-cellpad: 8px;
  --d2-out: cubic-bezier(0.23, 1, 0.32, 1);
  --d2-move: cubic-bezier(0.77, 0, 0.175, 1);
  /* 배경 진하기(라이트 기본). 다크는 아래에서 */
  --d2-grid: 6.5%; --d2-gA: 10%; --d2-gB: 4%; --d2-gC: 6%; --d2-noise: .035;   /* 2026-10-27 은은하게(빛 셋 그대로 움직이되 진하기 절반 아래, 노이즈 약하게) */
} /* 폰은 예전 값 */ @media (max-width: 640px) { :root { --d2-gA: 20%; --d2-gB: 14%; --d2-gC: 12%; --d2-noise: .08; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --d2-grid: 5%; --d2-gA: 11%; --d2-gB: 4%; --d2-gC: 6%; --d2-noise: .035; } /* 폰은 예전 값 */ @media (max-width: 640px) { :root:not([data-theme="light"]) { --d2-gA: 22%; --d2-gB: 11%; --d2-gC: 14%; --d2-noise: .06; } } }
:root[data-theme="dark"] { --d2-grid: 5%; --d2-gA: 11%; --d2-gB: 4%; --d2-gC: 6%; --d2-noise: .035; } /* 폰은 예전 값 */ @media (max-width: 640px) { :root[data-theme="dark"] { --d2-gA: 22%; --d2-gB: 11%; --d2-gC: 14%; --d2-noise: .06; } }

/* ================= 2. 숫자 화면 문법 (판매·재고 · 실판매 · 매출 · 미수금 · 부자재 · 분석) =================
   숫자·상태·시각 열은 가운데, 이름·글 열은 왼쪽. 합계 줄도 가운데. 같은 폭 숫자. 머리글·합계 줄 고정은 불투명 배경(기존 줄이 이미 그렇고 아래에서 못 박는다). */
/* 2-1. 표 숫자 칸 가운데(칸 안 좌우 여백을 같게) */
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page :is(.ps-c, .ps-fc).ui-num {
  justify-content: center; text-align: center; padding-left: var(--d2-cellpad); padding-right: var(--d2-cellpad);
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
/* 2-2. 머리글(숫자 열) 가운데. 이름 열 머리글은 왼쪽 그대로 */
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page .ps-hc.ui-num {
  align-items: center; text-align: center; padding-left: 4px; padding-right: 4px;
}
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page .ps-hcol { align-items: center; }
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page .ps-gh .xt-topsum { display: block; text-align: center; padding-right: 0; }
#page-recv.ui.ps-page .rv-owners .ps-gh .xt-topsum { text-align: center; padding-right: 0; }
#page-recv.ui.ps-page .ps-tpick .ps-tmeta { flex: none; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }      /* 왼쪽 '보기' 목록의 건수 */
#page-realsales.ui.ps-page .rs-rk { text-align: center; }
:is(#page-sales, #page-parts).ui.ps-page .ps-c.ps-stat { justify-content: center; }
/* 2-3. 날짜·시각 열(미수금 첫 칸): 표에 거래처 칸(.ps-left)이 있을 때만 가운데(2026-10-26 속도: 줄마다 :has 대신 표 묶음 한 번) */
#page-recv.ui.ps-page .ps-cat:has(> .ps-row > .ps-c.ps-left) > .ps-row > .ps-c.ps-name { justify-content: center; text-align: center; }
#page-recv.ui.ps-page .ps-head :is(.ps-hc.ps-name):not(:last-child) { text-align: center; align-items: center; }
/* 2-4. 맨 위 숫자 블록(KPI)·칩·합계 칸: 가운데 */
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page .mx-kpis .mx-kpi { text-align: center; }
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page .mx-kpis .mx-kpi:is(:first-child, :nth-child(odd)) { padding-left: 16px; }
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page .mx-kpis .mx-kmain { justify-content: center; }
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page :is(.rs-k, .ps-stats > div) { text-align: center; }
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts).ui.ps-page .rs-k > * { text-align: center; }
/* 2-5. 분석: 숫자(막대 옆 값·증감·보조 값·순번)와 그 머리글 가운데 */
#page-analysis.ui.ps-page :is(.an3-val, .an3-d, .an3-ex, .an3-no, .an3-colhead .an3-d, .an3-colhead .an3-ex) { text-align: center; }
#page-analysis.ui.ps-page .an3-colhead > span:not(.an3-nm):not(:nth-child(2)) { text-align: center; }
/* 2-6. 같은 폭 숫자: 칸 단위로 못 박는다 */
:is(#page-sales, #page-realsales, #page-ledger, #page-recv, #page-parts, #page-analysis).ui.ps-page :is(.ps-c, .ps-fc, .ps-hc, .mx-kv, .rs-kv, .n2r-kv, .ps-chip-val, .an3-val, .an3-d, .an3-ex, .an3-no, .an3-tot, b) {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
/* 2-8. 상태 점: 미수금의 색 칸(발행·입금·출고·예정)에 점을 붙여 '점 + 글자'로. 배경 색은 지금 그대로, 점이 뜻 색을 따로 알린다 */
#page-recv.ui.ps-page .ps-c.rv-tint::before { content: none; display: none; }
#page-recv.ui.ps-page .ps-c.rv-tint-good { --d2-dot: var(--d2-good); }
#page-recv.ui.ps-page .ps-c.rv-tint-warn { --d2-dot: var(--d2-warn); }
#page-recv.ui.ps-page .ps-c.rv-tint-info { --d2-dot: var(--d2-info); }
/* 2-9. 머리글·합계 줄 고정: 배경이 비치지 않게 불투명으로 못 박는다(이미 고정된 줄만. 새로 고정하지 않는다) */
.ui.ps-page .ps-head { background-color: var(--ps-bg); }
.ui.ps-page .ps-hc { background-color: var(--ps-head-tint, var(--ps-bg)); }
.ui.ps-page .ps-row.xt-foot .ps-c, .ui.ps-page .ps-fc { background-color: var(--ps-head-tint, var(--ps-panel)); }

/* 2-10. 글자 12px 미만 0: 11px 이던 보조 글자를 12px 로(분석 상태 글자 · 부자재 코드·합계·상태) */
#page-analysis.ui.ps-page.ps-page .an3-nm .rv-st, #page-analysis.ui.ps-page.ps-page .rv-st { font-size: 12px; }
#page-parts.ui.ps-page.ps-page :is(.ps-tcode, .ps-catcode, .ps-facsum, .ps-chk, .ps-neg-st, .ps-gh.ps-gs, .ps-gh.ps-gs *, .ps-nums > div > span) { font-size: 12px; }

/* ================= 3. 배경 그래픽(효과 켜짐일 때만) =================
   html 에 고정한 층 3겹: 격자 + 가장자리 번짐(::before), 빛무리 3개(design2.js 가 만드는 .d2-bg, 스크롤을 따라 천천히 움직임), 노이즈(::after).
   모두 pointer-events 없음 · 글자 뒤(z-index -1). body 배경을 비워 이 층이 보이게 한다(html 배경색이 같은 색이라 모양 변화 없음).
   표 칸은 불투명 배경이라 숫자 위로 올라오지 않는다. 달력·메모 화면에서는 그리지 않는다. */
html[data-fx="on"] body { background: transparent; }
html[data-fx="on"]::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 900px 520px at 14% -6%, color-mix(in srgb, var(--d2-accent) 10%, transparent), transparent 65%);   /* 격자 무늬는 뺐다(차장 2026-10-23: 바탕은 깔끔하게) */
  -webkit-mask-image: linear-gradient(black 40%, rgba(0, 0, 0, .35)); mask-image: linear-gradient(black 40%, rgba(0, 0, 0, .35));
} /* 폰은 예전 값 */ @media (max-width: 640px) { html[data-fx="on"]::before { -webkit-mask-image: linear-gradient(#000 40%, rgba(0, 0, 0, .35)); mask-image: linear-gradient(#000 40%, rgba(0, 0, 0, .35)); } }
html[data-fx="on"]::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--d2-noise);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
} /* 폰은 예전 값 */ @media (max-width: 640px) { html[data-fx="on"]::after { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>"); } }
.d2-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.d2-bg .g { position: absolute; display: block; border-radius: var(--r-pill); width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; } /* 폰은 예전 값 */ @media (max-width: 640px) { .d2-bg .g { border-radius: 50%; } }
.d2-bg .g.a { left: -18vw; top: -24vw; background: radial-gradient(closest-side, color-mix(in srgb, var(--d2-accent) var(--d2-gA), transparent), transparent); }
.d2-bg .g.b { right: -20vw; top: 18vh; background: radial-gradient(closest-side, color-mix(in srgb, var(--ps-warnc, var(--d2-accent)) var(--d2-gB), transparent), transparent); }
.d2-bg .g.c { left: 22vw; bottom: -34vw; background: radial-gradient(closest-side, color-mix(in srgb, var(--d2-accent) var(--d2-gC), transparent), transparent); }
html[data-fx="off"] .d2-bg { display: none; }
/* 은은히 흐르는 빛(차장 2026-10-26 "배경에 은은하게 움직이는 그림도 되고, 너무 화려하지 않게"): 빛 두 개가 수십 초에 걸쳐 몇 % 떠다닌다.
   translate 속성만 움직여(스크롤 따라 흐름은 transform 이라 서로 안 겹침) 그리기 비용 없음. 효과 끔·움직임 줄이기면 빛째 없다.
   UI 반응 효과가 아니라 배경이라 450ms 상한 대상이 아니다(audit_parts 는 .d2-bg 를 '배경 흐름'으로 따로 센다) */
@keyframes d2-drift-a { from { translate: 0 0; } to { translate: 4vw 3vh; } }
@keyframes d2-drift-c { from { translate: 0 0; } to { translate: -5vw -2vh; } }
html[data-fx="on"] .d2-bg .g.a { animation: d2-drift-a 38s ease-in-out infinite alternate; }
html[data-fx="on"] .d2-bg .g.c { animation: d2-drift-c 46s ease-in-out infinite alternate; }
html:not(#_):has(> body[data-page="calendar"], > body[data-page="memo"])::before, html:not(#_):has(> body[data-page="calendar"], > body[data-page="memo"])::after, html:not(#_):has(> body[data-page="calendar"], > body[data-page="memo"]) .d2-bg { display: none; }
/* 폰: 가볍게. 격자 + 빛무리 하나만(노이즈·나머지 빛무리 없음) */
@media (max-width: 640px) {
  html[data-fx="on"]::after { display: none; }
  .d2-bg .g.b, .d2-bg .g.c { display: none; }
  .d2-bg .g.a { width: 120vw; height: 120vw; left: -30vw; top: -50vw; }
}

/* ================= 4. 모션 보조 (motion.css 가 이미 하는 것은 안 건드린다: 화면 전환 · 눌림 · 카드 호버 · 막대 · 숫자 올라가기 · 목록 이동 · 토스트) =================
   추가분: (a) 눌러서 거르는 칩 톡 (b) 분석 줄 눌림 (design2.js 가 하는 일: 빛무리 스크롤 · 구간 올라오기 · 앞쪽 줄 차례 등장 · 칩 톡) */
html[data-fx="on"] .an3-click { transition: transform var(--m-quick) var(--d2-out); } /* 폰은 예전 값 */ @media (max-width: 640px) { html[data-fx="on"] .an3-click { transition: transform 160ms var(--d2-out); } }
html[data-fx="on"] .an3-click:active { transform: scale(.985); }

@media (prefers-reduced-motion: reduce) {
  html[data-fx="on"]::before, html[data-fx="on"]::after, html[data-fx="on"] .d2-bg { display: none; }
}

/* ================= 윗부분 좁히기(차장 2026-10-23: 위쪽을 잘 쓰기, 바탕 가로줄 없애기). 컴퓨터 폭만 =================
   모든 화면: 제목·탭·자동 갱신 줄 밑의 가로줄을 없애고, 제목 글자와 위아래 여백을 줄여 표·달력이 한 화면에 더 들어오게 한다.
   판매·재고·부자재: 위 탭 이름이 화면 이름이라 큰 제목은 숨긴다. 폰(640 이하)은 그대로 */
@media (min-width: 641px) {
  body .main { padding-top: 10px; }
  body .pg-tabs { border-bottom: 0; margin-bottom: 2px; }
  body .pg-tabs a { min-height: 36px; }
  body .ui.ps-page .ui-head { border-bottom: 0; padding-bottom: 4px; margin-bottom: 6px; }
  body .ui.ps-page .ui-title { font-size: 22px; }
  body .ui.ps-page .ps-fs { border-bottom: 0; margin-bottom: 6px; }
  body .ui.ps-page .ps-fs-sum { min-height: 32px; padding: 2px 0; }
  body .ui.ps-page .ps-livebar { border-top: 0; border-bottom: 0; padding-top: 6px; padding-bottom: 6px; margin-bottom: 8px; }
  body #page-sales.ui.ps-page .ui-head .ui-title, body #page-parts.ui.ps-page .ui-head .ui-title { display: none; }
  body #page-sales.ui.ps-page .ui-head:not(:has(.ui-actions *)), body #page-parts.ui.ps-page .ui-head:not(:has(.ui-actions *)) { display: none; }
}

/* ================= 화면별 윗부분 한 줄(차장 2026-10-23: 미수금·실판매·분석·달력도 전체매출처럼). 컴퓨터 폭만 ================= */
@media (min-width: 901px) {
  /* 미수금: 자동 갱신 줄을 제목 줄 오른쪽으로 올리고, 큰 숫자 4칸은 한 줄(이름 · 숫자 · 건수) */
  body #page-recv.ui.ps-page .ui-head + .rv-stat { align-self: flex-end; width: fit-content; max-width: 60%; margin-left: auto; margin-top: -44px; min-height: 40px; padding: 0; margin-bottom: 4px; position: relative; z-index: 2; }
  body #page-recv.ui.ps-page .mx-kpis.rv-kcompact { margin-bottom: 6px; }
  body #page-recv.ui.ps-page .mx-kpis.rv-kcompact .mx-kpi { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 2px 8px; padding: 4px 12px; }
  body #page-recv.ui.ps-page .mx-kpis.rv-kcompact .mx-kl { width: auto; font-size: 12.5px; }
  body #page-recv.ui.ps-page .mx-kpis.rv-kcompact .mx-kv { font-size: 22px; }
  body #page-recv.ui.ps-page .mx-kpis.rv-kcompact .mx-kn { font-size: 12px; }
  /* 실판매: 큰 숫자 띠를 낮게 */
  body #page-realsales.ui.ps-page .n2r-bt { margin: 2px 0 8px; font-size: 17px; }
  body #page-realsales.ui.ps-page .n2r-kpi { margin-bottom: 8px; }
  body #page-realsales.ui.ps-page .n2r-kl { padding: 4px 8px; font-size: 12.5px; }
  body #page-realsales.ui.ps-page .n2r-kmain { padding-top: 4px; padding-bottom: 4px; min-height: 0; }
  body #page-realsales.ui.ps-page .n2r-kv { font-size: 22px; }
  body #page-realsales.ui.ps-page .n2r-stat { flex: none; border-bottom: 0; margin: 0 0 2px; }
  body #page-realsales.ui.ps-page .n2r-stat > summary { min-height: 32px; }
  /* 달력: 상태 줄 높이 줄이기 */
  body #page-calendar.ui.ps-page .cal-livebar { min-height: 34px; }
}
/* 버튼 정리(차장 2026-10-23): 켜진 토글(총판 제외·총판만·오름/내림 등)은 주황으로 눈에 띄게, 버튼 높이는 한 가지로. 컴퓨터 폭만 */
@media (min-width: 901px) {
  body .ui.ps-page .ui-chip[aria-pressed="true"] { background: var(--ps-ac-tint, transparent); border-color: var(--ps-ac); color: var(--ps-ac-ink, inherit); font-weight: 500; }
  body .ui.ps-page .ui-head .ui-btn, body .ui.ps-page .ui-head .ui-chip, body .ui.ps-page .ui-head .ui-input { min-height: 34px; }
}

/* ================= 왼쪽 메뉴 -> 맨 위 가로 메뉴(차장 2026-10-23: 왼쪽을 비워 표·달력을 화면 폭 전부로). 컴퓨터 폭(861 이상)만 =================
   앱으로 설치해 쓰면(제목 줄 숨기기를 켠 경우) 창 제목 줄 자리에 메뉴가 들어간다(manifest display_override: window-controls-overlay).
   빈 곳을 끌면 창이 움직이고, 메뉴·버튼은 눌린다. 폰(640 이하)은 아래 메뉴 그대로 */
@media (min-width: 861px) {
  body .shell { flex-direction: column; }
  body .nav { width: auto; height: 40px; position: sticky; top: 0; z-index: 50; flex: none; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 2px; padding: 0 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  body .nav .brand { display: block; flex: none; padding: 0 16px 0 4px; font-size: 14px; font-weight: 500; white-space: nowrap; }
  body .nav a { flex: none; height: 100%; padding: 0 12px; font-size: 14px; white-space: nowrap; box-shadow: none; }
  /* 지금 화면 = 주황 알약 하나(2026-10-27 화면 통일 2단계, 밑줄 막대·옅은 칸은 뺌). 알약은 a 안쪽 ::before 라 효과 켬/끔 모두 같은 모양 */
  :root:root body .nav { background: var(--ps-panel); border-bottom: 1px solid var(--ps-hair); }
  :root:root body .nav a.on { position: relative; isolation: isolate; box-shadow: none; font-weight: 500; background: transparent; color: var(--p-ac-ink); }
  :root:root body .nav a.on::before { content: ""; position: absolute; inset: 6px 2px; z-index: -1; border-radius: var(--r-pill); background: var(--p-ac); pointer-events: none; }
  body .nav .nav-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 2px; }      /* 오른쪽 묶음(ui.js NavRight): 연동·환율·화면 모양·연결·이름 */
  body .nav .nav-theme { margin: 0; flex: none; }
  body .nav .nt-btn { width: auto; height: 40px; padding: 0 10px; font-size: 12.5px; justify-content: flex-start; }
  body .nav .nt-txt { display: flex; flex-direction: row; align-items: baseline; gap: 6px; }
  body .nav .nav-foot { flex: none; margin: 0; padding: 0 8px; white-space: nowrap; }
  body .nav .nav-fx { display: flex; align-items: center; gap: 12px; flex: none; margin: 0; padding: 0 8px; white-space: nowrap; }
  body .nav .nav-fx[hidden] { display: none; }
  body .nav .nav-fx .fx-row { gap: 6px; }
  body .nav .au-me { width: auto; height: 40px; padding: 0 8px; flex: none; }
  body .main { padding-left: 20px; padding-right: 20px; }
  body[data-page] .main:not(._) { height: auto; flex: 1 1 auto; min-height: 0; }
}
@media (min-width: 861px) and (display-mode: window-controls-overlay) {
  body .nav { position: fixed; top: env(titlebar-area-y, 0); left: env(titlebar-area-x, 0); width: env(titlebar-area-width, 100%); height: env(titlebar-area-height, 40px); border-bottom: 0; -webkit-app-region: drag; app-region: drag; }
  body .nav a, body .nav button, body .nav .nav-fx, body .nav .nav-theme, body .nav .nav-foot, body .nav .nav-right { -webkit-app-region: no-drag; app-region: no-drag; height: env(titlebar-area-height, 40px); }
  body .shell { padding-top: env(titlebar-area-height, 40px); }
}

/* ================= 네 화면 공통 윗부분(차장 2026-10-24) =================
   첫 줄: 제목 · 기간(이전·고르기·다음) · 오른쪽 끝 자동 갱신 상태 / 둘째 줄: 보기 탭 · 검색 · 거르기 · 오른쪽 끝 그 화면 단추 · 엑셀 내보내기.
   tb-push = 그 뒤를 오른쪽 끝으로, tb-brk = 줄 바꿈 */
body .ui-head .ui-actions, body .ui.ps-page .ui-head .ui-actions { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-left: 0; }
.tb-push { margin-left: auto; }
.tb-brk { flex-basis: 100%; height: 0; }
.tb-right { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tb-row2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
@media (min-width: 901px) {
  body .ui.ps-page .ui-head { align-items: center; }
  body .ui.ps-page .ui-head .ui-title { margin-right: 10px; }
  body .ui.ps-page .ui-head .ps-livebar, body .ui.ps-page .ui-head .n2r-stat { margin: 0; padding: 0; border: 0; min-height: 0; }
  body .ui.ps-page .ui-head .n2r-stat > summary { min-height: 34px; }
  /* 기간 고르기 모양 통일: 이전·다음 단추와 고르기 칸 높이·글자 */
  body .ui.ps-page .ui-head .lq-nav .ui-btn, body .ui.ps-page .ui-head .lg-ynav .ui-btn, body .ui.ps-page .ui-head .rv-mnav .ui-btn { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
  body .ui.ps-page .ui-head .lq-pick, body .ui.ps-page .ui-head .lg-msel { min-height: 34px; font-size: 14px; width: auto; min-width: 150px; }
  body #page-realsales.ui.ps-page .ui-head .lg-msel, body #page-ledger.ui.ps-page .ui-head .lq-pick, body #page-recv.ui.ps-page .ui-head .lq-pick { width: auto; min-width: 150px; }
  body .ui.ps-page .ui-head .lg-year, body .ui.ps-page .ui-head .rv-mlabel { font-size: 16px; font-weight: 500; min-width: 0; padding: 0 8px; }
  body .ui.ps-page .ui-head .rv-mnav, body .ui.ps-page .ui-head .lg-ynav, body .ui.ps-page .ui-head .lq-nav { display: inline-flex; align-items: center; gap: 4px; }
  body #page-recv.ui.ps-page .rv-mbar.tb-row2 { margin: 0 0 6px; }
  body #page-recv.ui.ps-page .rv-mbar.tb-row2 .rv-mright { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  body #page-ledger.ui.ps-page .lq-top1 > .lq-ptools { margin-left: auto; }
  /* 판매·재고: 자동 갱신을 위 탭(판매·재고·부자재) 줄 오른쪽 끝으로 */
  body #page-sales.ui.ps-page { position: relative; }
  body #page-sales.ui.ps-page .ps-bar2-r .ps-fs { position: absolute; right: 0; top: -40px; }
}

/* ================= 위 한 줄 + 맨 위 메뉴 줄 가운데 상태(차장 2026-10-24) =================
   NavSlot: 화면마다의 자동 갱신 상태를 맨 위 메뉴 줄 가운데에. 펼치면 아래로 떠서 화면을 밀지 않는다 */
@media (min-width: 861px) {
  body .nav .nav-slot { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; align-items: center; position: relative; padding: 0 12px; font-size: 12.5px; }
  /* 자리가 모자라면 상태 글이 메뉴 위로 넘쳐 겹치던 것(2026-10-27 1536 폭 실측) → 글 줄만 잘라 메뉴와 안 겹치게. 펼친 목록(절대 위치)은 잘리지 않는다 */
  body .nav .nav-slot > * { min-width: 0; max-width: 100%; }
  body .nav .nav-slot :is(.ps-fs-sum, .n2r-stat > summary, .lq-ss-sum, .rv-ss-sum) { min-width: 0; max-width: 100%; overflow: hidden; }
  /* 실제 class 는 .rv-ss(미수금 단추)·.lq-ss(전체매출 단추)라 위 줄이 못 잡았다(2026-10-27 1366 라이트 실측: 오른쪽 묶음과 116px 겹침) → 글 줄(-t)이 줄어들며 …로 잘리고 '펼치기'는 남는다 */
  body .nav .nav-slot :is(.rv-ss, .lq-ss) { min-width: 0; max-width: 100%; overflow: hidden; }
  body .nav .nav-slot :is(.rv-ss-t, .lq-ss-t) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  body .nav .nav-slot .n2r-stat > summary small { font-size: 12px; margin-left: 8px; }
  /* 가운데 상태 띠 단추(.rv-ss·.lq-ss)는 화면 쪽 규칙(#page-… 안)이 닿지 않아 브라우저 기본 상자(테두리·바탕)로 보이던 것 → 테두리 0·바탕 없음 */
  body .nav .nav-slot :is(.rv-ss, .lq-ss) { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ps-text2); font: inherit; cursor: pointer; white-space: nowrap; }
  body .nav .nav-slot :is(.rv-ss, .lq-ss):hover { color: var(--ps-text); }
  body .nav .nav-slot :is(.rv-ss, .lq-ss):focus-visible { outline: 0; box-shadow: var(--p-ring); border-radius: var(--r-sm); }
  body .nav .nav-slot > * { margin: 0; padding: 0; border: 0; min-height: 0; background: transparent; position: relative; white-space: nowrap; }
  body .nav .nav-slot .ps-fs-sum, body .nav .nav-slot .n2r-stat > summary { min-height: 0; padding: 0; gap: 8px; }
  /* 위 메뉴 줄 상태 단추(미수금 시트 · 매출 조회 경고)는 높이 24px 이상: 누르기 쉽게(검사 20번) */
  html body .nav .nav-slot :is(.rv-ss, .lq-ss) { min-height: 24px; }
  body .nav .nav-slot .lq-ss-body, body .nav .nav-slot .rv-ss-body, body .nav .nav-slot .n2r-stbody, body .nav .nav-slot .ps-fs-detail { position: absolute; right: 0; top: calc(100% + 8px); z-index: 120; width: min(900px, 80vw); padding: 10px 14px; background: var(--ps-raised, var(--ps-bg)); border: 1px solid var(--ps-rule); box-shadow: 0 10px 28px rgba(0, 0, 0, .4); white-space: normal; }
  body .nav .nav-theme { margin-left: 0; }
  /* 위 한 줄의 숫자(청구·총 매출 등) */
  .tb-kpi { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; margin: 0 6px; }
  .tb-kl { font-size: 12.5px; color: var(--ps-text2, inherit); }
  .tb-kv { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; color: var(--ps-ac-ink, var(--ps-text)); font-variant-numeric: tabular-nums; }
  .tb-ku, .tb-kn { font-size: 12px; color: var(--ps-muted, inherit); }
  body #page-realsales.ui.ps-page .n2r-bt { display: flex; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; }
  body #page-realsales.ui.ps-page .n2r-bt .tb-kv { font-size: 20px; }
  body #page-ledger.ui.ps-page .ui-head .lq-top1 { margin: 0 6px; padding: 0; }
  body #page-ledger.ui.ps-page .ui-head .lq-top1 .lq-cmp { display: none; }
  body #page-ledger.ui.ps-page .ui-head .lq-top1 .lq-kpis .mx-kv { font-size: 22px; }
  body #page-ledger.ui.ps-page .lq-bar2 > .tb-right { margin-left: auto; }
  body #page-recv.ui.ps-page .rv-vchips { align-items: center; }
  body #page-recv.ui.ps-page .rv-vchips .rv-vsearch { margin-left: auto; }
  body #page-recv.ui.ps-page .rv-vchips .rv-vsearch .ps-search { min-width: 200px; min-height: 34px; }
  /* 판매·재고: 판정 칩 줄을 위 탭(판매·재고·부자재) 줄 오른쪽으로 올려 한 줄로 */
  body #page-sales.ui.ps-page .ps-bar2 { margin-top: -40px; padding-left: 210px; min-height: 0; }
  body #page-sales.ui.ps-page .ps-chip { min-height: 36px; padding: 2px 10px 0; }
  body #page-sales.ui.ps-page .ps-chip-val { font-size: 19px; }
  body #page-sales.ui.ps-page .ps-sw, body #page-sales.ui.ps-page .ps-exp { min-height: 36px; }
}
/* 1440 이하 PC: 화면 이름은 맨 위 메뉴에 이미 켜져 있으니 숨겨서 위 줄을 한 줄로 */
@media (min-width: 861px) and (max-width: 1440px) {
  body #page-recv.ui.ps-page .ui-head-text, body #page-ledger.ui.ps-page .ui-head-text, body #page-realsales.ui.ps-page .ui-head-text { display: none; }
}
@media (max-width: 860px) { body .nav .nav-slot { display: none; } body .nav .nav-right { display: contents; } }      /* 폰·좁은 폭: 묶음 상자를 풀어 예전 자리 규칙 그대로 */
/* 판매·재고 왼쪽 상세(차장 2026-10-24): 입고 이력은 안쪽 스크롤 없이 다 펼치고(패널 하나만 스크롤), 판정 고르기는 두 칸에 글이 겹치지 않게 */
@media (min-width: 861px) {
  body #page-sales.ui.ps-page .ps-detail .ps-intab { max-height: none; overflow: visible; }
  body #page-sales.ui.ps-page .ps-detail .ps-infoot { position: static; }
  body #page-sales.ui.ps-page .ps-detail .ps-radios { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
  body #page-sales.ui.ps-page .ps-detail .ps-radio { white-space: normal; min-width: 0; align-items: flex-start; padding: 5px 0; }
  body #page-sales.ui.ps-page .ps-detail .ps-radio input { flex: none; margin-top: 1px; }
  body #page-sales.ui.ps-page .ps-detail .ps-radio > span { min-width: 0; overflow-wrap: anywhere; }
  /* 전체매출 상세의 막힌 것 한 줄 */
  body #page-ledger.ui.ps-page .fl-brief { margin: 8px 0 4px; }
  body #page-ledger.ui.ps-page .fl-brief .fl-chips { margin-top: 0; }
}
.ui.ps-page .mb-sec:empty { display: none; }
.ui.ps-page .mb-sec:has(> .fl-brief[hidden]) { display: none; }
/* 판매·재고 왼쪽 상세: 입고 예정·메모 줄은 잘리지 않게 줄을 넘긴다(차장 2026-10-24) */
@media (min-width: 861px) {
  body #page-sales.ui.ps-page .ps-detail .ps-clip1 { white-space: normal; overflow: visible; text-overflow: clip; display: block; -webkit-line-clamp: unset; }
}
