/* ds.css — AutoWork v2 디자인 시스템 (세트 0: 토큰 + 공통 셸)
 * 기준: docs/assets/design/design_guide.md 2·3·4·8장, 시안 docs/assets/design/mockups/*.dc.html
 * 새 화면(ui_v2)을 켠 계정만 로드된다(routers/pages.py _V2_HEAD). 모든 규칙은 html.ui-v2 아래 — 꺼진 계정 화면에는 영향 없음.
 * 옛 화면 변수(--v7-*, --accent, --text, --g500 …)는 여기서 토큰으로 덮어쓴다. 옛 보라 값 자체(theme.css·각 화면)는 전 화면 v2 전환 뒤 제거.
 */

@font-face { font-family: 'Pretendard'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/pretendard/Pretendard-Regular.subset.woff2) format('woff2'); }
@font-face { font-family: 'Pretendard'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/pretendard/Pretendard-SemiBold.subset.woff2) format('woff2'); }
@font-face { font-family: 'Pretendard'; font-style: normal; font-weight: 700 900; font-display: swap; src: url(/static/fonts/pretendard/Pretendard-Bold.subset.woff2) format('woff2'); }

/* ── 1. 토큰 (가이드 2·3·4·8장) ─────────────────────────────── */
html.ui-v2, html.ui-v2 body {
  /* 바탕과 면 */
  --bg: #F7F7F8 !important; --surface: #FFFFFF !important; --fill: #F0F0F2 !important; --fill-2: #F7F7F8 !important;
  --line: #F0F0F2 !important; --line-2: #E8E8EB !important;
  /* 글자 */
  --ink: #111315 !important; --ink-2: #5E6168 !important; --ink-3: #6B6E75 !important; --ink-4: #8E9096 !important;
  /* 역할 색 */
  --brand-red: #E8242B !important; --point: #2F6BEA !important; --point-2: #B9CDF8 !important; --point-dark: #1A4FC4 !important; --point-bg: #EAF0FD !important;
  --ok: #1E7A4C !important; --ok-bg: #E6F6EE !important;
  --warn: #8A5200 !important; --warn-bg: #FFF3DD !important; --warn-bar: #E8913A !important;
  --bad: #B3271D !important; --bad-bg: #FDECEB !important; --bad-bar: #D9483B !important;
  --online: #22B573;
  --row-hover: #F7F8FB;
  /* 글자 — 10/13 애플(README 1장): 맥 = 시스템 글꼴 · 윈도 = Pretendard(static/fonts 자체 서버 · 바깥 요청 0) */
  --ds-font: -apple-system, BlinkMacSystemFont, Pretendard, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  /* 큰 제목 28/700/−0.02em · 제목 20/700 · 소제목 15/600 · 본문 13.5/400 · 보조 12 (옛 44 → 28) */
  --fs-display: 28px; --fs-title: 20px; --fs-section: 15px; --fs-kpi: 27px; --fs-body: 13.5px; --fs-table: 13px; --fs-caption: 12px; --fs-micro: 12px;
  /* 색 뜻(README 1장 · 같은 뜻 = 같은 색) — 파랑 강조 · 먹 · 초록 켜짐/좋아짐 · 주황 주의 · 빨강 위험 · 청록 · 보라 결재 · 회색 */
  --c-blue: #2F6BEA; --c-ink: #111315; --c-on: #34C759; --c-good: #1E9E5A; --c-orange: #E8913A; --c-red: #D9483B; --c-teal: #22A39F; --c-purple: #7B5CE0; --c-gray: #8E9096;
  --t1: #111315; --t2: #5E6168; --t3: #8E9096;
  /* 채널 색(모든 화면 · 차트 · 배지 같게) */
  --ch-naver: #2F6BEA; --ch-toss: #22A39F; --ch-coupang: #E8913A; --ch-etc: #B9BBC0;
  /* 모서리 — 창 14 · 카드 14 · 위젯 20 · 버튼/입력/세그 8(세그 안 7) · 메뉴 10 · 배지 999 */
  --r-window: 14px; --r-card-lg: 14px; --r-card: 14px; --r-widget: 20px; --r-ctl: 8px; --r-seg-in: 7px; --r-menu: 10px; --r-input: 8px; --r-chip: 8px; --r-pill: 999px;
  /* 그림자 — 카드 · 떠 있는 것(시트 · 메뉴 · 창) */
  --shadow-card: 0 0 0 .5px rgba(0,0,0,.09), 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(17,19,21,.04);
  --shadow-card-hover: 0 0 0 .5px rgba(0,0,0,.12), 0 10px 26px rgba(17,19,21,.08);
  --shadow-card-sm: 0 0 0 .5px rgba(0,0,0,.09), 0 1px 2px rgba(0,0,0,.04);
  --shadow-float: 0 0 0 .5px rgba(0,0,0,.14), 0 12px 32px rgba(17,19,21,.20);
  --shadow-window: 0 0 0 1px rgba(0,0,0,.08), 0 22px 70px rgba(17,19,21,.18), 0 2px 6px rgba(17,19,21,.06);
  --shadow-sheet: 0 0 0 .5px rgba(0,0,0,.12), 0 24px 60px rgba(17,19,21,.22);
  /* 재질 — 제목줄 · 사이드바 · 시트 · 메뉴 · 알림 = 반투명 + 흐림(안 되는 브라우저는 아래 @supports 에서 흰 바탕) */
  --mat-bar: rgba(246,246,248,.92); --mat-side: rgba(242,243,246,.9); --mat-pop: rgba(246,246,248,.92); --mat-sheet: rgba(255,255,255,.88);
  --mat-blur: saturate(180%) blur(20px); --mat-blur-lg: saturate(180%) blur(24px);
  --desk: #E6E7EB;
  /* 움직임 — 카드 1px 떠오름 0.18s · 시트 · 배너 미끄러짐 · '움직임 줄이기'면 6장에서 모두 끔 */
  --ease: cubic-bezier(.32,.72,0,1); --fast: .2s; --base: .35s; --slow: .5s; --draw: .8s; --lift: .18s;

  /* 옛 화면 변수 → 토큰 (theme.css --v7-*) */
  --v7-accent: var(--ink) !important; --v7-accent-hover: #2A2C31 !important; --v7-accent-mid: var(--ink-3) !important;
  --v7-accent-soft: var(--fill) !important; --v7-accent-soft-2: var(--line-2) !important;
  --v7-blue: var(--point) !important; --v7-indigo: var(--point) !important; --v7-red: var(--bad-bar) !important;
  --v7-green: var(--ok) !important; --v7-emerald: var(--ok) !important; --v7-amber: var(--warn-bar) !important; --v7-orange: var(--warn-bar) !important;
  --v7-bg: var(--bg) !important; --v7-card: var(--surface) !important; --v7-surface: var(--fill-2) !important; --v7-hover: var(--row-hover) !important;
  --v7-text: var(--ink) !important; --v7-text-sub: var(--ink-3) !important; --v7-text-mute: var(--ink-4) !important;
  --v7-border: var(--line) !important; --v7-border-2: var(--line-2) !important;
  --v7-font: var(--ds-font) !important; --v7-fh: var(--ds-font) !important; --v7-fn: var(--ds-font) !important;
  --v7-float: var(--shadow-card) !important; --v7-float-sm: var(--shadow-card-sm) !important;
  /* 옛 화면 변수 → 토큰 (각 화면 :root 공통 이름) */
  --accent: var(--ink) !important; --accent-rgb: 17,19,21 !important; --accent-soft: var(--fill) !important;
  --purple: var(--ink) !important; --indigo: var(--point) !important; --blue: var(--point) !important;
  --red: var(--bad-bar) !important; --green: var(--ok) !important; --orange: var(--warn-bar) !important;
  --text: var(--ink) !important; --text-secondary: var(--ink-2) !important; --text-muted: var(--ink-3) !important; --text-sub: var(--ink-3) !important; --sub: var(--ink-3) !important;
  --border: var(--line-2) !important; --border-strong: var(--line-2) !important; --hover-bg: var(--row-hover) !important;
  --bg-card: var(--surface) !important; --card: var(--surface) !important; --black: var(--ink) !important; --white: #FFFFFF !important;
  --g50: #F7F7F8 !important; --g100: #F0F0F2 !important; --g200: #E8E8EB !important; --g300: #C9CACE !important; --g400: #8E9096 !important;
  --g500: #6B6E75 !important; --g600: #3C3F45 !important; --g700: #2A2C31 !important; --g800: #1D1F22 !important; --g900: #111315 !important;
  --font: var(--ds-font) !important; --float-sm: var(--shadow-card-sm) !important;
  --apx-red: var(--bad) !important; --apx-green: var(--ok) !important; --apx-amber: var(--warn) !important;
  color-scheme: light;
}

/* ── 2. 바탕 (가이드 3장: 글꼴 · 한글 줄바꿈 · 숫자) ─────────── */
html.ui-v2 body {
  background: var(--bg) !important; color: var(--ink);
  font-family: var(--ds-font) !important;
  word-break: keep-all; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
html.ui-v2 body :is(h1, h2, h3, h4, h5, h6, button, input, select, textarea, th, td, label) { font-family: var(--ds-font) !important; }
html.ui-v2 body :is(code, pre, kbd, .mono) { overflow-wrap: anywhere; }
html.ui-v2 #bg-canvas { display: none !important; }
html.ui-v2 a:focus-visible, html.ui-v2 button:focus-visible, html.ui-v2 input:focus-visible,
html.ui-v2 select:focus-visible, html.ui-v2 textarea:focus-visible, html.ui-v2 [tabindex]:focus-visible,
html.ui-v2 :focus-visible { outline: 2px solid var(--point); outline-offset: 2px; }
html.ui-v2 :where(a:not([class])) { color: var(--point-dark); }   /* 이름 없는 링크 — 회색 바탕에서도 4.5:1(브라우저 기본 #0000EE·방문 보라 대신) */
html.ui-v2 :where(a:not([class])):hover { color: var(--ink); }
html.ui-v2 ::selection { background: var(--point-bg); color: var(--ink); }
html.ui-v2 ::-webkit-scrollbar-thumb { background: #D5D6DA; }
html.ui-v2 ::-webkit-scrollbar-thumb:hover { background: #B9BAC0; }

/* ── 3. 위쪽 바 (시안 StockRefined header) ──────────────────── */
html.ui-v2 [data-ds-legacy-hidden] { display: none !important; }
.ds-topbar {
  position: sticky; top: 0; z-index: 900;
  background: rgba(247,247,248,.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 transparent; transition: box-shadow .3s ease;
  font-family: var(--ds-font);
}
.ds-topbar.is-scrolled { box-shadow: 0 1px 0 #E5E5E8; }
.ds-topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-sizing: border-box; }
.ds-home { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.ds-home img { height: 18px; width: auto; display: block; }
.ds-topbar-mid { flex: 1; display: flex; justify-content: center; min-width: 0; }
.ds-topbar-r { display: flex; align-items: center; gap: 16px; font-size: 14px; }
.ds-user { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--fill); color: var(--ink); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.ds-user::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 999px; background: var(--online); }
.ds-logout { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: var(--ink-3) !important; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; font-size: 14px; cursor: pointer; }
.ds-logout:hover { color: var(--ink) !important; }
.ds-logout svg { display: none; }
/* 화면 고유 탭 링크(반품 접수·이력 등)는 위쪽 바 가운데로 옮겨 그대로 쓴다 */
.ds-topbar-mid > * { margin: 0 !important; }

/* ← 뒤로 (10/7 · 홈 빼고 모든 화면 · 누르는 면 44px) */
.ds-topbar-l { display: flex; align-items: center; gap: 6px; flex: none; min-width: 0; }
.ds-back {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 44px; min-height: 44px; box-sizing: border-box;
  padding: 0 12px 0 6px; margin-left: -8px; border-radius: 999px; color: var(--ink-2) !important; text-decoration: none !important;
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .2s ease, transform .2s var(--ease);
}
.ds-back svg { width: 20px; height: 20px; flex: none; }
.ds-back:hover { background: rgba(17,19,21,.05); color: var(--ink) !important; }
.ds-back:active { transform: scale(.97); }

/* 기능 검색 칸 (위쪽 바 · 홈 머리 · 서랍 맨 위) — 옛 화면 입력칸 규칙(ds-legacy.css)보다 앞서게 id 로 */
.ds-fs { position: relative; display: flex; align-items: center; min-width: 0; }
.ds-fs > svg { position: absolute; left: 13px; top: 50%; margin-top: -8px; color: #5E6168; pointer-events: none; }
.ds-fs-l { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:is(#ds-fs-top, #ds-fs-dr) {
  box-sizing: border-box !important; width: 100% !important; height: 38px !important; min-height: 38px !important; margin: 0 !important;
  padding: 0 62px 0 36px !important; border: 0 !important; border-radius: 999px !important; background: var(--fill) !important;
  color: var(--ink) !important; font-family: var(--ds-font) !important; font-size: 14px !important; line-height: normal !important; box-shadow: none !important;
}
#ds-fs-dr { height: 44px !important; min-height: 44px !important; padding-right: 14px !important; font-size: 15px !important; }
:is(#ds-fs-top, #ds-fs-dr)::placeholder { color: #5E6168; opacity: 1; }
:is(#ds-fs-top, #ds-fs-dr):focus { outline: 2px solid var(--point) !important; outline-offset: 0 !important; background: #FFFFFF !important; }
.ds-fs-top { width: clamp(180px, 22vw, 280px); flex: none; }
.ds-fs-k {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 600 12px/1 var(--ds-font); color: #5E6168; background: #FFFFFF; border-radius: 6px; padding: 4px 6px; box-shadow: 0 0 0 1px var(--line-2);
}
#ds-fs-top:focus ~ .ds-fs-k, #ds-fs-top:not(:placeholder-shown) ~ .ds-fs-k { display: none; }
/* 홈 머리(팀 탭으로 꽉 참): 돋보기 칸만 두고, 누르면(Ctrl+K) 왼쪽으로 넓어짐 — 줄이 밀리지 않게 */
.hd .ds-fs-top { width: 40px; height: 38px; }
.hd .ds-fs-top > svg { z-index: 3; }
.hd #ds-fs-top { position: absolute !important; right: 0; top: 0; z-index: 2; width: 40px !important; padding: 0 0 0 38px !important; cursor: pointer; transition: width .35s var(--ease); }
.hd #ds-fs-top::placeholder { color: transparent; }
.hd .ds-fs-top:focus-within #ds-fs-top { width: 300px !important; padding-right: 14px !important; cursor: text; }
.hd .ds-fs-top:focus-within #ds-fs-top::placeholder { color: #5E6168; }
.hd .ds-fs-k { display: none; }
.ds-fs-dr { margin: 0 4px 10px; flex: none; }

/* 찾기 목록 (DS.combobox — 기능 검색 · SKU 고르기 등 모든 찾기 칸 공통) */
.ds-cb-pop {
  position: fixed; z-index: 1200; box-sizing: border-box; overflow: auto; overscroll-behavior: contain; padding: 6px;
  background: #FFFFFF; border-radius: 16px; box-shadow: 0 0 0 1px var(--line-2), 0 16px 40px rgba(17,19,21,.14);
  font-family: var(--ds-font); color: var(--ink); text-align: left; word-break: keep-all; animation: ds-cb-in .18s var(--ease) both;
}
.ds-cb-pop[hidden] { display: none !important; }
@keyframes ds-cb-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ds-cb-head { padding: 8px 12px 6px; font-size: 12px; font-weight: 600; color: #5E6168; }
.ds-cb-pop .ds-cb-list { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 2px; }
.ds-cb-pop .ds-cb-opt {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; box-sizing: border-box; margin: 0 !important;
  padding: 8px 12px; border-radius: 10px; cursor: pointer; list-style: none; font-size: 15px; line-height: 1.35; color: var(--ink); background: none;
}
.ds-cb-opt .t { font-weight: 500; overflow-wrap: anywhere; }
.ds-cb-opt .s { font-size: 13px; color: #5E6168; }
.ds-cb-opt mark { background: none; color: var(--point-dark); font-weight: 700; padding: 0; }
.ds-cb-pop .ds-cb-opt[aria-selected="true"] { background: var(--point-bg); }
.ds-cb-empty { padding: 12px; font-size: 14px; line-height: 1.5; color: #5E6168; }
/* SKU 고르기(DS.skuPicker · 10/7) — 정리 판매·판매 종료는 회색 · 고른 뒤 원가·최근 발주·재고 한 줄 */
.ds-cb-opt .ds-sku-o { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ds-cb-opt .ds-sku-o.is-off .t, .ds-cb-opt .ds-sku-o.is-off .s { color: #8A8D93; }
.ds-sku-tag { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 6px; background: var(--line-2); color: #5E6168; font-size: 12px; font-style: normal; font-weight: 600; vertical-align: 1px; }
.ds-sku-info { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #5E6168; overflow-wrap: anywhere; word-break: keep-all; }
.ds-sku-info[hidden] { display: none !important; }
.ds-sku-info.is-off { color: #8A5200; }
.ds-sku-tag.soon { background: var(--warn-bg, #FFF4E0); color: #8A5200; }
input.is-off, .ds-field input.is-off { color: #8A8D93; }

@media (max-width: 640px) {
  .ds-fs-top { display: none !important; }       /* 좁은 화면: 기능 검색은 메뉴 서랍 맨 위 */
}
@media (max-width: 560px) {
  .ds-topbar-in { padding: 0 16px; gap: 10px; }
  .ds-user { max-width: 96px; }
  .ds-topbar .ds-logout { width: 44px; }
  .ds-topbar .ds-logout span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ds-topbar .ds-logout svg { display: block; }
  .ds-topbar-l { gap: 2px; }
  .ds-back { padding: 0; }
  .ds-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ds-home img { height: 16px; }
  .ds-topbar-r { gap: 8px; }
}

/* ── 4. 제목 블록 (시안: 배지 → 큰 제목 → 부제, 오른쪽 버튼) ── */
html.ui-v2 .ds-title { display: flex; flex-direction: column; gap: 14px; }
.ds-badge-menu {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: var(--point-bg); color: var(--point-dark); font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;   /* 가이드 2장: 배지 글자 = point-dark (시안 point 는 대비 4.17:1) */
}
.ds-badge-menu svg { width: 16px; height: 16px; flex: none; }
html.ui-v2 :is(.hero-tag, .wrap > .tag, .wrap > .top > div > .tag) { display: none !important; }
html.ui-v2 :is(.hero-title, .apx-head h1, .head > h1, .wrap > h1) {
  margin: 0 !important; font-size: var(--fs-display) !important; line-height: 1.15 !important; font-weight: 700 !important;
  letter-spacing: -0.035em !important; color: var(--ink) !important; background: none !important; -webkit-text-fill-color: currentColor !important;
}
html.ui-v2 :is(.hero-desc, .apx-head .apx-sub) {
  margin: 0 !important; font-size: 17px !important; line-height: 1.55 !important; color: var(--ink-3) !important; max-width: 68ch;
}
html.ui-v2 .hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 0 28px !important; }
html.ui-v2 .apx-head { align-items: flex-end; gap: 16px; margin: 0 0 28px !important; }
html.ui-v2 .apx-head > div:first-child { display: flex; flex-direction: column; gap: 14px; }
/* 제목 옆 버튼: 회색 보조 / 검정 주 — 높이 42, 999 반경 */
html.ui-v2 :is(.hero-actions, .apx-actions) { gap: 10px; }
html.ui-v2 :is(.hero-actions, .apx-actions) :is(button, .apx-btn, .action-btn) {
  height: 42px !important; padding: 0 18px !important; border-radius: 999px !important; border: 0 !important;
  background: var(--fill) !important; color: var(--ink) !important; font-size: 15px !important; font-weight: 600 !important;
  box-shadow: none !important; transition: transform .2s var(--ease), background-color .25s ease;
}
html.ui-v2 :is(.hero-actions, .apx-actions) :is(.primary, .btn-primary, .action-btn.primary) { background: var(--ink) !important; color: #FFFFFF !important; }
html.ui-v2 :is(.hero-actions, .apx-actions) :is(button, .apx-btn, .action-btn):active { transform: scale(.97); }
/* 페이지 여백 — 위 36, 아래 120(메뉴 버튼 자리) */
html.ui-v2 .apx-page { max-width: 1240px; padding: 36px 24px 120px; }
html.ui-v2 :is(.main, .wrap) { padding-bottom: 120px; }
html.ui-v2 body.apx-has-sb { padding-left: 0 !important; }
html.ui-v2 :is(.apx-tabs button.on) { background: var(--ink); color: #FFFFFF; }

/* 처음 열릴 때 한 번 떠오름 */
@keyframes ds-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ds-reveal { animation: ds-rise .8s var(--ease) both; }

/* ── 5. 메뉴 버튼 + 서랍 (시안 ShipmentRefined) ────────────── */
.ds-menu-btn {
  position: fixed; left: 20px; bottom: 20px; z-index: 990; width: 52px; height: 52px; border-radius: 16px; border: 0;
  background: var(--ink); color: #FFFFFF; box-shadow: 0 8px 24px rgba(17,19,21,.3); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform .2s var(--ease);
}
.ds-menu-btn:active { transform: scale(.97); }
/* 10/11: 내려가는 동안 떠 있는 버튼 숨김(shell.js floatHide) — 표를 가리지 않게 · 위로 올리면 다시 */
.ds-menu-btn, .dsr-btn { transition: transform .25s var(--ease), opacity .2s ease; }
.ds-fab-hide .ds-menu-btn, .ds-fab-hide .dsr-btn { transform: translateY(96px); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .ds-menu-btn, .dsr-btn { transition: none; } }
.ds-scrim { position: fixed; inset: 0; z-index: 995; background: rgba(17,19,21,.24); opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.ds-scrim.is-on { opacity: 1; pointer-events: auto; }
.ds-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 996; width: 280px; max-width: 86vw; box-sizing: border-box; padding: 22px 14px;
  background: rgba(255,255,255,.86); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 8px 0 40px rgba(17,19,21,.12); transform: translateX(-110%); visibility: hidden;
  transition: transform .5s var(--ease), visibility 0s linear .5s;
  display: flex; flex-direction: column; gap: 6px; overflow: auto; font-family: var(--ds-font); color: var(--ink);
}
.ds-drawer.is-on { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.ds-dr-head { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 12px; }
.ds-dr-head img { height: 16px; width: auto; display: block; margin-bottom: 6px; }
.ds-dr-who { font-size: 12px; color: var(--ink-3); }
.ds-x { position: relative; width: 36px; height: 36px; flex: none; border-radius: 999px; border: 0; background: var(--fill); color: var(--ink-2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ds-x::after { content: ""; position: absolute; inset: -4px; }   /* 누르는 면 44px */
.ds-grp {
  display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 38px; padding: 0 10px; border: 0; background: none;
  font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); cursor: pointer; border-radius: 10px; text-align: left;
}
.ds-grp[aria-expanded="true"] { font-weight: 700; }
.ds-grp svg { width: 14px; height: 14px; flex: none; color: var(--ink-4); transition: transform .25s var(--ease); }
.ds-grp[aria-expanded="true"] svg { transform: rotate(90deg); }
.ds-grp:hover { background: rgba(17,19,21,.03); }
.ds-items { display: none; flex-direction: column; gap: 2px; padding-bottom: 4px; }
.ds-grp[aria-expanded="true"] + .ds-items { display: flex; }
.ds-item {
  display: flex; align-items: center; min-height: 40px; padding: 0 14px; margin-left: 6px; border-radius: 10px;
  text-decoration: none; font-size: 15px; color: var(--ink-2) !important; transition: background-color .2s ease;
}
.ds-item:hover { background: rgba(17,19,21,.04); }
.ds-item[aria-current="page"] { background: #F2F2F4; color: var(--ink) !important; font-weight: 600; }
.ds-sub .ds-grp { font-size: 13px; min-height: 34px; color: var(--ink-3); margin-left: 6px; width: calc(100% - 6px); }
/* 10/23 메뉴 '공통 · 내 팀 · 바로가기' — 공통 = 접지 않는 묶음 · 바로가기(대표 = 팀) = 작은 머리말 */
.ds-grp-fixed { margin: 0; display: flex; align-items: center; min-height: 32px; padding: 0 10px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.ds-g.fixed > .ds-items { display: flex; }
.ds-dr-sec { margin: 10px 0 0; padding: 10px 10px 2px; font-size: 13px; font-weight: 700; color: var(--ink-3); box-shadow: inset 0 1px 0 var(--line-2); }
.ds-dr-foot { margin-top: auto; padding: 14px 8px 0; display: flex; flex-direction: column; gap: 6px; box-shadow: inset 0 1px 0 var(--line-2); }
.ds-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 15px; color: var(--ink); cursor: pointer; }
.ds-switch small { display: block; font-size: 12px; color: var(--ink-3); }
.ds-toggle { position: relative; width: 52px; height: 32px; flex: none; border-radius: 999px; border: 0; padding: 0; background: #D5D6DA; cursor: pointer; transition: background-color .25s ease; }
.ds-toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(17,19,21,.2); transition: transform .35s var(--ease); }
.ds-toggle[aria-checked="true"] { background: var(--point); }
.ds-toggle[aria-checked="true"]::after { transform: translateX(20px); }
.ds-dr-foot .ds-logout { justify-content: flex-start; }
.ds-dr-foot .ds-dr-report { display: none; }   /* 휴대폰(아래 탭)만 — 넓은 화면은 오른쪽 아래 작은 버튼 */

/* ── 인쇄: 화면 껍데기(위쪽 바·메뉴·문제 신고)는 종이에 안 나오게 (10/6) ── */
@media print {
  .ds-topbar, .ds-menu-btn, .ds-drawer, .ds-scrim, .dsr-btn, .dsr-pn, .ds-toasts { display: none !important; }
  html.ui-v2 body { background: #FFFFFF !important; }
  html.ui-v2 :is(.ds-card, .card, .stat-card) { box-shadow: 0 0 0 1px #D5D6DA !important; break-inside: avoid; }
}

/* ── 6. 움직임 줄이기 ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html.ui-v2 *, html.ui-v2 *::before, html.ui-v2 *::after { animation: none !important; transition: none !important; }
}

/* ── 메뉴(DS.menu · 10/7) — body 에 fixed · 맨 위 층 ── */
.ds-mn-pop {
  position: fixed; z-index: 1200; box-sizing: border-box; padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: #FFFFFF; border-radius: 16px; box-shadow: 0 0 0 1px var(--line-2), 0 16px 40px rgba(17,19,21,.14);
  font-family: var(--ds-font); color: var(--ink); text-align: left; word-break: keep-all; animation: ds-cb-in .18s var(--ease) both;
}
.ds-mn-pop[hidden] { display: none !important; }
.ds-mn-pop .ds-mn-it {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; box-sizing: border-box; width: 100%;
  margin: 0; padding: 8px 12px; border: 0; border-radius: 10px; background: none; cursor: pointer; font: inherit; font-size: 15px;
  line-height: 1.35; color: var(--ink); text-align: left; text-decoration: none;
}
.ds-mn-pop .ds-mn-it .s { font-size: 13px; color: #5E6168; }
.ds-mn-pop .ds-mn-it:hover, .ds-mn-pop .ds-mn-it:focus-visible { background: var(--point-bg); outline: none; }
.ds-mn-pop .ds-mn-it:focus-visible { box-shadow: inset 0 0 0 2px var(--point); }
.ds-mn-pop .ds-mn-it[aria-disabled] { color: #8A8D93; cursor: default; background: none; }
@media (prefers-reduced-motion: reduce) { .ds-mn-pop { animation: none; } }

/* ══ 7. 10/13 애플 스타일 — 맥 창 틀 (README 2장 · 보드 Main/Margin/PL/Exec/Recon · shell.js 가 html.ds-mac 을 붙임) ══════════
 * 제목줄 52 + 왼쪽 사이드바 220 은 화면에 붙박이(fixed) · 내용은 <html> 안쪽 여백으로 옮김 — 화면 HTML 은 그대로(옮기거나 감싸지 않음).
 * 넓은 화면(>1280)만 창 바깥 회색 + 둥근 창 · 1280 이하 꽉 차게 · 860 이하 사이드바 대신 아래 탭(.ds-tabbar) · 640 이하 휴대폰 제목줄.
 */
html.ds-mac {
  --mac-top: 0px; --mac-gx: 0px; --mac-bar: 52px; --mac-side: 220px; --mac-tab: 0px;
  padding: calc(var(--mac-top) + var(--mac-bar)) var(--mac-gx) var(--mac-tab) calc(var(--mac-gx) + var(--mac-side)) !important;
  box-sizing: border-box; min-height: 100%; scroll-padding-top: calc(var(--mac-top) + var(--mac-bar) + 12px);
  background: #FFFFFF;
}
html.ds-mac body { background: #FFFFFF !important; min-height: calc(100vh - var(--mac-top) - var(--mac-bar) - var(--mac-tab)); }
/* 10/14 대표: 사이드바 회색이 중간에서 끊김 → 바탕(html · 문서 끝까지)에 사이드바 폭 같은 색 띠(#F3F4F7 = --mat-side 를 흰 바탕에 얹은 색) */
@media (min-width: 861px) {
  html.ds-mac { --side-band: linear-gradient(to right, transparent var(--mac-gx), #F3F4F7 var(--mac-gx), #F3F4F7 calc(var(--mac-gx) + var(--mac-side) - 1px), #E8E9EC calc(var(--mac-gx) + var(--mac-side) - 1px), #E8E9EC calc(var(--mac-gx) + var(--mac-side)), transparent calc(var(--mac-gx) + var(--mac-side)));   /* 오른쪽 가는 선도 끝까지 */
    background: var(--side-band), #FFFFFF; }
}
@media (min-width: 1281px) {
  html.ds-mac { --mac-top: 16px; --mac-gx: max(16px, calc((100vw - 1480px) / 2)); background: var(--side-band), var(--desk) !important; }
  html.ds-mac::before {        /* 창 위 회색 띠 — 내용이 제목줄 위로 비치지 않게 */
    content: ""; position: fixed; z-index: 899; left: 0; right: 0; top: 0; height: var(--mac-top); background: var(--desk); pointer-events: none;
  }
  html.ds-mac::after {         /* 창 몸통(흰 바탕 · 둥근 위 모서리 · 그림자) — 내용 뒤 */
    content: ""; position: fixed; z-index: -1; top: var(--mac-top); left: var(--mac-gx); right: var(--mac-gx); bottom: 0;
    background: #FFFFFF; border-radius: var(--r-window) var(--r-window) 0 0; box-shadow: var(--shadow-window); pointer-events: none;
  }
}
@media (max-width: 860px) { html.ds-mac { --mac-side: 0px; } html.ds-mac.ds-has-tabs { --mac-tab: calc(58px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 640px) { html.ds-mac { --mac-bar: 48px; background: #F2F2F7 !important; } html.ds-mac body { background: #F2F2F7 !important; } }   /* 휴대폰 = 아이폰 묶음 바탕(Mobile 보드) */

/* 제목줄 (옛 .ds-topbar 를 맥 제목줄로) */
html.ds-mac .ds-topbar {
  position: fixed; top: var(--mac-top); left: var(--mac-gx); right: var(--mac-gx); z-index: 900; height: var(--mac-bar);
  background: var(--mat-bar); -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur);
  box-shadow: 0 .5px 0 rgba(0,0,0,.1); border-radius: 0; transition: none;
}
@media (min-width: 1281px) { html.ds-mac .ds-topbar { border-radius: var(--r-window) var(--r-window) 0 0; } }
html.ds-mac .ds-topbar.is-scrolled { box-shadow: 0 .5px 0 rgba(0,0,0,.14); }
html.ds-mac .ds-topbar-in {
  max-width: none; height: 100%; margin: 0; padding: 0 14px 0 0; display: grid; grid-template-columns: var(--mac-side, 220px) minmax(0, 1fr) auto; align-items: center; gap: 0;
}
@media (max-width: 860px) { html.ds-mac .ds-topbar-in { grid-template-columns: auto minmax(0, 1fr) auto; } }
html.ds-mac .ds-topbar-l { display: flex; align-items: center; gap: 4px; padding-left: 18px; min-width: 0; }
.ds-lights { display: inline-flex; gap: 8px; margin-right: 10px; flex: none; }
.ds-lights i { width: 12px; height: 12px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18); }
.ds-lights i:nth-child(1) { background: #FF5F57; } .ds-lights i:nth-child(2) { background: #FEBC2E; } .ds-lights i:nth-child(3) { background: #28C840; }
html.ds-mac .ds-back { min-height: 30px; min-width: 30px; height: 30px; padding: 0 8px 0 4px; margin-left: 0; border-radius: var(--r-ctl); font-size: 13px; font-weight: 500; color: var(--t2) !important; }
html.ds-mac .ds-back svg { width: 17px; height: 17px; }
html.ds-mac .ds-back:hover { background: rgba(0,0,0,.06); }
.ds-mac-ttl { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 18px; font-size: 13.5px; font-weight: 700; color: #3C3F45; white-space: nowrap; }
.ds-mac-ttl .ds-home { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; color: #3C3F45 !important; text-decoration: none !important; }
.ds-mac-ttl .ds-home svg { flex: none; }
.ds-mac-ttl .sep { color: #B9BBC0; font-weight: 400; }
.ds-mac-ttl .nm { overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
html.ds-mac .ds-topbar-mid { position: absolute; left: 50%; transform: translateX(-50%); top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
html.ds-mac .ds-topbar-mid > * { pointer-events: auto; }
html.ds-mac .ds-topbar-mid:empty { display: none; }
html.ds-mac .ds-topbar-r { display: flex; align-items: center; gap: 6px; font-size: 13px; }
html.ds-mac .ds-topbar-r .ds-user, html.ds-mac .ds-topbar-r > .ds-logout { display: none !important; }   /* 이름 · 로그아웃은 프로필 안으로(기능 그대로) */
.ds-ticon { position: relative; width: 32px; height: 30px; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--t2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.ds-ticon:hover, .ds-ticon[aria-expanded="true"] { background: rgba(0,0,0,.06); color: var(--ink); }
.ds-ticon[hidden] { display: none !important; }
.ds-ticon svg { width: 17px; height: 17px; }
.ds-dot-n { position: absolute; top: 1px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--c-red); color: #FFFFFF; font: 700 10px/15px var(--ds-font); text-align: center; box-shadow: 0 0 0 1.5px #F6F6F8; }
.ds-dot-n[hidden] { display: none; }
.ds-avatar { position: relative; width: 28px; height: 28px; margin-left: 4px; border-radius: 50%; border: 0; padding: 0; background: var(--ink); color: #FFFFFF; font: 700 12px/1 var(--ds-font); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.ds-avatar::after { content: ""; position: absolute; inset: -8px; }   /* 누르는 면 44px */
.ds-find-btn { display: none; }
/* 제목줄 기능 검색 = 맥 찾기칸(30 · 모서리 8 · 옅은 회색) */
html.ds-mac .ds-topbar .ds-fs-top { width: 200px; }
html.ds-mac #ds-fs-top { height: 30px !important; min-height: 30px !important; padding: 0 44px 0 30px !important; border-radius: var(--r-ctl) !important; background: rgba(0,0,0,.055) !important; font-size: 13px !important; }
html.ds-mac #ds-fs-top:focus { background: #FFFFFF !important; outline: 0 !important; box-shadow: 0 0 0 3.5px rgba(47,107,234,.3), inset 0 0 0 1px #2F6BEA !important; }
html.ds-mac .ds-topbar .ds-fs > svg { left: 9px; width: 14px; height: 14px; margin-top: -7px; color: var(--t3); }
html.ds-mac .ds-topbar .ds-fs-k { right: 7px; padding: 3px 5px; font-size: 11px; border-radius: 5px; background: rgba(255,255,255,.8); box-shadow: 0 0 0 .5px rgba(0,0,0,.14); color: var(--t2); }
@media (max-width: 1000px) { html.ds-mac .ds-topbar .ds-fs-top { width: 150px; } }
@media (max-width: 640px) {
  html.ds-mac .ds-topbar .ds-fs-top { display: none !important; }
  html.ds-mac .ds-find-btn { display: inline-flex; }
  html.ds-mac .ds-lights, html.ds-mac .ds-mac-ttl .ds-home span, html.ds-mac .ds-mac-ttl .sep { display: none; }
  html.ds-mac .ds-topbar-l { padding-left: 8px; }
  html.ds-mac .ds-mac-ttl { padding-left: 6px; font-size: 15px; font-weight: 600; }
  html.ds-mac .ds-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html.ds-mac .ds-back { color: var(--c-blue) !important; min-width: 40px; min-height: 40px; }
  html.ds-mac .ds-back svg { width: 22px; height: 22px; }
  html.ds-mac .ds-ticon { width: 40px; height: 40px; }
  html.ds-mac .ds-topbar-mid { position: static; transform: none; display: none; }
}
/* 화면 고유 탭(반품 접수 · 검수 · 이력 등 — 옛 머리에서 옮겨 온 것) = 세그먼트 모양 */
html.ds-mac .ds-topbar-mid .h-nav-links { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: rgba(0,0,0,.06); }
html.ds-mac.ds-legacy .ds-topbar-mid a { min-height: 26px; padding: 0 12px; border-radius: var(--r-seg-in); font-size: 12.5px; font-weight: 500; color: #3C3F45 !important; }
html.ds-mac.ds-legacy .ds-topbar-mid a:is(.active, .on, [aria-current="page"]) { background: #FFFFFF; color: var(--ink) !important; font-weight: 600; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.12); }

/* 왼쪽 사이드바 220 */
.ds-side { display: none; }
html.ds-mac .ds-side {
  display: flex; flex-direction: column; gap: 1px; position: fixed; z-index: 890; top: calc(var(--mac-top) + var(--mac-bar)); bottom: 0; left: var(--mac-gx); width: var(--mac-side);
  box-sizing: border-box; padding: 10px 10px 18px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  background: var(--mat-side); -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur); box-shadow: inset -.5px 0 0 rgba(0,0,0,.08);
  font-family: var(--ds-font); color: var(--ink);
}
@media (max-width: 860px) { html.ds-mac .ds-side { display: none; } }
.ds-side-gh {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 28px; margin-top: 8px; padding: 0 10px; border: 0; background: none; border-radius: 6px;
  font: 700 11px/1 var(--ds-font); letter-spacing: .02em; color: var(--t3); text-align: left; cursor: pointer;
}
.ds-side-g:first-child > .ds-side-gh { margin-top: 0; }
.ds-side-gh svg { width: 11px; height: 11px; opacity: 0; transition: transform .2s var(--ease), opacity .15s ease; transform: rotate(90deg); }
.ds-side-gh:hover svg, .ds-side-gh:focus-visible svg { opacity: 1; }
.ds-side-gh[aria-expanded="false"] svg { transform: none; opacity: 1; }
.ds-side-items { display: flex; flex-direction: column; gap: 1px; }
.ds-side-gh[aria-expanded="false"] + .ds-side-items { display: none; }
.ds-side-g.sub > .ds-side-gh { margin-top: 2px; min-height: 26px; font-weight: 600; font-size: 11.5px; padding-left: 12px; }
.ds-side-g.fixed > span.ds-side-gh { cursor: default; box-sizing: border-box; }
.ds-side-sec { margin: 14px 0 0; padding: 10px 10px 2px; font: 700 11px/1.2 var(--ds-font); letter-spacing: .02em; color: var(--t3); box-shadow: inset 0 .5px 0 rgba(0,0,0,.1); }
.ds-side-it {
  display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 10px; border-radius: 7px; box-sizing: border-box;
  font-size: 13.5px; font-weight: 500; color: #2A2C31 !important; text-decoration: none !important; min-width: 0;
}
.ds-side-it .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ds-side-it:hover { background: rgba(0,0,0,.05); color: var(--ink) !important; }
.ds-side-it[aria-current="page"] { background: rgba(0,0,0,.08); color: var(--ink) !important; font-weight: 600; }
.ds-side-n { margin-left: auto; flex: none; font: 700 11px/1 var(--ds-font); background: rgba(0,0,0,.07); color: #3C3F45; border-radius: 999px; padding: 3px 7px; font-variant-numeric: tabular-nums; }
.ds-side-foot { margin: auto 0 0; padding: 16px 10px 0; font-size: 11.5px; line-height: 1.5; color: #6B6E75; }
/* 색 타일 아이콘(icons.js DSIcon.tile) · 선 아이콘(DSIcon.line) */
.ds-tile-ic { border-radius: 24%; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.12); color: #FFFFFF; }
.ds-tile-ic svg { display: block; }
.ds-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* 아래 탭 5개(휴대폰 · 860 이하) */
.ds-tabbar { display: none; }
@media (max-width: 860px) {
  html.ds-mac .ds-tabbar {
    display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); position: fixed; z-index: 980; left: 0; right: 0; bottom: 0;
    height: var(--mac-tab); box-sizing: border-box; padding: 6px 4px env(safe-area-inset-bottom, 0px);
    background: rgba(248,248,250,.94); -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur); box-shadow: 0 -.5px 0 rgba(0,0,0,.12);
    font-family: var(--ds-font);
  }
  html.ds-mac.ds-has-tabs .ds-menu-btn { display: none !important; }       /* 메뉴 = '더 보기' 탭(같은 서랍) */
  html.ds-mac.ds-has-tabs .dsr-btn { display: none !important; }       /* 10/14 대표: 휴대폰 문제 신고 = '더 보기' 안 한 줄(내용을 안 가림) */
  html.ds-report-on.ds-has-tabs .ds-dr-report { display: inline-flex; }
}
/* 10/15 휴대폰 아래 탭 가림 전수(scripts/tabbar_cover_check.py · 139 화면 × 390 · 360) — 탭(z 980 · 높이 --mac-tab)보다 낮게 화면 아래에 붙는 것을 한 곳에서.
   ① 화면 고유 고정 띠 · 알림(송장 확정 아래 띠 #bar · 제원 재기 독 · 옛 화면 알림 .toast) → 탭 높이만큼 위로(translate — 원래 bottom · transform 은 그대로)
   ② 옛 화면 모달 덮개(z 50~100 — 상품 · 표준 답변 · 원가 · 시나리오 · 디자인 · 작업 상세) → 탭 위로(열면 탭이 모달 아래 버튼을 덮고 탭이 눌렸음)
   ③ 붙는 저장 띠(실사 사무실 화면 sticky bottom) → 탭 위에서 멈춤(세는 화면은 탭을 숨김 — stocktake.html)
   새 화면에서 화면 아래에 붙는 띠는 .ds-above-tab 을 붙이면 ① 과 같음. */
@media (max-width: 860px) {
  html.ds-mac.ds-has-tabs .ds-above-tab, html.ds-mac.ds-has-tabs .toast, html.ds-mac.ds-has-tabs #bar.bar, html.ds-mac.ds-has-tabs .sm-dock { translate: 0 calc(-1 * var(--mac-tab)); }
  html.ds-mac.ds-has-tabs .modal-bg, html.ds-mac.ds-has-tabs .ov, html.ds-mac.ds-has-tabs .mbg, html.ds-mac.ds-has-tabs .mask, html.ds-mac.ds-has-tabs #detailModal { z-index: 1000 !important; }
  html.ds-mac.ds-has-tabs body:not(.st-counting) .st-savebar { bottom: calc(var(--mac-tab) + 12px); }
}
.ds-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 44px; padding: 0; border: 0; background: none;
  font: 500 10.5px/1.2 var(--ds-font); color: #6B6E75 !important; text-decoration: none !important; cursor: pointer; }
.ds-tab svg { width: 24px; height: 24px; }
.ds-tab.on { color: var(--c-blue) !important; }
.ds-tab-n { position: absolute; top: -2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 999px; background: var(--c-red); color: #FFFFFF; font: 700 10px/16px var(--ds-font); font-style: normal; text-align: center; }
/* 넓은 화면: 사이드바가 메뉴 — 왼쪽 아래 메뉴 버튼은 숨김(서랍은 그대로 · Ctrl+K 가 검색칸이 안 보일 때 씀) */
@media (min-width: 861px) { html.ds-mac .ds-menu-btn { display: none !important; } }
/* 860 이하 서랍 = '더 보기' 아래 시트(손잡이) */
@media (max-width: 860px) {
  html.ds-mac .ds-drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; max-height: 86vh; padding: 22px 14px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: var(--r-window) var(--r-window) 0 0; transform: translateY(105%); background: rgba(242,242,247,.96);
    box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 -12px 40px rgba(17,19,21,.18);
  }
  html.ds-mac .ds-drawer.is-on { transform: none; }
  html.ds-mac .ds-drawer::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: rgba(0,0,0,.2); }
}

/* 제목줄 작은 창(알림 · 프로필 · 내보내기) — 반투명 메뉴 */
.ds-mac-pop {
  position: fixed; z-index: 1200; min-width: 240px; max-width: min(340px, calc(100vw - 16px)); max-height: min(70vh, 520px); overflow: auto; box-sizing: border-box; padding: 5px;
  border-radius: var(--r-menu); background: var(--mat-pop); -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur); box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 12px 32px rgba(17,19,21,.22);
  font-family: var(--ds-font); color: var(--ink); font-size: 13px; animation: ds-cb-in .18s var(--ease) both;
}
.ds-pop-h { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 6px; }
.ds-pop-h b { font-size: 13.5px; } .ds-pop-h small { font-size: 11.5px; color: #6B6E75; }
.ds-pop-it { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; box-sizing: border-box; padding: 4px 8px; border: 0; border-radius: 5px; background: none;
  font: inherit; font-size: 13px; color: var(--ink) !important; text-align: left; text-decoration: none !important; cursor: pointer; }
.ds-pop-it svg { color: var(--t2); flex: none; }
.ds-pop-it .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ds-pop-it .t small { font-size: 11.5px; color: #6B6E75; }
.ds-pop-it .n { font-variant-numeric: tabular-nums; color: #8A5200; }
.ds-pop-it.bad .n { color: var(--bad); }
.ds-pop-it:hover, .ds-pop-it:focus-visible { background: var(--c-blue); color: #FFFFFF !important; outline: none; }
.ds-pop-it:hover :is(svg, small, .n), .ds-pop-it:focus-visible :is(svg, small, .n) { color: rgba(255,255,255,.9) !important; }
.ds-pop-empty { margin: 0; padding: 10px; color: var(--t2); }
.ds-pop-foot { display: block; margin-top: 4px; padding: 8px 10px 6px; box-shadow: inset 0 .5px 0 rgba(0,0,0,.12); font-size: 12.5px; color: var(--point-dark) !important; text-decoration: none !important; }

/* 찾기 목록 · 메뉴 = 맥 메뉴(반투명 · 모서리 10 · 고른 줄 파랑 + 흰 글자) */
.ds-cb-pop, .ds-mn-pop {
  border-radius: var(--r-menu); padding: 5px; background: var(--mat-pop); -webkit-backdrop-filter: var(--mat-blur); backdrop-filter: var(--mat-blur);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 12px 32px rgba(17,19,21,.22);
}
.ds-cb-pop .ds-cb-opt, .ds-mn-pop .ds-mn-it { min-height: 32px; padding: 5px 9px; border-radius: 5px; font-size: 13.5px; }
.ds-cb-opt .s, .ds-mn-pop .ds-mn-it .s { font-size: 12px; }
.ds-cb-head { padding: 7px 10px 4px; font-size: 11px; font-weight: 700; color: #6B6E75; }
.ds-cb-pop .ds-cb-opt[aria-selected="true"], .ds-mn-pop .ds-mn-it:hover, .ds-mn-pop .ds-mn-it:focus-visible { background: var(--c-blue); color: #FFFFFF; }
.ds-cb-pop .ds-cb-opt[aria-selected="true"] :is(.s, .t, mark, .ds-sku-info), .ds-mn-pop .ds-mn-it:is(:hover, :focus-visible) .s { color: rgba(255,255,255,.88) !important; }
.ds-cb-pop .ds-cb-opt[aria-selected="true"] mark { text-decoration: underline; }
.ds-mn-pop .ds-mn-it:focus-visible { box-shadow: none; }
/* Spotlight(기능 검색 · Ctrl+K) — 결과마다 색 타일 · 고른 줄 '↵ 열기' */
.ds-fs-pop { min-width: min(420px, calc(100vw - 16px)); }
.ds-fs-pop .ds-cb-opt { flex-direction: row; align-items: center; gap: 10px; min-height: 40px; }
.ds-fs-pop .ds-cb-opt .tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ds-fs-pop .ds-cb-opt .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-fs-pop .ds-cb-opt[aria-selected="true"]::after { content: "↵ 열기"; flex: none; font-size: 12px; color: rgba(255,255,255,.8); }

/* 제목 위 길잡이(.ds-badge-menu — 화면마다 있는 '메뉴 이름 배지')를 '묶음 › 화면' 작은 줄로 */
html.ds-mac .ds-badge-menu { height: auto; padding: 0; gap: 6px; background: none; border-radius: 0; color: #6B6E75; font-size: 12px; font-weight: 500; }
html.ds-mac .ds-badge-menu > svg { width: 13px; height: 13px; color: #6B6E75; }
html.ds-mac .ds-badge-menu > svg:not(:first-child) { width: 10px; height: 10px; }
html.ds-mac .ds-badge-menu .ds-tile-ic { margin-right: 2px; }
html.ds-mac :is(.ds-title, .apx-head > div:first-child) { gap: 6px; }
html.ds-mac :is(.hero-desc, .apx-head .apx-sub) { font-size: 13.5px !important; color: var(--ink-3) !important; }
html.ds-mac :is(.hero-title, .apx-head h1, .head > h1, .wrap > h1) { letter-spacing: -0.02em !important; }
html.ds-mac .apx-page { padding-top: 26px; }
html.ds-mac :is(.hero, .apx-head) { margin-bottom: 20px !important; }
/* 맥 창 안 버튼(제목 옆) — 모서리 8 · 얇은 테두리 · 주 버튼 파랑 */
html.ds-mac :is(.hero-actions, .apx-actions) :is(button, .apx-btn, .action-btn) {
  height: 30px !important; padding: 0 13px !important; border-radius: var(--r-ctl) !important; font-size: 13px !important; font-weight: 500 !important;
  background: #FFFFFF !important; box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 1px 2px rgba(0,0,0,.07) !important;
}
html.ds-mac :is(.hero-actions, .apx-actions) :is(.primary, .btn-primary, .action-btn.primary) { background: var(--c-blue) !important; color: #FFFFFF !important; box-shadow: 0 1px 2px rgba(47,107,234,.4) !important; }

/* 반투명이 안 되는 브라우저 = 흰 바탕(README 1장 재질 대체) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ds-topbar, html.ds-mac .ds-topbar, html.ds-mac .ds-side, html.ds-mac .ds-tabbar, .ds-mac-pop, .ds-cb-pop, .ds-mn-pop, .ds-drawer { background: #FFFFFF !important; }
}
/* 인쇄: 창 틀 없이 */
@media print {
  html.ds-mac { padding: 0 !important; background: #FFFFFF !important; }
  html.ds-mac::before, html.ds-mac::after, .ds-side, .ds-tabbar, .ds-mac-pop { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { .ds-mac-pop, .ds-side-gh svg { animation: none !important; transition: none !important; } }

/* ══ 8. 10/14 밤 지시 2 — 애플 모양을 모든 화면에(공통 한 곳) ═══════════════════════════════════════════════════════
 * html.ds-own = 공통 부품(ds-ui.css)을 안 쓰던 새 화면(결재함 · 송장 출력 · 송장 확정 · 결재 설정 · 결재 알림 등 — shell.js 가 붙이고 ds-ui.css 도 실어 줌).
 * 화면 고유 클래스(.btn · .seg · .card · .chip · .toggle)의 **모양만**(모서리 · 테두리 · 그림자 · 고른 칸) — 뜻 색(반려 빨강 등)과 크기 · 배치는 화면 것 그대로.
 * 옛 화면(html.ds-legacy)은 ds-legacy.css 10/13 칸이 같은 일을 함.
 */
html.ds-mac :is(input[type="checkbox"], input[type="radio"]) { accent-color: var(--c-blue, #2F6BEA); }
html.ds-mac.ds-own :is(.btn, .chip, .pill-btn) { border-radius: 8px; }
html.ds-mac.ds-own .btn:active { transform: none; }
html.ds-mac.ds-own :is(.btn-primary, .btn.primary, .btn-approve, .btn.pri) { background: var(--c-blue, #2F6BEA); color: #FFFFFF; box-shadow: 0 1px 2px rgba(47,107,234,.4); }
html.ds-mac.ds-own :is(.btn-secondary, .btn.secondary, .btn-ghost) { background: #FFFFFF; box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 1px 2px rgba(0,0,0,.07); }
html.ds-mac.ds-own .btn-reject { background: #FFFFFF; box-shadow: 0 0 0 .5px rgba(0,0,0,.16), 0 1px 2px rgba(0,0,0,.07); }
html.ds-mac.ds-own .seg { border-radius: 9px; background: rgba(0,0,0,.06); }
html.ds-mac.ds-own :is(.seg-ind, .seg .ind) { border-radius: 7px; background: #FFFFFF; box-shadow: 0 0 0 .5px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.12); }
html.ds-mac.ds-own .seg button { border-radius: 7px; }
html.ds-mac.ds-own .seg button:is([aria-selected="true"], .on) { color: var(--ink); }
html.ds-mac.ds-own :is(.card, .panel) { border-radius: 14px; box-shadow: var(--shadow-card); }
html.ds-mac.ds-own .chip[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; }
html.ds-mac.ds-own :is(input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]), select, textarea):focus { outline: 0; box-shadow: 0 0 0 3.5px rgba(47,107,234,.3), inset 0 0 0 1px #2F6BEA; }
html.ds-mac.ds-own :is(.toast) { border-radius: 14px; }
/* 새 화면들의 달 이동(…-mon) · 기간 묶음(…-range) — 화면마다 이름만 다른 같은 부품 */
html.ds-mac :is([class$="-mon"], [class*="-mon "]):not(.ds-mn-pop) { border-radius: 8px; }
html.ds-mac :is([class$="-mon"], [class*="-mon "]) > button { border-radius: 8px; }
html.ds-mac.ds-own main h1:not(.ds-mn-pop *) { font-size: var(--fs-display, 28px); line-height: 1.2; letter-spacing: -.02em; }
@media (max-width: 640px) { html.ds-mac.ds-own main h1 { font-size: 30px; } }
/* 10/14 디테일 점검(줄바꿈): 짧은 버튼 글이 두 줄로 — 관리자 '지금 문제 있는 것' 새로 보기(admin_issues.js .ai-re) · 수집 버튼 · 세그 · 칩 */
html.ds-mac :is(.ai-re, .ds-btn, .ds-chip, .ds-seg button, .sync, .hm-seg button) { white-space: nowrap; }

/* ══ 8. 10/16 대표: 창 = 맥 '전체 화면' — 바깥 회색 · 둥근 창 · 창 그림자 없음(모든 폭 · 7장 '넓은 화면만 창 바깥 회색' 폐기) ══════════
 * 제목줄은 화면 맨 위 · 사이드바는 왼쪽 끝부터 화면 끝까지(위 7장의 --mac-top · --mac-gx = 0).
 * 내용은 넓게: 좌우 여백 32 · 최대 1600(그보다 넓으면 가운데) — .ds-page(새 화면) · .apx-page · 홈 · 물류 홈. 옛 화면 틀(.wrap 등)은 ds-legacy.css 같은 날 줄. 휴대폰(600 이하)은 그대로.
 * README_디자인규칙.md 2장 · docs/rules/작업_규칙_공통.md 3장. */
@media (min-width: 1281px) {
  html.ds-mac { --mac-top: 0px; --mac-gx: 0px; background: var(--side-band), #FFFFFF !important; }
  html.ds-mac::before, html.ds-mac::after { content: none !important; display: none !important; }
}
@media (min-width: 601px) {
  html.ds-mac .ds-page:not(.narrow), html.ui-v2 .apx-page, html.ds-mac .c1, html.ds-mac .lw { max-width: 1600px; padding-left: 32px; padding-right: 32px; }   /* .c1 = 홈 · .lw = 물류 홈 */
}
@media (min-width: 1600px) { html.ds-mac .c1 .tmg { grid-template-columns: repeat(4, minmax(0, 1fr)); } }   /* 넓어진 홈 '팀' 바로가기 3 → 4칸 */
