/* 셀러브레인 새 화면 (개편 D1): app.css 위에 얹는 차이만. 사용법·규칙은 같은 폴더 README.md
   - 새 색·새 글꼴·새 틀 없음. 바꾸는 것은 대비(D07), 촘촘한 표(D08·R04), 틀 조각(종·배지·패널·요약 바)
   - 어둡게는 반드시 @media (prefers-color-scheme: dark) 로만 쓴다. 테마 단추(base.js sbTheme)가 이 조건을 바꿔 끼워 밝게·어둡게·자동을 고른다
   - 대비 4.5 이상은 tests/test_v2_base.py 가 이 파일의 :root 값으로 계산해 지킨다 */

/* ---------- 토큰: 밝게 ---------- */
:root {
  --blue: #1b64da; --blue-press: #1554b8; --blue-soft-ink: #1554b8; --link: #1b64da;
  --btn-bg: #1b64da; --btn-press: #1554b8;
  --green: #03804d; --green-ink: #026b40;
  --red: #d42634; --red-ink: #b81f2b; --red-btn: #d42634;
  --ink3: #5b6675; --orange-ink: #8a5300; --yellow-ink: #8a5300; --teal: #08766b;
  --up: #d42634; --down-blue: #1b64da; --elephant-ink: #4e5968;
  /* 쇼핑몰 칩: 로고 색 바탕에 흰 글씨, 바탕만 한 단계 짙게 */
  --m-naver: #027a38; --m-coupang: #c41c02; --m-st11: #d4002e; --m-gmarket: #017a72; --m-auction: #cf0009;
  /* 촘촘한 표 */
  --v2-row-pad-y: 4px; --v2-row-pad-x: 8px; --v2-row-lh: 1.38; --v2-hit: 44px;
}
/* ---------- 토큰: 어둡게 ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --blue: #7db0ff; --blue-press: #9cc3ff; --blue-soft-ink: #a6c8ff; --link: #7db0ff;
    --btn-bg: #1b64da; --btn-press: #1554b8;
    --green: #3dd598; --green-ink: #3dd598;
    --red: #ff7a84; --red-ink: #ff8f97; --red-btn: #d42634;
    --ink2: #c2c6cc; --ink3: #a3a9b2; --orange-ink: #ffc266; --yellow-ink: #ffd166; --teal: #4fe0cf;
    --up: #ff7a84; --down-blue: #7db0ff; --elephant-ink: #c2c6cc;
  }
}

/* ---------- 단추·칩·띠: 바탕이 파랑·빨강인 곳은 --btn-bg·--red-btn (어둡게에서도 흰 글씨 4.5) ---------- */
.btn { background: var(--btn-bg); color: #fff; }
.btn:hover { background: var(--btn-press); }
.btn.soft { background: var(--blue-soft); color: var(--blue-soft-ink); }
.btn.gray { background: var(--fill); color: var(--ink); }
.btn.gray:hover { background: var(--fill-strong); }
.btn.dark { background: var(--grey800); color: var(--card); }
.btn.text { background: transparent; color: var(--ink2); min-height: 44px; }
.btn.danger { background: var(--red-btn); color: #fff; }
.btn.danger.weak { background: var(--red-soft); color: var(--red-ink); }
.btn:disabled, .btn.danger:disabled { background: var(--fill-strong); color: var(--ink2); }
.btn.sm { min-height: 44px; height: 44px; }
.chip.ok, .banner.ok { color: var(--green-ink); }
.chip.bad, .banner.bad { color: var(--red-ink); }
.chip.warn, .banner.warn { color: var(--orange-ink); }
.chip.gray { color: var(--ink2); }
/* 바로 등록 작업 요약 (11-21, app/job_summary.py): 상품명 외 N건 + 알약 */
.js-head { font-weight: 700; overflow-wrap: anywhere; }
.js-pill { margin: 2px 4px 2px 0; vertical-align: middle; }
.js-rest { color: var(--ink2); font-size: var(--fs-13); }
.appbar .brand .mark, .auth .logo .mark, .legal .logo .mark, .switch input:checked + span, .pager a.on,
.steps li.done .dot, .bar i, .gm-ico em { background: var(--btn-bg); }
.bar i em { background: var(--red-btn); }
.check input:checked { border-color: var(--btn-bg); background-color: var(--btn-bg); }
.check input { border-color: var(--ink3); }
a { color: var(--link); }
input::placeholder, textarea::placeholder { color: var(--ink3); opacity: 1; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.chip[class*="m-"] { font-weight: 700; }

/* ---------- 상단바: 메뉴·배지·종 (D23·D02) ---------- */
.topbar { gap: 14px; }
.topbar .topnav { gap: 0; flex-wrap: nowrap; min-width: 0; }
.topbar .topnav a { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; white-space: nowrap; }
.topnav a em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.topnav a em[hidden] { display: none; }
.theme-btn, .fs-btn, .me-menu > summary { width: 44px; height: 44px; }
.top-right { gap: 2px; }
.brand-company { font-size: var(--fs-13); color: var(--ink2); white-space: nowrap; }
.appbar .brand { min-height: 44px; }
.v2-bell { position: relative; }
.v2-bell svg { width: 22px; height: 22px; }
.v2-bell em { position: absolute; right: 2px; top: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red-btn); color: #fff;
  font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.v2-bell em[hidden] { display: none; }
.acct-menu a, .acct-menu button { min-height: 44px; cursor: pointer; font: inherit; font-size: var(--fs-15); color: var(--ink); }
.acct-menu .v2-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: none; padding: 0 12px; border-radius: 10px; text-align: left; }
.acct-menu .v2-switch:hover { background: var(--fill); }
.acct-menu .v2-switch i { font-style: normal; font-size: var(--fs-13); font-weight: 700; color: var(--green-ink); }
.acct-menu form { margin: 0; }
@media (max-width: 1340px) { .topbar .topnav a { padding: 0 7px; } .brand-company { display: none; } }

/* ---------- 오른쪽 패널(D03 기본 접힘)·하단 요약 바(D04 홈에서 숨김) ---------- */
.rail-btn { min-height: 52px; }
/* 처리 예정·이력 아이콘을 막대 위쪽에 모아요 (11-16 사장님 '사이드바 아이콘 위로', 11-11 '아래로'를 뒤집음. 옛 화면 app.css 는 그대로) */
.rail .rail-low { margin-top: 0; }
.rail .rail-fold { margin-top: auto; }   /* 접기 화살표는 맨 아래 (11-16 사장님 '접기 화살표는 내리는 게 낫지') */
.ticker { z-index: 25; }
body.v2-home main.content { padding-bottom: 56px; }

/* ---------- 촘촘한 표·목록 (D08·R04): 표와 목록만. 카드·설정·입력 폼은 지금 간격 ---------- */
.v2-table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.v2-table th, .v2-table td, .order-table td, .bt-table td { padding: var(--v2-row-pad-y) var(--v2-row-pad-x); line-height: var(--v2-row-lh); vertical-align: middle; }
.v2-table thead th { font-size: var(--fs-13); font-weight: 600; color: var(--ink2); text-align: left; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
.v2-table tbody td { height: var(--v2-hit); }                         /* 줄 높이 44px 이상: 줄 전체가 누르는 칸 */
.v2-table tbody tr + tr td { border-top: 1px solid var(--line); }   /* 첫 줄 위에는 선 없음 */
.v2-table tbody tr[data-href], .v2-table tbody tr.v2-click { cursor: pointer; }
.v2-table tbody tr[data-href]:hover td, .v2-table tbody tr.v2-click:hover td { background: var(--fill); }
.v2-table tbody tr.sel td { background: var(--blue-soft); }
.rank-table th, .bt-table th, .order-table th { color: var(--ink2); }
.v2-table th, .bt-table th, .order-table th, .rank-table th { vertical-align: middle; }   /* 열 제목은 세로 가운데. 깔때기 단추(44px)가 없는 열(사진)만 위로 붙던 것 (11-18) */
.v2-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-weight: 600; }
.v2-sub { color: var(--ink2); font-size: var(--fs-13); overflow-wrap: anywhere; word-break: keep-all; max-width: 100%; }   /* 줄바꿈 (11-16 글씨 넘침: inline 이라 말줄임이 안 먹고 화면 밖으로 나갔음) */
.v2-hit { display: inline-flex; align-items: center; min-height: var(--v2-hit); min-width: var(--v2-hit); cursor: pointer; }
.v2-cb { display: grid; place-items: center; width: 44px; min-height: 44px; cursor: pointer; }
.v2-cb input { width: 18px; height: 18px; accent-color: var(--btn-bg); margin: 0; }
td.v2-cbcell, th.v2-cbcell { width: 44px; padding: 0; text-align: center; }
.v2-tablewrap { overflow-x: auto; }
.v2-list { list-style: none; margin: 0; padding: 0; }
.v2-list > li { display: flex; align-items: center; gap: 8px; min-height: var(--v2-hit); padding: 4px 0; line-height: var(--v2-row-lh); }
.v2-list > li + li { border-top: 1px solid var(--line); }
.v2-num, td.v2-num, th.v2-num, .v2-table td.r, .v2-table th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
th.v2-num .v2-th { justify-content: flex-end; }

/* 표 머리 (깔때기 자리, D2 가 누르면 뜨는 창을 붙임) */
.v2-th { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; min-width: 44px; padding: 0 2px; border: 0; background: none; font: inherit; color: var(--ink2); cursor: pointer; border-radius: 8px; white-space: nowrap; }
.v2-th:hover { background: var(--fill); color: var(--ink); }
.v2-th svg { width: 16px; height: 16px; color: var(--ink3); flex: none; }
.v2-th.on { color: var(--blue-soft-ink); background: var(--blue-soft); padding: 0 8px; } .v2-th.on svg { color: var(--blue-soft-ink); }
.v2-th em { font-style: normal; font-size: 12px; font-weight: 700; }

/* 쪽 나눔 */
.v2-pager { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 4px 2px; font-size: var(--fs-13); color: var(--ink2); }
.v2-pager nav { display: flex; gap: 4px; align-items: center; }
.v2-pager .btn { min-width: 44px; }
.v2-pager .btn[aria-current="page"] { background: var(--btn-bg); color: #fff; }

/* ---------- _ui.html 매크로 모양 ---------- */
.v2-chip { display: inline-flex; align-items: center; gap: 4px; }
.v2-chip b { font-variant-numeric: tabular-nums; }
.v2-band { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.v2-band > .v2-band-ic { flex: none; display: grid; }
.v2-band > .v2-band-ic svg { width: 20px; height: 20px; margin: 0; }
.v2-band > span { flex: 1; min-width: 0; }
.v2-band > span b { display: block; }
.v2-band > span small { display: block; font-weight: 500; font-size: var(--fs-13); margin-top: 2px; }
.v2-band .btn { flex: none; }
.v2-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; margin-bottom: 12px; }
.v2-card > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.v2-card > header h2 { margin: 0; font-size: var(--fs-17); }
.v2-sec-h { display: flex; align-items: baseline; gap: 8px; margin: 18px 6px 8px; font-size: var(--fs-15); font-weight: 700; }
.v2-period { font-style: normal; font-weight: 500; font-size: var(--fs-13); color: var(--ink2); }
.v2-state { padding: 44px 16px; text-align: center; color: var(--ink2); font-size: var(--fs-15); }
.v2-state b { display: block; font-size: var(--fs-17); color: var(--ink); margin-bottom: 4px; }
.v2-state .btn { margin-top: 12px; }
.v2-state.err b { color: var(--red-ink); }
.v2-state.ok b { color: var(--green-ink); }
.v2-skel { height: 44px; border-radius: 10px; margin: 6px 0; background: linear-gradient(90deg, var(--fill) 25%, var(--fill-strong) 50%, var(--fill) 75%);
  background-size: 200% 100%; animation: v2sk 1.2s linear infinite; }
@keyframes v2sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .v2-skel { animation: none; } }
.t-ok { color: var(--green-ink); font-style: normal; font-weight: 600; }
.t-bad { color: var(--red-ink); font-style: normal; font-weight: 600; }
.t-warn { color: var(--orange-ink); font-style: normal; font-weight: 600; }
time.v2-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* =====================================================================
   상호작용 컴포넌트 (개편 D2, 동작은 v2.js). 확인 창·토스트·서랍·표 도구·팝오버·종·아래 막대·대기 단추
   ===================================================================== */
/* 확인 창 (D09·R05): <dialog class="v2-dlg"> 를 맨 위 층(top layer)에 띄움. 토스트는 그 아래라 창을 가리지 않음 */
dialog.v2-dlg { border: 0; border-radius: 20px; padding: 20px 20px 16px; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
  background: var(--card); color: var(--ink); box-shadow: 0 16px 48px rgba(0,0,0,.3); overflow: hidden; }
dialog.v2-dlg[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog.v2-dlg.small { width: min(400px, calc(100vw - 32px)); }
dialog.v2-dlg.wide { width: min(720px, calc(100vw - 32px)); }
dialog.v2-dlg::backdrop { background: rgba(0,0,0,.45); }
.v2-dlg h2 { margin: 0 0 10px; font-size: var(--fs-17); font-weight: 700; line-height: 1.45; }
.v2-dlg-body { overflow-y: auto; margin: 0 -8px; padding: 0 8px; }
.v2-dlg .dlg-btns { margin-top: 14px; }
.v2-dlg .dlg-btns .btn { height: 52px; min-height: 52px; }
.v2-dlg .check, .v2-dlg-chk { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: var(--fs-15); cursor: pointer; }
.x-sum { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 10px; }
.x-sum > div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 14px; font-size: var(--fs-15); line-height: var(--v2-row-lh); }
.x-sum > div + div { border-top: 1px solid var(--line); }
.x-sum span { color: var(--ink2); flex: none; }
.x-sum b { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.x-why { margin: 0 0 10px; font-size: var(--fs-15); color: var(--ink2); line-height: 1.55; white-space: pre-line; }
.v2-dlg-need { margin: 0 0 8px; font-size: var(--fs-13); color: var(--ink2); line-height: 1.5; }
.v2-dlg-need[hidden] { display: none; }
.v2-dlg .banner { font-size: var(--fs-13); border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; }

/* 토스트·되돌리기 (S06, 규칙 2): 동작마다 한 줄. 되돌리기가 3개를 넘으면 접음 */
.v2-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tick-h, 40px) + 16px); z-index: 75; display: grid; gap: 8px;
  justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
body.v2-bar-on .v2-toasts { bottom: calc(var(--tick-h, 40px) + 92px); }
.v2-toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 4px 8px 4px 18px; border-radius: 16px;
  background: #26282e; color: #fff; font-size: var(--fs-15); font-weight: 600; box-shadow: 0 8px 28px rgba(0,0,0,.25); max-width: min(640px, calc(100vw - 32px)); }
.v2-toast.plain { padding-right: 18px; }
.v2-toast.warn { background: #8f1d27; }
.v2-toast[hidden] { display: none; }
.v2-toast i { font-style: normal; font-variant-numeric: tabular-nums; color: #d5d9df; font-weight: 500; flex: none; }
.v2-toast button { height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff;
  font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.v2-toast button:hover { background: rgba(255,255,255,.26); }
.v2-undo-more { border: 0; font: inherit; font-size: var(--fs-13); font-weight: 700; cursor: pointer; min-height: 44px; padding: 0 16px; background: #3a3d45; color: #fff; }
@media (prefers-color-scheme: dark) { .v2-toast { background: #3a3a44; } .v2-undo-more { background: #4a4a55; } }

/* 팝오버 (종·열 고르기·깔때기) */
.v2-pop { position: fixed; z-index: 60; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: 8px; overflow-y: auto; outline: none; }
.v2-pop h2 { margin: 6px 10px 4px; font-size: var(--fs-15); }
.v2-pop p { margin: 6px 10px; font-size: var(--fs-13); color: var(--ink2); }
.v2-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: 8px; font-size: var(--fs-15); cursor: pointer; }
.v2-opt:hover { background: var(--fill); }
.v2-opt[hidden] { display: none; }
.v2-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--btn-bg); flex: none; }
.v2-opt span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.v2-opt em { font-style: normal; font-size: var(--fs-13); color: var(--ink2); font-variant-numeric: tabular-nums; }
.v2-pop-foot { display: flex; justify-content: space-between; gap: 8px; padding: 8px 4px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.v2-colpop { width: 280px; }
.v2-thpop { width: 300px; }
.v2-sortrow { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.v2-vals { max-height: 320px; overflow-y: auto; }
.v2-vq, .v2-range input { width: 100%; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: var(--fs-15); padding: 0 10px; margin: 4px 0; }
.v2-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; }
.v2-range label { font-size: var(--fs-13); color: var(--ink2); }

/* 종 목록 (D02·R02·S02) */
.v2-bellpop { right: 16px; top: calc(var(--top-h, 56px) - 2px); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 120px); }
.v2-bell-list { list-style: none; margin: 0; padding: 0; }
.v2-iss { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; align-items: center; }
.v2-iss + .v2-iss { border-top: 1px solid var(--line); }
.v2-iss b { font-size: var(--fs-15); color: var(--ink); }
.v2-iss p { margin: 2px 0 0; font-size: var(--fs-13); color: var(--ink2); }
.v2-iss time { font-size: var(--fs-13); color: var(--ink2); }
.v2-iss .acts { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.v2-iss .acts form { margin: 0; } .v2-iss .acts .btn { width: 100%; white-space: nowrap; }
.v2-bell-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.v2-bell-more { padding: 8px 12px; text-align: center; border-top: 1px solid var(--line); }
.v2-iss-none { padding: 20px 12px; color: var(--ink2); font-size: var(--fs-15); }

/* 주문 상세 서랍 (D15·S09): #app 의 칸 하나로 들어가 본문이 서랍 폭만큼 줄어듦. main 밖이라 live.js 갱신에 지워지지 않음 */
:root { --v2-dr-w: 420px; }
.v2-dr { background: var(--card); border-left: 1px solid var(--line); display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; outline: none; }
.v2-dr[hidden] { display: none; }
.v2-dr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); }
.v2-dr-head h2 { margin: 0; font-size: var(--fs-17); outline: none; }
.v2-dr-nav { display: flex; align-items: center; gap: 2px; }
.v2-dr-nav button { width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; color: var(--ink2); font-size: 22px; line-height: 1; cursor: pointer; }
.v2-dr-nav button:hover:not(:disabled) { background: var(--fill); color: var(--ink); }
.v2-dr-nav button:disabled { color: var(--ink3); cursor: default; opacity: .6; }
.v2-dr-pos { font-size: var(--fs-13); color: var(--ink2); font-variant-numeric: tabular-nums; min-width: 56px; text-align: center; }
.v2-dr-body { overflow-y: auto; padding: 14px 18px 0; }
.v2-dr-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0 14px; background: var(--card); }
.v2-dr-foot .btn { height: 48px; }
@media (min-width: 1024px) {
  .v2-dr { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h) - var(--tick-h)); box-shadow: -8px 0 28px rgba(0,0,0,.06); }
  body.v2-dr-on .app { grid-template-columns: minmax(0, 1fr) var(--v2-dr-w) var(--side-w, 320px) 64px; }
  body.v2-dr-on .app.side-off { grid-template-columns: minmax(0, 1fr) var(--v2-dr-w) 0 64px; }
  /* 오른쪽 막대 없는 화면 (틀의 no_rail 블록, 11-16 홈) */
  .app.no-rail, .app.no-rail.side-off { grid-template-columns: minmax(0, 1fr); }
  body.v2-dr-on .app.no-rail, body.v2-dr-on .app.no-rail.side-off { grid-template-columns: minmax(0, 1fr) var(--v2-dr-w); }
}
@media (min-width: 1024px) and (max-width: 1365px) { :root { --v2-dr-w: 380px; } }
@media (max-width: 1023px) { .v2-dr { position: fixed; inset: 0; z-index: 70; } }   /* 휴대폰 모양은 D3 */

/* 표 도구 (D13·S07·D10): 고른 줄, 조건 전체 고르기 줄, 좁으면 접는 칸(data-fold-in), 아래 막대 */
[data-v2-table] [data-fold-in] { display: none; }
.v2-table tbody tr:has(input[data-pick]:checked) > td { background: var(--blue-soft); }
.v2-selall { padding: 4px 12px; margin: 6px 0; border-radius: 10px; background: var(--blue-soft); color: var(--blue-soft-ink); font-size: var(--fs-13); font-weight: 600; }
.v2-selall[hidden] { display: none; }
.v2-selall .v2-link, button.v2-link { border: 0; background: none; padding: 0 4px; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.v2-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.v2-tools .grow { flex: 1; min-width: 0; }
.v2-find { display: flex; gap: 8px; flex: 1; min-width: 200px; }
.v2-find input[type=search] { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: var(--fs-15); padding: 0 12px; }
.v2-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tick-h, 40px) + 12px); z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 18px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 28px rgba(0,0,0,.16);
  max-width: calc(100vw - 120px); font-size: var(--fs-15); flex-wrap: wrap; }
.v2-bar[hidden] { display: none; }
.v2-bar > b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.v2-bar .btn { white-space: nowrap; }
.v2-bar form { margin: 0; display: inline-flex; }
body.v2-bar-on main.content { padding-bottom: calc(var(--tick-h, 40px) + 108px); }   /* 아래 막대가 마지막 줄을 가리지 않게 */
body:not(:has(.ticker)) .v2-bar { bottom: 12px; }

/* 대기 단추 (송장 지금 가져오기 등): 남은 초 */
.btn.v2-waiting { font-variant-numeric: tabular-nums; }
/* 줄 안에서 서랍을 여는 단추 (<button class="v2-open" data-open>): 글자 모양 그대로, 누르는 칸 44px */
.v2-open { border: 0; background: none; padding: 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; display: grid; align-content: center; min-height: 44px; min-width: 44px; max-width: 100%; }
.v2-open:hover .v2-name { text-decoration: underline; }
/* 알림 링크로 옮겨 온 칸 (?hl= → [data-jump], M1). 표 줄은 app.css 의 tr.hl-blink 그대로 */
[data-jump].hl-blink { animation: hl-blink .7s ease-in-out 3; background: var(--blue-soft); border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { [data-jump].hl-blink { animation: none; } }
/* 체험 띠 단추도 누르는 칸 44px (모든 새 화면, M1) */
.demo-bar .btn.sm { height: 44px; min-height: 44px; }
/* 좁은 폭에서 계정 메뉴가 화면 밖으로 나가지 않게 (390 폭 14px 넘침, M1) */
.acct-menu { max-width: calc(100vw - 24px); box-sizing: border-box; }
.acct-menu .v2-switch, .acct-menu a, .acct-menu button { white-space: normal; }
/* 열 폭 손잡이가 마지막으로 보이는 열 밖으로 6px 나가 표 칸이 가로로 넘치던 것 (데스크톱 리뷰 10, M1): 숨긴 열 때문에 :last-child 로는 못 잡아 손잡이를 열 안쪽에 둠 */
.v2-tablewrap thead th .col-grip { right: 0; }

/* ---------- 되살린 거르기 띠 (R29, fkeep.js): 표 위에서 무엇을 걸었는지 알리고 한 번에 풀어요 ---------- */
.v2-fkeep { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; padding: 4px 6px 4px 14px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-soft-ink); font-size: var(--fs-15); }
.v2-fkeep > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.v2-fkeep b { font-weight: 700; margin-right: 6px; }
.v2-fkeep .btn { flex: none; background: var(--card); color: var(--ink); }
@media (max-width: 767px) { .v2-fkeep { flex-wrap: wrap; padding: 8px 10px; } .v2-fkeep .btn { margin-left: auto; } }
/* 본문 건너뛰기 (재리뷰 D2 9번): 포커스를 받을 때만 왼쪽 위에 보여요 */
.v2-skip { position: fixed; left: 16px; top: -64px; z-index: 200; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px;
  background: var(--card); color: var(--link); font-weight: 700; text-decoration: none; box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
.v2-skip:focus, .v2-skip:focus-visible { top: 8px; }
/* 상태 탭 (주문 화면 D12, 발주 화면 발주 기록 11-16): 밑줄 탭, 숫자는 .n, 0건은 .zero, 확인할 것이 있으면 .hot */
.ob-tabs { display: flex; gap: 4px 16px; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--line); margin: 0 0 10px; position: relative; }
.ob-tabs a, .ob-tabs summary { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-15); font-weight: 600; color: var(--ink2);
  text-decoration: none; white-space: nowrap; cursor: pointer; }
.ob-tabs a .n, .ob-tabs summary .n { font-weight: 500; font-variant-numeric: tabular-nums; }
.ob-tabs a.zero { color: var(--ink3); font-weight: 500; }
.ob-tabs a.hot, .ob-tabs summary .n.hot { color: var(--red-ink); }
.ob-tabs > a.on, .ob-more > summary.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.ob-tabs > a.hot.on { box-shadow: inset 0 -2px 0 var(--red-ink); }

/* ---------- 아래에 붙는 단추 줄 (디자인 지침 '첫 화면에 단추가 다 보이게', 11-16): 폼이 길어도 단추가 창 아래(티커·탭바 바로 위)에 붙어 보여요.
   폼(또는 감싼 칸)의 직속 자식에 .v2-stick. 폼이 끝나면 제자리로 돌아가요. 카드 안이면 카드 바탕, 카드 밖이면 .on-bg ---------- */
.v2-stick { position: sticky; bottom: var(--tick-h, 40px); z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 0; background: var(--card); box-shadow: 0 -1px 0 var(--line); }
.v2-stick.on-bg { background: var(--bg); padding: 12px 0 14px; }
body:not(:has(.ticker)) .v2-stick { bottom: 0; }
@media (max-width: 767px) {
  .v2-stick, body:not(:has(.ticker)) .v2-stick { bottom: var(--v2m-above, 0px); }
  .v2-stick > .btn { flex: 1 1 0; min-width: 0; }
}
/* 글씨 넘침 금지 (11-16 사장님, docs/디자인_지침.md): 긴 글은 낱말 단위로 꺾고, 낱말이 상자보다 길면 그 자리에서 꺾어요. 표 칸은 fit.css 가 break-word 로 되돌림 */
.v2 main, .v2 dialog, .v2 .v2-dr { overflow-wrap: anywhere; word-break: keep-all; }
/* 발주 줄 (11-16 글씨 넘침): 자리가 모자라면 금액 칸이 아래 줄로 내려가요. 360px 에서 상품 이름이 한 글자 폭으로 눌렸음 */
.v2 .pu-row { flex-wrap: wrap; }
.v2 .pu-row > .pu-main { flex: 1 1 150px; }
.v2 .pu-row > .pu-amt { margin-left: auto; }
.v2 .pu-amt .sub { white-space: normal; }
/* 이름·값 목록 (11-16 글씨 넘침): 값이 길면 값이 줄을 바꾸고, 이름 칸은 한 글자씩 꺾이지 않게 최소 폭 */
.v2 .list .item > .k { min-width: 4.5em; }
.v2 .list .item > .v { min-width: 0; }
.v2 .list .item > .v.v2-num { white-space: normal; }
/* 카드 머리 줄 (11-16 글씨 넘침, 역마진 품절 .mw 규칙을 공통으로): 자리가 모자라면 오른쪽 단추가 아래 줄로 내려가고 글 칸은 줄어요 */
.v2 .card .row { flex-wrap: wrap; }
.v2 .card .row > .grow { flex: 1 1 200px; min-width: 0; }
