:root { --ink:oklch(24% .025 255); --muted:oklch(48% .02 255); --line:oklch(84% .018 255); --paper:oklch(98% .008 255); --surface:oklch(100% .003 255); --navy:oklch(29% .08 258); --ok:oklch(47% .13 145); --warn:oklch(59% .14 73); --bad:oklch(48% .18 28); --focus:oklch(54% .16 250); }
@media (prefers-color-scheme: dark) { :root { --ink:oklch(92% .015 255); --muted:oklch(73% .018 255); --line:oklch(36% .02 255); --paper:oklch(18% .02 255); --surface:oklch(22% .02 255); --navy:oklch(78% .09 253); } }
* { box-sizing:border-box; }
body { margin:0; font:15px/1.55 "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color:var(--ink); background:var(--paper); }
header { min-height:64px; padding:0 28px; display:flex; flex-wrap:wrap; gap:12px; align-items:center; background:var(--surface); border-bottom:1px solid var(--line); }
header h1 { font-size:17px; letter-spacing:-.02em; margin:0 auto 0 0; color:var(--navy); }
header input { width:280px; max-width:100%; }
.access-gate { max-width:520px; margin:72px auto; padding:28px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.access-gate h2 { font-size:20px; }
main[aria-busy="true"] { opacity:.65; }
.workspace-shell { display:grid; grid-template-columns:208px minmax(0, 1fr); min-height:calc(100vh - 65px); }
.workspace-nav { padding:24px 16px; border-right:1px solid var(--line); background:var(--surface); display:grid; align-content:start; gap:4px; }
.workspace-nav button { width:100%; border:0; border-radius:7px; padding:10px 12px; text-align:left; color:var(--muted); background:transparent; font-weight:650; }
.workspace-nav button:hover { color:var(--ink); background:color-mix(in oklch, var(--paper) 85%, var(--navy)); }
.workspace-nav button[aria-current="page"] { color:var(--surface); background:var(--navy); }
.workspace-content { min-width:0; max-width:1280px; padding:48px clamp(24px, 5vw, 72px) 88px; }
.workspace-view { max-width:1180px; }
.workspace-view > h2 { font-size:28px; line-height:1.2; letter-spacing:-.04em; margin:0 0 8px; }
.workspace-view > h3 { margin-top:42px; }
.section-kicker { margin:0 0 8px; color:var(--navy); font-weight:720; font-size:13px; letter-spacing:.04em; }
.lead { max-width:70ch; margin:0; color:var(--muted); font-size:16px; }
.request-guide { max-width:760px; margin:36px 0 44px; padding:20px 22px; background:color-mix(in oklch, var(--surface) 86%, var(--navy)); border:1px solid var(--line); border-radius:10px; }
.request-guide h3 { margin:0 0 8px; font-size:16px; }
.request-guide ul { margin:8px 0 14px; padding-left:20px; }
.request-guide li + li { margin-top:6px; }
.request-guide p { margin:0; color:var(--muted); }
.status-ledger { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:0; max-width:900px; margin:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.status-ledger div { padding:18px 12px 16px 0; border-bottom:1px solid var(--line); }
.status-ledger div:nth-last-child(-n+3) { border-bottom:0; }
.status-ledger dt { color:var(--muted); font-size:13px; }
.status-ledger dd { margin:4px 0 0; font-size:24px; font-weight:720; letter-spacing:-.04em; }
h2 { font-size:18px; margin:0 0 12px; }
.row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
input, button { padding:7px 10px; font:inherit; border:1px solid var(--line); border-radius:6px; background:transparent; color:inherit; }
button { cursor:pointer; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline:3px solid color-mix(in oklch, var(--focus) 45%, transparent); outline-offset:2px; }
table { width:100%; min-width:720px; border-collapse:collapse; margin-top:10px; }
th, td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; word-break:break-all; }
td.actions { white-space:nowrap; }
.status-DRAFT { color:var(--muted); } .status-READ_VERIFIED, .status-VERIFIED { color:var(--ok); }
.status-SUSPENDED, .status-TERMINATED, .status-FAILED, .status-EXPIRED { color:var(--bad); }
.status-LIMITED_OPERATION, .status-AUTOMATION_ALLOWED { color:var(--warn); }
.empty { color:var(--muted); }
pre { white-space:pre-wrap; border:1px solid var(--line); padding:8px; border-radius:4px; }
#status { color:var(--bad); }
.hint { color:var(--muted); margin:0 0 8px; }
h3 { font-size:15px; margin:24px 0 8px; }
.detail { margin-top:16px; border:1px solid var(--line); border-radius:8px; padding:12px; }
.detail table { width:auto; min-width:320px; margin-bottom:8px; }
.detail .cols { display:flex; flex-wrap:wrap; gap:24px; }
.tag { display:inline-block; padding:1px 6px; border:1px solid var(--line); border-radius:10px; font-size:12px; margin-right:4px; }
.outcome-LISTABLE { color:var(--ok); font-weight:600; } .outcome-MANUAL_REVIEW { color:var(--warn); font-weight:600; } .outcome-BLOCKED { color:var(--bad); font-weight:600; }
.manual-entry { margin-top:28px; padding-top:16px; border-top:1px solid var(--line); color:var(--muted); }
.manual-entry summary { cursor:pointer; width:max-content; font-weight:650; }
.manual-entry form { margin-top:16px; color:var(--ink); }
@media (max-width:760px) {
  header { padding:12px 16px; align-items:flex-start; }
  header h1 { width:100%; }
  .workspace-shell { display:block; }
  .workspace-nav { position:sticky; top:0; z-index:1; grid-template-columns:repeat(5, max-content); overflow-x:auto; padding:8px 12px; border-right:0; border-bottom:1px solid var(--line); }
  .workspace-nav button { white-space:nowrap; }
  .workspace-content { padding:32px 16px 64px; overflow:hidden; }
  .workspace-view > h2 { font-size:25px; }
  .status-ledger { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .status-ledger div:nth-last-child(-n+3) { border-bottom:1px solid var(--line); }
  .status-ledger div:nth-last-child(-n+2) { border-bottom:0; }
  .workspace-view { overflow-x:auto; }
}

.capture-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 16px; align-items: end; margin-top: 8px; }
.capture-form > p, .capture-form > a, .capture-form > button { grid-column: 1 / -1; margin: 0; }
.capture-form > button { justify-self: start; }
.capture-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.capture-form label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; }
.capture-form input:not([type="checkbox"]), .capture-form textarea { width: 100%; box-sizing: border-box; }
.capture-form label:has(textarea) { grid-column: 1 / -1; }

/* Cards: one job each — title, one-line status, actions, result box. */
.card-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:16px; margin-top:28px; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:18px 20px; min-width:0; }
.card.wide { margin:28px 0 32px; }
.card h3 { margin:0 0 6px; font-size:16px; }
.card .meta { margin:0 0 12px; color:var(--muted); font-size:14px; }
.button-row { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px; }
.button-row button, .actions button, td button { background:var(--surface); }
.button-row button:hover, td button:hover { border-color:var(--navy); }
.result { white-space:pre-line; margin-top:8px; padding:10px 12px; border-radius:8px; font-size:14px;
  background:color-mix(in oklch, var(--paper) 70%, var(--line)); }
.fact-list { margin:8px 0 0; padding-left:18px; color:var(--muted); font-size:14px; }
.fact-list li + li { margin-top:4px; }
#pricing-policies > div:not(.button-row) { color:var(--muted); font-size:14px; margin-top:6px; }
td.empty { color:var(--muted); padding:14px 8px; }
#orders-panel > p { margin:0 0 10px; color:var(--muted); }
#orders-panel h4 { margin:22px 0 4px; font-size:15px; }
#automation-detail { margin-top:24px; }

/* Catalog browsing: group chips, filter bar, card grid, pager. */
.chip-row { display:flex; flex-wrap:wrap; gap:6px; margin:24px 0 12px; }
.chip-row + .chip-row { margin-top:0; }
.chip { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:999px; background:var(--surface); font-size:14px; }
.chip:hover { border-color:var(--navy); }
.chip.is-active { background:var(--navy); border-color:var(--navy); color:var(--surface); }
.chip-count { font-size:12px; opacity:.75; font-variant-numeric:tabular-nums; }
.filter-bar { display:flex; flex-wrap:wrap; gap:10px 12px; align-items:end; padding:14px 16px; background:var(--surface); border:1px solid var(--line); border-radius:12px; }
.filter-bar label { display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); min-width:120px; }
.filter-bar label.grow { flex:1 1 220px; }
.filter-bar label.narrow { min-width:0; width:110px; }
.filter-bar input, .filter-bar select { font:inherit; font-size:14px; color:var(--ink); padding:7px 9px; border:1px solid var(--line); border-radius:6px; background:var(--paper); width:100%; }
#catalog-summary { margin:14px 0 8px; }
.offer-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:14px; }
.offer-grid[aria-busy="true"] { opacity:.55; }
.offer-card { display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line); border-radius:12px; overflow:hidden; min-width:0; }
.offer-media { aspect-ratio:1 / 1; background:color-mix(in oklch, var(--paper) 80%, var(--line)); display:flex; align-items:center; justify-content:center; }
.offer-media img { width:100%; height:100%; object-fit:cover; display:block; }
.offer-media:empty { aspect-ratio:5 / 1; }
.offer-media:empty::after { content:"이미지 없음"; color:var(--muted); font-size:12px; }
.offer-body { padding:12px 14px 14px; display:flex; flex-direction:column; gap:6px; min-width:0; }
.offer-tags { display:flex; flex-wrap:wrap; gap:4px; }
.offer-tags .tag { margin:0; }
.tag-group { border-color:color-mix(in oklch, var(--navy) 45%, var(--line)); color:var(--navy); }
.offer-title { margin:0; font-size:14px; font-weight:650; line-height:1.4; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; word-break:keep-all; overflow-wrap:anywhere; }
.offer-price { margin:0; font-size:14px; font-variant-numeric:tabular-nums; }
.offer-status, .offer-review, .offer-sku { margin:0; font-size:13px; color:var(--muted); }
.stage { font-weight:650; color:var(--ink); }
.stage-eligible { color:var(--ok); } .stage-collected { color:var(--bad); }
.offer-more { margin-top:4px; font-size:13px; }
.offer-more summary { cursor:pointer; color:var(--navy); font-weight:650; }
.offer-actions { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.offer-actions > button { text-align:left; }
.offer-terms { margin:0; color:var(--muted); font-size:12px; }
.pager { display:flex; align-items:center; justify-content:center; gap:14px; margin:18px 0 0; }
.pager button:disabled { opacity:.4; cursor:default; }
.pager-info { color:var(--muted); font-size:14px; font-variant-numeric:tabular-nums; }
.tools-row { margin-top:14px; }
.review-board { display:grid; gap:10px; margin-top:6px; }
.review-row { display:grid; grid-template-columns:72px minmax(0, 1fr) auto; gap:14px; align-items:center; padding:10px 14px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.review-thumb { width:72px; height:72px; border-radius:8px; overflow:hidden; background:color-mix(in oklch, var(--paper) 80%, var(--line)); }
.review-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.review-main { min-width:0; display:flex; flex-direction:column; gap:4px; }
@media (max-width:760px) {
  .offer-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
  .filter-bar label, .filter-bar label.narrow { flex:1 1 calc(50% - 12px); width:auto; min-width:0; }
  .review-row { grid-template-columns:56px minmax(0, 1fr); }
  .review-row > button { grid-column:1 / -1; }
  .review-thumb { width:56px; height:56px; }
}
