/* 디저버 베이스캠프 화면: "DESERVER 워크벤치 v2" (캔버스 바탕 + 스틸 사이드바 + 우드 결 + 불씨 마름모).
   v2(2026-10-23): 모서리를 줄여 단단하게(6/10/14 → 4/6/8px), 글자는 Pretendard 하나로 맞추고 고정폭은 코드에만,
   줄 아이콘(18px)과 절제된 움직임(들어오기·펼치기·눌림·숫자 올라가기)을 더했습니다. 규칙은 docs/디자인_가이드.md */

/* 글꼴: Pretendard 가변 글꼴을 이 서버(app/web/fonts)에서 내줍니다. 외부 주소로 부르지 않습니다(CSP, 현장 오프라인). */
@font-face {
  font-family: "Pretendard Variable";
  src: url("/app/static/fonts/PretendardVariable.woff2") format("woff2-variations"),
       url("/app/static/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 바탕·면(캔버스) */
  --bg: #eeebe4;
  --panel: #fdfcf9;
  --panel-sub: #f5f2ec;
  --hover: #f2eee6;
  --select: #e9e3d7;
  --line: #e1dbcf;
  --line-strong: #cbc3b2;
  /* 글자 */
  --text: #1c1f1d;
  --muted: #5f6762;
  --subtle: #8f968f;
  /* 스틸(사이드바) */
  --steel: #232a27;
  --steel-2: #2f3834;
  --steel-3: #3a4540;
  --steel-line: rgba(255, 255, 255, .08);
  --steel-text: #f2efe8;
  --steel-muted: #a3aca5;
  /* 우드(브랜드 결) · 불씨(강조) · 소나무(주 단추) */
  --wood: #a9743f;
  --wood-2: #86592a;
  --wood-soft: #f3e7d6;
  --ember: #e4552a;
  --ember-2: #bf4119;
  --ember-soft: #fbe6dd;
  --pine: #2f5d4a;
  --pine-2: #244a3a;
  --pine-soft: #e1ece6;
  --brand: var(--pine);
  --brand-2: var(--pine-2);
  --brand-soft: var(--pine-soft);
  --accent: var(--ember);
  --focus: var(--ember);
  --focus-ring: rgba(228, 85, 42, .24);
  --toast-bg: #232a27;
  /* 상태 */
  --ok: #2f5d4a;    --ok-bg: #e3eee8;    --ok-line: #b9d3c5;
  --warn: #9a6200;  --warn-bg: #fbf1dc;  --warn-line: #ebd39a;
  --err: #bf3b1f;   --err-bg: #fbe9e3;   --err-line: #efc2b3;  --err-2: #962d15;
  --info: #2c5a7c;  --info-bg: #e7eff6;  --info-line: #bfd5e5;
  --neutral: #5d615c; --neutral-bg: #ede9e1; --neutral-line: #d6cfc0;
  /* 글자 크기·굵기 */
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-title: 24px;
  --fs-stat: 28px;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 600;
  --fw-black: 700;
  /* 모서리: v1 의 약 60% 수준으로 줄임(각지고 단단하게) */
  --radius-xs: 3px;
  --radius: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --radius-pill: 999px;
  /* 그림자: 겹친 옅은 그림자 */
  --shadow-sm: 0 1px 1px rgba(28, 31, 29, .03), 0 1px 3px rgba(28, 31, 29, .05);
  --shadow-md: 0 1px 3px rgba(28, 31, 29, .06), 0 6px 18px rgba(28, 31, 29, .09);
  --shadow-lg: 0 2px 8px rgba(28, 31, 29, .08), 0 20px 56px rgba(28, 31, 29, .22);
  /* 움직임: 짧고 부드럽게. 줄이기 설정(prefers-reduced-motion)이면 모두 끕니다(맨 아래) */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 120ms;
  --t: 200ms;
  --t-slow: 320ms;
  /* 크기 */
  --side-w: 248px;
  --topbar-h: 56px;
  --ctl-h: 34px;
  --ctl-h-sm: 28px;
  --th-h: 38px;
  --td-h: 44px;
  --page-w: 1400px;
  --page-x: 28px;
  --gap: 14px;
  --card-pad: 20px;
  --font: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
  font-feature-settings: "ss06";
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .topbar { background: var(--bg); }
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 12px); }
body { margin: 0; background: var(--bg); min-width: 360px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--ember); color: #fff; }
a { color: var(--pine); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: color var(--t-fast), text-decoration-color var(--t-fast); }
a:hover { text-decoration-color: var(--ember); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
h1, h2, h3 { margin: 0 0 10px; font-weight: var(--fw-bold); color: var(--text); }
h1 { font-size: var(--fs-lg); line-height: 24px; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-md); line-height: 22px; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-base); line-height: 20px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: var(--fs-sm); line-height: 17px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
/* 고정폭은 코드(기준번호·로트·SKU·운송장·채널 코드)에만. 한글이 섞이는 칸에는 쓰지 않습니다(자간이 벌어져 보임). */
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; letter-spacing: 0; }
.wood { color: var(--wood); }
.ember { color: var(--ember); }
.pine { color: var(--pine); }
.spacer { flex: 1; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.col.gap { gap: var(--gap); }   /* 화면 본문 세로 묶음(카드 사이 간격). 인라인 style 대신 씁니다 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── 움직임(키프레임) ── */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes badge-pop { 0% { transform: scale(.55); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes shimmer { from { background-position: -480px 0; } to { background-position: 480px 0; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes route-bar { 0% { transform: scaleX(0); } 40% { transform: scaleX(.55); } 100% { transform: scaleX(.88); } }
@keyframes drift { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-14px, -8px) rotate(-2deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--focus-ring); } 100% { box-shadow: var(--shadow-sm); } }

/* 화면 들어오기: 바뀐 화면의 첫 조각들이 아래에서 살짝 올라옵니다(앞 6개까지 차례로). core.js route() 가 잠깐만 붙입니다. */
.page-enter > * { animation: rise var(--t-slow) var(--ease) both; }
.page-enter > *:nth-child(2) { animation-delay: 40ms; }
.page-enter > *:nth-child(3) { animation-delay: 80ms; }
.page-enter > *:nth-child(4) { animation-delay: 120ms; }
.page-enter > *:nth-child(5) { animation-delay: 160ms; }
.page-enter > *:nth-child(n+6) { animation-delay: 200ms; }

/* ── 줄 아이콘(index.html 의 symbol, 24 격자, 획 1.75) ── */
.ico { width: 18px; height: 18px; flex: none; display: block; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 20px; height: 20px; }

/* ── 마름모(불씨): 화면 전체의 강조 기호 ── */
.gem { display: inline-block; width: 7px; height: 7px; background: var(--ember); transform: rotate(45deg); flex: none; border-radius: 1px; }
.gem.ok { background: var(--pine); }
.gem.warn { background: var(--warn); }
.gem.wood { background: var(--wood); }
.gem.muted { background: var(--line-strong); }

/* ── 로고 ── */
.logo-mark { width: 30px; height: 30px; flex: none; display: block; }
.logo-word { height: 11px; width: auto; display: block; color: var(--steel-text); }
.logo-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--steel-muted); margin-top: 5px; }

/* ── 틀: 사이드바 + 상단 줄 + 본문 ── */
.layout { display: flex; min-height: 100vh; }
.side { width: var(--side-w); flex: none; background: var(--steel); color: var(--steel-text); position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--steel-3) transparent; }
.side-logo { display: flex; align-items: center; gap: 12px; padding: 18px 20px 16px; text-decoration: none; color: inherit; }
.side-logo .logo-mark { transition: transform var(--t-slow) var(--ease); }
.side-logo:hover .logo-mark { transform: rotate(-6deg) scale(1.04); }
.side-logo-text { display: flex; flex-direction: column; min-width: 0; }
.side-rule { height: 1px; margin: 0 20px; background: linear-gradient(90deg, var(--wood), rgba(169, 116, 63, 0)); opacity: .8; }
.side-channel { position: relative; padding: 14px 12px 6px; }
.channel-btn { width: 100%; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; border: 1px solid var(--steel-line); border-radius: var(--radius-lg); background: var(--steel-2); color: var(--steel-text); cursor: pointer; font: inherit; text-align: left; box-shadow: none; transition: background-color var(--t-fast), border-color var(--t-fast); }
.channel-btn:hover, .channel-btn[aria-expanded="true"] { background: var(--steel-3); border-color: rgba(255, 255, 255, .14); color: var(--steel-text); }
.channel-btn:focus-visible { outline: 2px solid var(--ember); outline-offset: 1px; }
.channel-btn .chev { margin-left: 2px; color: var(--steel-muted); transition: transform var(--t) var(--ease); }
.channel-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.channel-name { font-size: 13px; font-weight: var(--fw-bold); color: #fff; white-space: nowrap; letter-spacing: -0.01em; }
.channel-sub { font-size: 11px; color: var(--steel-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-static { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: var(--radius-lg); background: var(--steel-2); border: 1px solid var(--steel-line); }
.channel-menu { position: absolute; left: 12px; right: 12px; top: calc(100% - 2px); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; transform-origin: top center; }
.channel-menu:not([hidden]) { animation: pop-in var(--t) var(--ease); }
.channel-menu .who-head { padding: 6px 10px 6px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--subtle); }
.channel-menu button { width: 100%; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: none; background: none; border-radius: var(--radius); font: inherit; color: var(--text); cursor: pointer; text-align: left; box-shadow: none; }
.channel-menu button:hover { background: var(--hover); color: var(--text); }
.channel-menu button.on { font-weight: var(--fw-bold); background: var(--panel-sub); }
.channel-menu button .count { margin-left: auto; }

/* 사이드바 메뉴: 묶음 머리를 누르면 펼치고 접습니다(드롭다운처럼). 펼친 상태는 이 브라우저에 기억합니다. */
.side-nav { padding: 4px 12px 14px; flex: 1; }
.side-group { margin-top: 6px; }
.side-group:first-child { margin-top: 4px; }
.side-group-head { width: 100%; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 10px; margin: 0; border: none; border-radius: var(--radius); background: none; color: var(--steel-muted); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold); letter-spacing: .01em; cursor: pointer; text-align: left; box-shadow: none; }
.side-group-head:hover { background: rgba(255, 255, 255, .04); color: var(--steel-text); border: none; }
.side-group-head .label { flex: 1; min-width: 0; }
.side-group-head .count { opacity: 0; transform: scale(.6); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
.side-group.closed .side-group-head .count { opacity: 1; transform: none; }
.side-group-head .chev { width: 14px; height: 14px; color: var(--steel-muted); transition: transform var(--t) var(--ease); }
.side-group.closed .side-group-head .chev { transform: rotate(-90deg); }
.side-group-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--t-slow) var(--ease), opacity var(--t) var(--ease); }
.side-group.closed .side-group-body { grid-template-rows: 0fr; opacity: 0; }
.side-group-inner { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 1px; margin: 0 -12px; padding: 0 12px; }  /* 넓힌 까닭: 지금 메뉴 막대(사이드바 왼쪽 끝)가 접기용 overflow 에 잘리지 않게 */
.side-group.closed .side-group-inner { visibility: hidden; transition: visibility 0s var(--t-slow); }
.side-nav a { position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius); color: var(--steel-muted); text-decoration: none; font-size: 13.5px; transition: background-color var(--t-fast), color var(--t-fast); }
.side-nav a .ico { color: var(--steel-muted); opacity: .9; transition: color var(--t-fast), transform var(--t) var(--ease); }
.side-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-nav a:hover .ico { color: #fff; }
/* ⚠️ 메뉴 줄 규칙은 .side-nav 안에만 겁니다(.side a 로 걸면 로고 링크까지 높이 36px·여백 0 이 되어 로고가 위에 붙었음) */
.side-nav a::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 2px 2px 0; background: var(--ember); transform: scaleY(0); transition: transform var(--t) var(--ease); }
.side-nav a.on { background: var(--steel-2); color: #fff; font-weight: var(--fw-medium); box-shadow: inset 0 0 0 1px var(--steel-line); }
.side-nav a.on::before { transform: scaleY(1); }
.side-nav a.on .ico { color: var(--ember); opacity: 1; }
.side-nav a .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; background: var(--ember); color: #fff; font-size: var(--fs-xs); font-weight: var(--fw-bold); line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.count.pop { animation: badge-pop .45s var(--ease); }
.count.quiet { background: var(--steel-3); color: var(--steel-muted); }
.side-foot { padding: 12px 20px 16px; font-size: var(--fs-xs); color: var(--steel-muted); border-top: 1px solid var(--steel-line); display: flex; align-items: center; gap: 8px; }
.side-foot .kbd { background: var(--steel-2); border-color: var(--steel-3); color: var(--steel-muted); }
.side-scrim { display: none; }
.side-toggle { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); background: rgba(238, 235, 228, .82); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; display: flex; align-items: center; gap: 10px; padding: 0 var(--page-x); transition: border-color var(--t), box-shadow var(--t); }
.topbar.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 20px -16px rgba(28, 31, 29, .35); }
.topbar-crumb { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.topbar-crumb .sep { color: var(--line-strong); }
.topbar-crumb b { font-weight: var(--fw-medium); color: var(--text); }
.topbar-crumb .ch { color: var(--muted); }
.topbar .spacer { flex: 1; }
.route-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--ember), var(--wood)); transform-origin: left center; transform: scaleX(0); opacity: 0; pointer-events: none; }
.route-bar.on { opacity: 1; animation: route-bar 1.4s var(--ease) forwards; }
.route-bar.done { opacity: 0; transform: scaleX(1); transition: opacity .35s ease .08s, transform .18s var(--ease); }
.cmd-btn { height: 34px; min-width: 200px; display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(253, 252, 249, .7); color: var(--subtle); font-size: 13px; font-weight: var(--fw-regular); justify-content: flex-start; box-shadow: none; }
.cmd-btn:hover { border-color: var(--line-strong); color: var(--muted); background: var(--panel); }
.cmd-btn .label { flex: 1; text-align: left; }
.kbd { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--radius-xs); background: var(--panel-sub); color: var(--muted); font-family: var(--mono); font-size: 10.5px; line-height: 1; letter-spacing: 0; }
.bell { position: relative; width: 36px; height: 36px; padding: 0; border-radius: var(--radius); border: 1px solid transparent; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); box-shadow: none; }
.bell:hover { background: var(--hover); color: var(--text); border-color: var(--line); }
.bell .ico { width: 20px; height: 20px; }
.bell:hover .ico { animation: bell-ring .5s var(--ease); }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(12deg); } 50% { transform: rotate(-9deg); } 75% { transform: rotate(5deg); } }
.bell .count { position: absolute; top: 1px; right: 0; box-shadow: 0 0 0 2px var(--bg); }
.who { position: relative; }
.who-btn { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 4px; border: 1px solid transparent; border-radius: var(--radius-lg); background: none; cursor: pointer; font: inherit; color: var(--text); box-shadow: none; }
.who-btn:hover, .who-btn[aria-expanded="true"] { background: var(--hover); border-color: var(--line); color: var(--text); }
.avatar { width: 30px; height: 30px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--wood), var(--wood-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: var(--fw-bold); font-size: 13px; flex: none; }
.who-btn .user { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.who-btn .user-name { font-size: 13px; font-weight: var(--fw-bold); }
.who-btn .user .muted { font-size: var(--fs-xs); }
.who-btn .chev { width: 14px; height: 14px; color: var(--subtle); transition: transform var(--t) var(--ease); }
.who-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.who-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; z-index: 30; transform-origin: top right; }
.who-menu:not([hidden]) { animation: pop-in var(--t) var(--ease); }
.who-menu .who-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.who-menu .who-head .user-name { font-weight: var(--fw-bold); }
.who-menu .who-org { color: var(--muted); }
.who-menu button[role="menuitem"] { width: 100%; height: 36px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 0 10px; border: none; background: none; border-radius: var(--radius); font: inherit; font-weight: var(--fw-regular); color: var(--text); cursor: pointer; text-align: left; box-shadow: none; }
.who-menu button[role="menuitem"] .ico { color: var(--muted); }
.who-menu button[role="menuitem"]:hover { background: var(--hover); color: var(--text); }

.page-head { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: 22px var(--page-x) 0; }
.page-head-inner { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head-text { flex: 1; min-width: 0; }
.page-eyebrow { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: var(--fw-bold); letter-spacing: 0; color: var(--wood); }
.page-eyebrow .gem { width: 6px; height: 6px; }
.page-head h1 { font-size: var(--fs-title); line-height: 32px; font-weight: var(--fw-black); letter-spacing: -0.03em; margin: 4px 0 0; }
.page-head h1::after { content: ""; display: block; width: 36px; height: 3px; background: var(--wood); margin-top: 10px; border-radius: 1px; transform-origin: left center; }
.page-head.enter h1::after { animation: grow-x .5s var(--ease) both; }
.page-head.enter .page-eyebrow, .page-head.enter h1 { animation: fade var(--t-slow) var(--ease) both; }
.page-actions { display: flex; gap: 8px; align-items: center; padding-bottom: 14px; flex-wrap: wrap; }
.page-actions > * { animation: fade var(--t) var(--ease) both; }
.content { width: 100%; max-width: var(--page-w); margin: 0 auto; padding: 18px var(--page-x) 64px; display: flex; flex-direction: column; gap: var(--gap); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--muted); text-decoration: none; align-self: flex-start; }
.back-link:hover { color: var(--pine); }
.back-link:hover .back-arrow { transform: translateX(-3px); }
.back-arrow { display: inline-block; transition: transform var(--t) var(--ease); }

/* 불러오는 동안: 위 줄의 얇은 진행 막대 + 0.12초 넘게 걸리면 자리 표시(반짝임) */
.skeleton { display: flex; flex-direction: column; gap: var(--gap); animation: fade var(--t) ease .12s both; }
.sk { border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(90deg, var(--panel-sub) 0%, #faf8f4 45%, var(--panel-sub) 90%); background-size: 960px 100%; animation: shimmer 1.3s linear infinite; }
.sk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.sk.stat { height: 104px; }
.sk.bar { height: 54px; }
.sk.block { height: 260px; }

/* ── 카드·그리드 ── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: var(--card-pad); min-width: 0; transition: box-shadow var(--t), border-color var(--t); }
.card > h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card > h2 .dash-more, .card > h2 a.more { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--pine); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.card > h2 a.more:hover, .card > h2 .dash-more:hover { color: var(--ember); }
.card > h2 .small.muted { margin-left: auto; font-weight: var(--fw-regular); }
.card > .table-wrap { margin: 0 calc(-1 * var(--card-pad)); border-left: none; border-right: none; border-radius: 0; box-shadow: none; }
.card > .table-wrap:last-child { margin-bottom: calc(-1 * var(--card-pad)); border-bottom: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card > .table-wrap:first-child { margin-top: calc(-1 * var(--card-pad)); border-top: none; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.card > .table-wrap th:first-child, .card > .table-wrap td:first-child { padding-left: var(--card-pad); }
.card > .table-wrap th:last-child, .card > .table-wrap td:last-child { padding-right: var(--card-pad); }
.card .stat { border: none; background: var(--panel-sub); box-shadow: none; }
.grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid > * { min-width: 0; }
.grid.dash-row { align-items: stretch; }
/* 빈 목록: 작은 텐트 그림(브랜드 마크의 선) + 문구 */
.empty { padding: 30px 12px; text-align: center; color: var(--subtle); font-size: 13px; }
.empty::before { content: ""; display: block; width: 30px; height: 30px; margin: 0 auto 8px; background-color: var(--line-strong); -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path d='M10 33 L24 12 L38 33' fill='none' stroke='black' stroke-width='3.5' stroke-linejoin='round' stroke-linecap='round'/><path d='M8.5 39 H39.5' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round'/><path d='M24 23.5 l3.6 3.6 -3.6 3.6 -3.6 -3.6 z' fill='black'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path d='M10 33 L24 12 L38 33' fill='none' stroke='black' stroke-width='3.5' stroke-linejoin='round' stroke-linecap='round'/><path d='M8.5 39 H39.5' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round'/><path d='M24 23.5 l3.6 3.6 -3.6 3.6 -3.6 -3.6 z' fill='black'/></svg>") center / contain no-repeat; }
.empty.tall { padding: 56px 12px; }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--info-line); background: var(--info-bg); color: var(--info); font-size: 13.5px; }
.notice.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.notice.err { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.notice.ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.notice.neutral { border-color: var(--neutral-line); background: var(--neutral-bg); color: var(--neutral); }
.notice.ember { border-color: #f4b9a3; background: var(--ember-soft); color: var(--ember-2); }
.notice a { color: inherit; }
.notice.seller-note { align-items: flex-start; }
.notice.seller-note .cell-main { margin-bottom: 2px; }

/* ── 대시보드 ── */
.dash-hello { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-hello-name { font-size: 18px; font-weight: var(--fw-bold); letter-spacing: -0.02em; }
.dash-hello-date { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stat { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 16px 18px; min-height: 108px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; overflow: hidden; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: var(--fw-medium); }
.stat .value { font-size: var(--fs-stat); line-height: 34px; font-weight: var(--fw-black); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .sub { font-size: var(--fs-sm); color: var(--subtle); }
.stat.link { cursor: pointer; transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t); }
.stat.link:hover { border-color: var(--wood); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat.link:active { transform: translateY(0); }
.stat.link::after { content: "→"; position: absolute; right: 14px; bottom: 12px; color: var(--subtle); font-size: 14px; transition: transform var(--t) var(--ease), color var(--t); }
.stat.link:hover::after { color: var(--ember); transform: translateX(3px); }
.dash-todo .stat:first-child, .stat.steel { background: linear-gradient(160deg, #2b3430 0%, var(--steel) 70%); border-color: var(--steel); color: var(--steel-text); }
.dash-todo .stat:first-child .label, .stat.steel .label { color: var(--steel-muted); }
.dash-todo .stat:first-child .sub, .stat.steel .sub { color: var(--steel-muted); }
.dash-todo .stat:first-child .value, .stat.steel .value { font-size: 34px; color: #fff; }
.dash-todo .stat:first-child::before, .stat.steel::before { content: ""; position: absolute; top: 15px; right: 15px; width: 8px; height: 8px; border-radius: 1px; background: var(--ember); transform: rotate(45deg); box-shadow: 0 0 0 4px rgba(228, 85, 42, .16); }
.dash-todo .stat:first-child .gem-corner { display: none; }
.dash-todo .stat:first-child { box-shadow: inset 0 -3px 0 var(--wood), var(--shadow-sm); }
.dash-todo .stat:first-child.link:hover { border-color: var(--wood); box-shadow: inset 0 -3px 0 var(--wood), var(--shadow-md); }
.dash-todo .stat:first-child.link::after { color: var(--steel-muted); }
.dash-tile { height: auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; min-height: 84px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); cursor: pointer; font: inherit; color: var(--text); text-align: left; white-space: normal; box-shadow: var(--shadow-sm); transition: box-shadow var(--t) var(--ease), border-color var(--t), transform var(--t) var(--ease); }
.dash-tile:hover { box-shadow: var(--shadow-md); border-color: var(--wood); color: var(--text); transform: translateY(-2px); }
.dash-tile-title { font-size: var(--fs-base); font-weight: var(--fw-bold); }
.dash-tile-desc { font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-regular); }
.dash-tile.primary { background: var(--pine); border-color: var(--pine); color: #fff; }
.dash-tile.primary .dash-tile-desc { color: rgba(255, 255, 255, .75); }
.dash-tile.primary:hover { background: var(--pine-2); color: #fff; }
.dash-alert { justify-content: space-between; }
.dash-alert .dash-alert-text { flex: 1; }
.dash-alert-link { font-weight: var(--fw-medium); white-space: nowrap; }
.dash-title { display: inline-flex; align-items: center; gap: 8px; }
.dash-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--radius); background: var(--ember-soft); color: var(--ember-2); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.dash-notifs { display: flex; flex-direction: column; }
.dash-notif { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.dash-notif:first-child { border-top: none; padding-top: 0; }
.dash-notif .t { font-weight: var(--fw-medium); display: flex; align-items: center; gap: 8px; }
.dash-notif .t > span, .dash-notif .small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-notif.unread .t::before { content: ""; width: 7px; height: 7px; border-radius: 1px; background: var(--ember); transform: rotate(45deg); flex: none; }
.dash-notif-time { white-space: nowrap; font-size: var(--fs-sm); color: var(--subtle); font-variant-numeric: tabular-nums; }
.pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.pipe > button { height: auto; min-height: 78px; border-radius: 0; background: var(--panel); border: none; padding: 14px 14px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; justify-content: center; font: inherit; cursor: pointer; color: var(--text); box-shadow: none; }
.pipe > button:hover { background: var(--hover); color: var(--text); }
.pipe .n { font-size: 24px; font-weight: var(--fw-black); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pipe .n.ember { color: var(--ember); }
.pipe .l { font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: var(--fw-regular); }

/* ── 단추 ── */
button, .btn { height: var(--ctl-h); padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: inherit; font-size: var(--fs-base); font-weight: var(--fw-medium); letter-spacing: -0.01em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; text-decoration: none; box-shadow: 0 1px 1px rgba(28, 31, 29, .04); transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast); }
button:hover, .btn:hover { border-color: var(--pine); color: var(--pine); }
button:active:not(:disabled), .btn:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
button .ico, .btn .ico { width: 16px; height: 16px; }
button.primary, .btn.primary { background: var(--pine); border-color: var(--pine); color: #fff; box-shadow: 0 1px 2px rgba(28, 31, 29, .16), inset 0 1px 0 rgba(255, 255, 255, .1); }
button.primary:hover, .btn.primary:hover { background: var(--pine-2); border-color: var(--pine-2); color: #fff; }
button.ember, .btn.ember { background: var(--ember); border-color: var(--ember); color: #fff; box-shadow: 0 1px 2px rgba(191, 65, 25, .3), inset 0 1px 0 rgba(255, 255, 255, .14); }
button.ember:hover, .btn.ember:hover { background: var(--ember-2); border-color: var(--ember-2); color: #fff; }
button.danger, .btn.danger { color: var(--err); border-color: var(--err-line); }
button.danger:hover { background: var(--err-bg); color: var(--err-2); border-color: var(--err); }
button.ghost { border-color: transparent; background: none; box-shadow: none; }
button.ghost:hover { background: var(--hover); border-color: transparent; color: var(--text); }
button.small, .btn.small { height: var(--ctl-h-sm); padding: 0 10px; font-size: var(--fs-sm); }
button.review-accept-edit { color: var(--info); border-color: var(--info-line); }
button.review-accept-edit:hover { background: var(--info-bg); color: var(--info); }
button.review-revise { color: var(--info); border-color: var(--info-line); border-style: dashed; }
button.review-revise:hover { background: var(--info-bg); color: var(--info); }
button.review-reject { color: var(--warn); border-color: var(--warn-line); }
button.review-reject:hover { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
button.review-refuse { background: var(--err); border-color: var(--err); color: #fff; }
button.review-refuse:hover { background: var(--err-2); border-color: var(--err-2); color: #fff; }
button.draft-btn { color: var(--muted); }
.btn-link { height: auto; padding: 0 2px; border: none; background: none; box-shadow: none; }
.form-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card > .form-actions:last-child { margin: 14px calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)); padding: 12px var(--card-pad); border-top: 1px solid var(--line); background: var(--panel-sub); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ── 입력칸 ── */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text); min-width: 0; }
label.f.inline { flex-direction: row; align-items: center; gap: 8px; min-height: var(--ctl-h); font-weight: var(--fw-regular); font-size: var(--fs-base); }
label.f .help { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-regular); }
label.f.required > span:first-child::after, .req::after { content: " *"; color: var(--ember); }
label.f.major > span:first-child { font-weight: var(--fw-bold); }
label.f.major input, label.f.major select, label.f.major textarea { box-shadow: inset 3px 0 0 var(--wood); }
input, select, textarea { height: var(--ctl-h); padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius); background-color: #fff; color: var(--text); font: inherit; font-size: var(--fs-base); font-weight: var(--fw-regular); min-width: 0; width: 100%; transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast); }
input::placeholder, textarea::placeholder { color: var(--subtle); }
textarea { height: auto; min-height: 88px; padding: 8px 11px; resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--focus-ring); }
label.f.major input:focus, label.f.major select:focus, label.f.major textarea:focus { box-shadow: inset 3px 0 0 var(--wood), 0 0 0 3px var(--focus-ring); }
input:disabled, select:disabled, textarea:disabled { background-color: var(--panel-sub); color: var(--muted); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; padding: 0; margin: 0; accent-color: var(--pine); box-shadow: none; }
select { appearance: none; -webkit-appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%235f6762' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>"); background-repeat: no-repeat; background-position: right 11px center; }
select[multiple] { background-image: none; height: auto; padding: 6px; }
input[type="file"] { border-style: dashed; background-color: var(--panel-sub); padding: 4px 8px; height: auto; min-height: var(--ctl-h); line-height: 26px; }
input[type="file"]::file-selector-button { height: var(--ctl-h-sm); padding: 0 10px; margin-right: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--panel); font: inherit; font-size: var(--fs-sm); cursor: pointer; transition: border-color var(--t-fast); }
input[type="file"]::file-selector-button:hover { border-color: var(--pine); }
input.num, input[type="number"] { font-variant-numeric: tabular-nums; letter-spacing: 0; text-align: right; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.form h3.full { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.form-draft { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius); background: var(--wood-soft); color: var(--wood-2); font-size: var(--fs-sm); animation: rise var(--t) var(--ease); }
td > input, td > select { min-width: 72px; }
.opt-head { display: grid; grid-template-columns: 1.2fr 1.4fr .8fr .8fr auto; gap: 8px; font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-medium); }
.opt-row { display: grid; grid-template-columns: 1.2fr 1.4fr .8fr .8fr auto; gap: 8px; align-items: center; margin-top: 6px; animation: rise var(--t) var(--ease); }
.opt-row.cols-3, .opt-head.cols-3 { grid-template-columns: 1fr 2fr auto; }
.opt-row.cols-4, .opt-head.cols-4 { grid-template-columns: 1fr 1fr .6fr auto; }          /* 세트 구성 편집기 */
.opt-row.cols-5, .opt-head.cols-5 { grid-template-columns: 1.6fr .6fr 1fr 1fr auto; }   /* 소요량 편집기 */
.notice-row { display: grid; grid-template-columns: 36% minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.list-input { display: flex; flex-direction: column; gap: 6px; }
.list-input .row-item { display: flex; gap: 6px; align-items: center; }

/* ── 명령 줄 ── */
.toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.toolbar:has(> .spacer:first-child) { padding: 0; background: none; border: none; box-shadow: none; }
.toolbar.plain { padding: 0; background: none; border: none; box-shadow: none; align-items: center; }
.toolbar label.f { min-width: 140px; }
.toolbar label.f.inline { min-width: 0; min-height: var(--ctl-h); }
.toolbar input[type="search"], .toolbar input[type="text"] { min-width: 180px; }
.toolbar > .tabs.seg { align-self: center; }
.card .toolbar { background: var(--panel-sub); box-shadow: none; }

/* ── 표 ── */
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-x: auto; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th { height: var(--th-h); padding: 0 12px; background: var(--panel-sub); text-align: left; font-size: var(--fs-sm); font-weight: var(--fw-medium); letter-spacing: 0; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { height: var(--td-h); padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; transition: background-color var(--t-fast); }
tbody tr:first-child td { border-top: none; }
tbody tr:hover td { background: var(--hover); }
tr.clickable { cursor: pointer; }
tr.clickable:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--focus-ring); }   /* 키보드로 줄을 열 때(tabindex=0) */
tr.clickable:hover td:first-child { box-shadow: inset 2px 0 0 var(--wood); }
td.num, th.num { text-align: right; }
td.num { font-variant-numeric: tabular-nums; letter-spacing: 0; }
th.sel, td.sel, th.act, td.act { width: 1%; white-space: nowrap; }
td.act { text-align: right; }
td.act button + button { margin-left: 6px; }
td:not(.nowrap):not(.num):not(.act):not(.sel) { min-width: 120px; }
td.zero { color: var(--subtle); }
td .thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel-sub); display: block; }
.so-list .thumb { width: 56px; height: 56px; }
.thumb-empty { width: 48px; height: 48px; border-radius: var(--radius); border: 1px dashed var(--line-strong); background: var(--panel-sub); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--subtle); text-align: center; line-height: 1.2; }
.cell-main { font-weight: var(--fw-medium); }
.cell-sub { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; font-size: var(--fs-sm); color: var(--muted); font-variant-numeric: tabular-nums; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.qr-img { width: 160px; height: 160px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; image-rendering: pixelated; }   /* QR 화면의 그림(라벨 인쇄용) */

/* ── 항목·값 목록 ── */
dl.kv { display: grid; grid-template-columns: 132px minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line); }
dl.kv dt { font-size: 13px; color: var(--muted); padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
dl.kv dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; word-break: break-word; }
dl.kv.two { grid-template-columns: 132px minmax(0, 1fr) 132px minmax(0, 1fr); column-gap: 16px; }

/* ── 상태 배지: 알약 대신 각진 칩 ── */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: var(--radius); font-size: var(--fs-xs); font-weight: var(--fw-bold); line-height: 1; letter-spacing: 0; white-space: nowrap; border: 1px solid var(--neutral-line); background: var(--neutral-bg); color: var(--neutral); }
.tag.ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.tag.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.tag.err { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.tag.info { border-color: var(--info-line); background: var(--info-bg); color: var(--info); }
.tag.wood { border-color: #e1c9a9; background: var(--wood-soft); color: var(--wood-2); }
.tag.ember { border-color: #f4b9a3; background: var(--ember-soft); color: var(--ember-2); }
.tag.steel { border-color: var(--steel); background: var(--steel); color: #fff; }

/* ── 탭: 밑줄이 옆으로 자라며 바뀝니다 ── */
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; height: 40px; padding: 0 12px; border: none; border-radius: 0; background: none; color: var(--muted); font-weight: var(--fw-medium); flex: none; box-shadow: none; }
.tabs button::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 1px; background: var(--pine); transform: scaleX(0); transition: transform var(--t) var(--ease); }
.tabs button:hover { color: var(--text); background: none; }
.tabs button.on { color: var(--text); font-weight: var(--fw-bold); }
.tabs button.on::after { transform: scaleX(1); }
.tabs .tab-n { font-size: var(--fs-xs); color: var(--subtle); margin-left: 6px; font-variant-numeric: tabular-nums; font-weight: var(--fw-medium); }
.tabs .tab-n.hot { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 4px; background: var(--ember); color: #fff; }
.tabs.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel-sub); box-shadow: none; }
.tabs.seg button { height: 26px; padding: 0 11px; border-radius: var(--radius); font-size: var(--fs-sm); border: 1px solid transparent; transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.tabs.seg button::after { content: none; }
.tabs.seg button.on { background: var(--panel); border-color: var(--line-strong); font-weight: var(--fw-bold); box-shadow: 0 1px 2px rgba(28, 31, 29, .08); }

/* ── 진행 단계 ── */
.steps { display: flex; align-items: center; gap: 0; }
.steps .step { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--subtle); white-space: nowrap; }
.steps .step .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--panel); flex: none; transition: background-color var(--t), border-color var(--t); }
.steps .step.done .dot { background: var(--pine); border-color: var(--pine); }
.steps .step.done { color: var(--muted); }
.steps .step.now .dot { border-color: var(--ember); background: var(--ember); transform: rotate(45deg); border-radius: 2px; width: 11px; height: 11px; box-shadow: 0 0 0 4px rgba(228, 85, 42, .16); }
.steps .step.now { color: var(--text); font-weight: var(--fw-bold); }
.steps .bar { flex: 1; height: 2px; background: var(--line); min-width: 24px; margin: 0 8px; border-radius: 1px; }
.steps .bar.done { background: var(--pine); transform-origin: left center; animation: grow-x .5s var(--ease) both; }

/* ── 창·토스트 ── */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(28, 31, 29, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background-color var(--t-slow) var(--ease), backdrop-filter var(--t-slow) var(--ease); }
.modal-back.open { background: rgba(28, 31, 29, .42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal { position: absolute; background: var(--panel); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: 100%; }
.modal.drawer { top: 0; right: 0; bottom: 0; width: min(560px, 100%); border-radius: var(--radius-xl) 0 0 var(--radius-xl); transform: translateX(100%); transition: transform var(--t-slow) var(--ease); }
.modal.drawer.wide { width: min(760px, 100%); }
.modal-back.open .modal.drawer { transform: translateX(0); }
.modal.center { top: 50%; left: 50%; width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); transform: translate(-50%, -47%) scale(.97); opacity: 0; transition: transform var(--t) var(--ease), opacity var(--t) var(--ease); }
.modal.center.wide { width: min(760px, calc(100% - 32px)); }
.modal-back.open .modal.center { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: var(--fs-lg); letter-spacing: -0.02em; }
.modal-saved { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ok); font-weight: var(--fw-bold); margin-left: auto; animation: pop-in var(--t) var(--ease); }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--panel-sub); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.modal.drawer .modal-foot { border-radius: 0 0 0 var(--radius-xl); }
.modal-foot .spacer { flex: 1; }
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; transition: bottom var(--t) var(--ease); }
.toast { display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 11px 14px; border-radius: var(--radius-lg); background: var(--toast-bg); color: var(--steel-text); box-shadow: var(--shadow-lg); font-size: 13px; white-space: pre-wrap; animation: toast-in var(--t-slow) var(--ease); }
.toast.out { animation: toast-out var(--t) var(--ease) forwards; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 1px; background: var(--pine); transform: rotate(45deg); flex: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .08); }
.toast.err::before { background: var(--ember); }

/* ── 빠른 이동(⌘K): 메뉴 이름으로 찾아 바로 열기 ── */
.cmdk-back { position: fixed; inset: 0; z-index: 70; background: rgba(28, 31, 29, .34); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade var(--t) var(--ease); }
.cmdk { position: fixed; top: 13vh; left: 50%; width: min(600px, calc(100% - 24px)); transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); overflow: hidden; animation: cmdk-in var(--t) var(--ease); }
@keyframes cmdk-in { from { opacity: 0; transform: translate(-50%, -6px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0); } }
.cmdk-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.cmdk-search .ico { color: var(--subtle); }
.cmdk-search input { height: 54px; border: none; padding: 0; font-size: 16px; background: none; box-shadow: none; }
.cmdk-search input:focus { box-shadow: none; }
.cmdk-list { max-height: min(56vh, 460px); overflow-y: auto; padding: 6px; scroll-padding: 6px; }
.cmdk-group { padding: 8px 10px 4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--subtle); }
.cmdk-item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: var(--radius); cursor: pointer; color: var(--text); }
.cmdk-item .ico { color: var(--muted); }
.cmdk-item .sub { margin-left: auto; font-size: var(--fs-sm); color: var(--subtle); white-space: nowrap; }
.cmdk-item.on { background: var(--hover); box-shadow: inset 2px 0 0 var(--ember); }
.cmdk-item.on .ico { color: var(--ember); }
.cmdk-empty { padding: 28px 12px; text-align: center; color: var(--subtle); }
.cmdk-foot { display: flex; align-items: center; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--panel-sub); font-size: var(--fs-xs); color: var(--muted); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* ── 로그인·처음 설정 ── */
/* 왼쪽 면은 로고·저작 표시·텐트 장식만 둡니다(소개 문구 없음). */
.auth { display: flex; min-height: 100vh; }
.auth-brand { width: 44%; max-width: 560px; flex: none; background: radial-gradient(120% 90% at 0% 0%, #2d3632 0%, var(--steel) 55%); color: var(--steel-text); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-brand .auth-logo { display: flex; align-items: center; gap: 14px; animation: fade .5s var(--ease) both; }
.auth-brand .logo-mark { width: 44px; height: 44px; }
.auth-brand .logo-word { height: 14px; }
.auth-pitch { position: relative; z-index: 1; }   /* 텐트 장식 선보다 위에 */
.auth-pitch h2 { font-size: 34px; line-height: 44px; font-weight: var(--fw-black); letter-spacing: -0.035em; color: #fff; margin: 0; animation: rise .6s var(--ease) .08s both; }
.auth-pitch h2 .gem { width: 11px; height: 11px; margin-left: 10px; vertical-align: middle; }
.auth-pitch p { margin: 14px 0 0; max-width: 340px; font-size: 15px; line-height: 24px; color: var(--steel-muted); animation: rise .6s var(--ease) .16s both; }
.auth-copy { font-size: var(--fs-xs); color: var(--steel-muted); padding-top: 18px; border-top: 1px solid rgba(169, 116, 63, .7); position: relative; z-index: 1; }
.auth-deco { position: absolute; right: -80px; bottom: -40px; width: 380px; height: 380px; opacity: .12; pointer-events: none; animation: drift 9s ease-in-out infinite alternate; }
/* ⚠️ 상자를 세로 가운데에 두면 소속을 고를 때 상자 높이가 바뀌면서 제목까지 위아래로 움직입니다.
   위쪽을 고정하고(고르기 전·후 두 높이의 가운데쯤) 아래로만 늘고 줄게 둡니다. */
.auth-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: max(40px, calc(50vh - 180px)) 20px 40px; }
.auth-mobile-logo { display: none; }
.center-box { width: 100%; max-width: 384px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 28px; animation: rise .45s var(--ease) .05s both; }
.center-box h1 { font-size: 22px; line-height: 30px; font-weight: var(--fw-black); letter-spacing: -0.03em; margin: 0; }
.center-box .form { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
.center-box input { height: 44px; }
.center-box button.primary { height: 44px; width: 100%; margin-top: 18px; }

/* 소속 고르기 → 이메일·비밀번호. 접고 펼치는 높이 움직임은 core.js slideBlock() 이 맡고, 여기는 겉모습과 짧은 전환만 둡니다. */
.login-msg { margin-top: 14px; }
.login-orgs { margin-top: 20px; }
.login-orgs.intro .login-opt { animation: rise var(--t-slow) var(--ease) both; }
.login-orgs.intro .login-opt:nth-child(2) { animation-delay: 50ms; }
.login-orgs.intro .login-opt:nth-child(3) { animation-delay: 100ms; }
.login-opt { transition: margin-top var(--t-slow) var(--ease); }
.login-opt + .login-opt { margin-top: 8px; }
.login-orgs.picked .login-opt.on { margin-top: 0; }   /* 고른 줄이 맨 위로 붙도록(위 줄이 접히는 것과 같은 0.32초) */
.login-card { position: relative; }
.login-org { width: 100%; height: auto; min-height: 62px; padding: 10px 14px 10px 12px; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; text-align: left; white-space: normal; border-color: var(--line); transition: border-color var(--t), box-shadow var(--t), color var(--t-fast); }
.login-org .org-ico { width: 36px; height: 36px; border-radius: var(--radius-lg); background: var(--panel-sub); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex: none; transition: background-color var(--t), color var(--t), border-color var(--t); }
.login-org .org-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.login-org .t { font-size: 15px; font-weight: var(--fw-bold); color: var(--text); }
.login-org .d { font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-regular); }
.login-org .go { color: var(--subtle); transition: transform var(--t) var(--ease), color var(--t), opacity var(--t); }
.login-orgs:not(.picked) .login-org:hover { border-color: var(--pine); color: var(--text); box-shadow: var(--shadow-md); }
.login-orgs:not(.picked) .login-org:hover .org-ico, .login-opt.on .login-org .org-ico { background: var(--pine-soft); color: var(--pine); border-color: var(--ok-line); }
.login-orgs:not(.picked) .login-org:hover .go { color: var(--pine); transform: translateX(3px); }
/* 고른 줄: 소나무 테두리·아이콘 그대로, 화살표 자리에 '선택 해제' 글자 단추 */
.login-opt.on .login-org { border-color: var(--pine); color: var(--text); box-shadow: var(--shadow-md); cursor: default; }
.login-opt.on .login-org:active { transform: none; }
.login-opt.on .login-org .go { opacity: 0; transform: translateX(-6px); }
.login-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); height: 30px; padding: 0 10px; border: none; border-radius: var(--radius); background: none; box-shadow: none; color: var(--muted); font-size: 13px; font-weight: var(--fw-medium); opacity: 0; visibility: hidden; transition: opacity var(--t-fast) var(--ease), visibility 0s linear var(--t-fast), color var(--t-fast), background-color var(--t-fast); }
.login-opt.on .login-clear { opacity: 1; visibility: visible; transition: opacity var(--t) var(--ease) 120ms, visibility 0s, color var(--t-fast), background-color var(--t-fast); }
.login-clear:hover { color: var(--text); background: var(--hover); }
.login-clear:active:not(:disabled) { transform: translateY(calc(-50% + 1px)); }   /* 눌림(1px)은 두되 가운데 자리는 지킴 */
.login-form-wrap { margin-top: 16px; }
.login-form .form { margin-top: 0; }
.login-form-wrap.enter .form > label, .login-form-wrap.enter button.primary { animation: rise var(--t-slow) var(--ease) both; }
.login-form-wrap.enter .form > label:nth-child(1) { animation-delay: 60ms; }
.login-form-wrap.enter .form > label:nth-child(2) { animation-delay: 110ms; }
.login-form-wrap.enter button.primary { animation-delay: 160ms; }

/* ── 브랜드 찾기 칸 ── */
.brand-picker { position: relative; display: flex; align-items: center; }
.brand-picker-input { padding-right: 30px; }
.brand-picker-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; padding: 0; border: none; background: none; box-shadow: none; color: var(--subtle); font-size: 16px; }
.brand-picker-clear:active:not(:disabled) { transform: translateY(-50%); }
.brand-picker-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 25; list-style: none; margin: 0; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); max-height: 240px; overflow-y: auto; animation: pop-in var(--t-fast) var(--ease); }
.brand-picker-item { padding: 7px 10px; border-radius: var(--radius-xs); cursor: pointer; }
.brand-picker-item:hover, .brand-picker-item.on { background: var(--hover); }
.brand-picker-empty { padding: 8px 10px; color: var(--subtle); font-size: var(--fs-sm); }

/* ── 권한 편집 ── */
.perm-group { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 10px 14px; margin: 0 0 10px; }
.perm-group legend { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--muted); padding: 0 6px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.perm-row .n { font-weight: var(--fw-medium); min-width: 120px; }
.perm-row .d { font-size: var(--fs-sm); color: var(--muted); }
.perm-row.locked .n { color: var(--muted); }
.account-quota { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* ── AI·점검 결과 ── */
.ai-result { display: flex; flex-direction: column; gap: 10px; }
pre.json { margin: 0; padding: 12px; background: var(--panel-sub); border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--mono); font-size: 12px; overflow-x: auto; white-space: pre-wrap; }
.stars { color: var(--wood); letter-spacing: 1px; }
.stars .off { color: var(--line-strong); }
.bar-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 8px; align-items: center; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: var(--panel-sub); border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--wood); border-radius: 2px; transform-origin: left center; animation: grow-x .6s var(--ease) both; }
.bar > i.pine { background: var(--pine); }
.bar > i.ember { background: var(--ember); }

/* ── 파트너센터 상품 등록 ── */
.reg { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 20px; align-items: start; }
.reg-side { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: var(--gap); }
.reg-sec { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.reg-sec > h2 { align-items: baseline; }
.reg-sec .sec-no { font-family: var(--mono); font-size: var(--fs-xs); color: var(--wood); letter-spacing: .1em; margin-right: 8px; }
.reg-sec .sec-help { font-size: var(--fs-sm); color: var(--muted); margin: -8px 0 12px; }
.reg-sec.flash { animation: flash .9s ease; }
.reg-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.reg-steps li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius); cursor: pointer; font-size: 13px; transition: background-color var(--t-fast); }
.reg-steps li:hover { background: var(--hover); }
.reg-steps .st { width: 18px; height: 18px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: var(--fw-bold); border: 1px solid var(--line-strong); color: var(--muted); flex: none; font-variant-numeric: tabular-nums; transition: background-color var(--t), border-color var(--t), color var(--t); }
.reg-steps .st.done { background: var(--pine); border-color: var(--pine); color: #fff; }
.reg-steps .st.fix { background: var(--ember); border-color: var(--ember); color: #fff; }
.reg-preview { display: flex; flex-direction: column; gap: 8px; }
.reg-preview .pv-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel-sub); }
.reg-preview .pv-brand { font-size: var(--fs-sm); color: var(--muted); }
.reg-preview .pv-name { font-weight: var(--fw-medium); }
.reg-preview .pv-price { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.reg-preview .pv-price .sale { font-weight: var(--fw-black); font-size: 18px; }
.reg-preview .pv-price .rate { color: var(--ember); font-weight: var(--fw-bold); }
.reg-preview .pv-price .list { color: var(--subtle); text-decoration: line-through; font-size: var(--fs-sm); }
.img-rule { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 8px; }
.img-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.img-cell { position: relative; width: 120px; display: flex; flex-direction: column; gap: 4px; animation: rise var(--t) var(--ease); }
.img-cell.main { width: 180px; }
.img-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel-sub); transition: transform var(--t) var(--ease), box-shadow var(--t); }
.img-cell img:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.img-cell.bad img { border-color: var(--err); }
.img-cell .badge { position: absolute; top: 6px; left: 6px; }
.img-cell .why { font-size: var(--fs-xs); color: var(--err); }
.img-cell .tools { display: flex; gap: 4px; }
.reg-bar, .ship-bar { position: fixed; left: var(--side-w); right: 0; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 12px; padding: 12px var(--page-x); background: rgba(253, 252, 249, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(28, 31, 29, .07); animation: bar-up var(--t-slow) var(--ease); }
@keyframes bar-up { from { transform: translateY(100%); } to { transform: none; } }
.reg-bar .status, .ship-bar .status { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.reg-bar .status .gem.warn { background: var(--warn); }
.has-bar .content { padding-bottom: 96px; }
#toast-root.lifted { bottom: 76px; }

/* ── 파트너센터 주문·출고, 클레임 ── */
.due { display: flex; flex-direction: column; line-height: 1.3; }
.due .d { font-weight: var(--fw-bold); font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.due .r { font-size: var(--fs-xs); color: var(--muted); }
.due.today .r { color: var(--warn); font-weight: var(--fw-bold); }
.due.late .d, .due.late .r { color: var(--ember); font-weight: var(--fw-bold); }
.due.none .r { color: var(--subtle); }
.so-prod { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.so-prod .cell-sub .tag { margin-left: 6px; }
.so-ship { display: flex; gap: 6px; align-items: center; min-width: 260px; }
.so-ship select { width: 130px; flex: none; }
.so-ship input { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.so-ship input.bad { border-color: var(--err); }
.so-ship .none { white-space: nowrap; }
.cl-type { display: flex; flex-direction: column; gap: 2px; }
.cl-type .t { font-weight: var(--fw-bold); display: flex; align-items: center; gap: 6px; }
.cl-type .after { color: var(--ember); font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.cl-reason { max-width: 320px; }
.cl-reason .r { font-weight: var(--fw-medium); }
.cl-reason .rx { font-size: var(--fs-sm); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cl-reason .fee { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.cl-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── 현장 판매 입력(큰 칸) ── */
.field-form input, .field-form select { height: 48px; font-size: 16px; }
.field-form button.primary, .field-form button.ember { height: 52px; font-size: 16px; }
.field-pick { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.field-pick button { justify-content: flex-start; height: 48px; font-weight: var(--fw-regular); }
.field-pick button.on { border-color: var(--pine); background: var(--pine-soft); color: var(--text); }

/* ── 화면 너비 ── */
@media (max-width: 1279px) {
  :root { --page-x: 20px; --fs-title: 22px; }
  .who-btn .user { display: none; }
  .cmd-btn { min-width: 0; }
  .cmd-btn .label { display: none; }
  .grid.c4, .grid.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .so-ship { flex-direction: column; align-items: stretch; min-width: 180px; }
  .so-ship select { width: 100%; }
  .so-prod .thumb { width: 40px; height: 40px; }
}
@media (max-width: 1199px) {
  .reg { grid-template-columns: minmax(0, 1fr); }
  .reg-side { position: static; }
  .reg-preview { display: none; }
  .reg-steps { flex-direction: row; flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 1099px) {
  .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dl.kv.two { grid-template-columns: 132px minmax(0, 1fr); }
  dl.kv.two .kv-pad { display: none; }
}
@media (max-width: 900px) {
  :root { --page-x: 14px; --card-pad: 16px; --fs-title: 20px; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; width: min(288px, 86vw); transform: translateX(-100%); transition: transform var(--t-slow) var(--ease), visibility var(--t-slow); visibility: hidden; z-index: 40; box-shadow: var(--shadow-lg); }
  .layout.side-open .side { transform: none; visibility: visible; }
  .side-scrim { display: block; position: fixed; inset: 0; background: rgba(28, 31, 29, .45); z-index: 39; opacity: 0; pointer-events: none; transition: opacity var(--t-slow) var(--ease); }
  .layout.side-open .side-scrim { opacity: 1; pointer-events: auto; }
  .layout.side-open { overflow: hidden; height: 100vh; }
  .side-toggle { display: inline-flex; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); align-items: center; justify-content: center; flex: none; }
  .side-toggle-bars, .side-toggle-bars::before, .side-toggle-bars::after { display: block; width: 16px; height: 2px; background: var(--text); border-radius: 1px; position: relative; content: ""; transition: transform var(--t) var(--ease), background-color var(--t-fast); }
  .side-toggle-bars::before { position: absolute; top: -5px; }
  .side-toggle-bars::after { position: absolute; top: 5px; }
  .side-toggle[aria-expanded="true"] .side-toggle-bars { background: transparent; }
  .side-toggle[aria-expanded="true"] .side-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
  .side-toggle[aria-expanded="true"] .side-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }
  .cmd-btn { width: 36px; height: 36px; padding: 0; justify-content: center; }
  .cmd-btn .kbd { display: none; }
  .topbar-crumb .sep, .topbar-crumb .grp { display: none; }
  .grid.c2, .grid.c3 { grid-template-columns: minmax(0, 1fr); }
  .grid.c4, .grid.c5, .dash-todo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipe > button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  dl.kv { grid-template-columns: 104px minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; }
  .auth-mobile-logo .logo-word { color: var(--text); }
  .auth-main { flex-direction: column; align-items: center; justify-content: flex-start; padding: max(28px, calc(50vh - 240px)) 16px 32px; }
  .reg-bar, .ship-bar { left: 0; }
  .modal.drawer { width: 100%; border-radius: 0; }
  .modal.drawer .modal-foot { border-radius: 0; }
  .opt-head { display: none; }
  .opt-row, .opt-row.cols-3, .opt-row.cols-4, .opt-row.cols-5 { grid-template-columns: 1fr 1fr; }   /* 열 구성 클래스보다 미디어 쿼리가 이기게 */
  .cmdk { top: 8vh; }
  table.cards thead { display: none; }
  table.cards tr { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 12px; border-top: 1px solid var(--line); }
  table.cards td { display: block; height: auto; padding: 0; border: none; min-width: 0 !important; }
  table.cards td.full { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

