@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap');

:root {
  --paper: #f7f6f2;
  --surface: #fff;
  --ink: #20231f;
  --muted: #85877f;
  --line: #e7e6df;
  --green: #2f5a49;
  --green-soft: #e8efe9;
  --orange: #d9754c;
  --orange-soft: #f7eae3;
  --yellow: #ae873e;
  --yellow-soft: #f4efdf;
  --sidebar: #f0efe9;
  --font: "Noto Sans Thai", "Manrope", "Leelawadee UI", sans-serif;
  --mono: "DM Mono", monospace;
  --serif: "Iowan Old Style", "Baskerville", Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 360px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.app-shell { min-height: 100vh; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: 248px; padding: 29px 17px 20px; background: var(--sidebar); border-right: 1px solid #e5e4dc; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 39px; margin: 0 12px 57px; color: var(--ink); text-decoration: none; }
.brand-mark { position: relative; display: flex; align-items: end; justify-content: center; gap: 2px; width: 29px; height: 29px; padding: 5px; border: 1px solid var(--green); border-radius: 50%; transform: rotate(-12deg); }
.brand-mark i { display: block; width: 4px; border-radius: 4px 4px 2px 2px; background: var(--green); }
.brand-mark i:nth-child(1) { height: 9px; }.brand-mark i:nth-child(2) { height: 15px; }.brand-mark i:nth-child(3) { height: 11px; }
.brand b { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; line-height: 1.2; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .16em; }
.workspace-label { margin: 0 13px 11px; color: #9b9b92; font-family: var(--mono); font-size: 9px; letter-spacing: .13em; }
.side-link { display: flex; align-items: center; gap: 11px; width: 100%; height: 42px; margin: 2px 0; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: #65675f; text-align: left; cursor: pointer; transition: background .2s, color .2s; }
.side-link:hover { background: rgba(255,255,255,.65); color: var(--ink); }
.side-link.active { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(32,35,31,.035); font-weight: 600; }
.side-icon { display: grid; place-items: center; width: 21px; color: inherit; font-size: 16px; line-height: 1; }
.side-count { margin-left: auto; min-width: 23px; color: #96978f; font-family: var(--mono); font-size: 10px; text-align: right; }
.side-link.active .side-count { color: var(--green); }
.sidebar-spacer { flex: 1; }
.progress-panel { margin: 0 8px 18px; padding: 17px 14px 14px; border: 1px solid #e1e0d8; border-radius: 6px; background: rgba(255,255,255,.48); }
.progress-heading { display: flex; justify-content: space-between; color: #55574f; font-size: 11px; font-weight: 600; }
.progress-heading span:last-child { color: var(--green); font-family: var(--mono); font-size: 10px; }
.progress-track { overflow: hidden; height: 4px; margin: 13px 0 9px; border-radius: 6px; background: #dfded6; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .35s ease; }
.progress-panel p { margin: 0; color: #999990; font-size: 10px; }
.progress-panel p b { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; margin: 0 10px; color: #8a8b83; font-size: 10px; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #b8b8ae; }
.status-dot.connected { background: #5f9678; box-shadow: 0 0 0 3px rgba(95,150,120,.13); }

.main-content { max-width: 1800px; min-height: 100vh; margin-left: 248px; padding: 0 44px; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 75px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #898a82; font-size: 11px; }
.breadcrumb span:first-child { font-family: var(--mono); font-size: 9px; letter-spacing: .13em; }
.breadcrumb b { color: #c4c3bb; font-weight: 400; }
.breadcrumb span:last-child { color: #565850; }
.top-actions { display: flex; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 600; transition: transform .18s, background .18s, border-color .18s; }
.button:hover { transform: translateY(-1px); }
.button-quiet { border-color: #e1e0d9; background: rgba(255,255,255,.55); color: #575951; }
.button-quiet:hover { border-color: #c8c9bf; background: #fff; }
.button-dark { background: var(--green); color: #fff; }
.button-dark:hover { background: #244a3a; }
.button-symbol { font-size: 14px; font-weight: 400; }

.intro { display: flex; align-items: end; justify-content: space-between; min-height: 220px; padding: 37px 0 31px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; color: #96978f; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.eyebrow-line { display: inline-block; width: 20px; height: 1px; background: var(--orange); }
h1 { margin: 0; font-size: clamp(34px, 3.35vw, 48px); font-weight: 500; letter-spacing: -.055em; line-height: 1.15; }
h1 em { color: var(--green); font-family: var(--serif); font-weight: 400; letter-spacing: -.055em; }
.intro-note { margin: 14px 0 0; color: #7b7d75; font-size: 12px; }
.intro-side { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 13px; min-width: 206px; padding: 0 0 5px 24px; border-left: 1px solid #deddd5; }
.stat-number { color: var(--green); font-family: var(--serif); font-size: 47px; line-height: 1; letter-spacing: -.08em; }
.stat-caption { color: #4d5049; font-size: 12px; line-height: 1.55; }
.stat-caption span { color: #999990; font-size: 10px; }
.stat-caption b { color: #65675f; font-family: var(--mono); font-weight: 400; }
.stat-rule { grid-column: 1 / -1; height: 1px; margin: 15px 0 12px; background: #e3e2da; }
.image-status { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; color: #8d8f86; font-size: 10px; }

.factory-chooser { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; padding: 16px 17px; border: 1px solid #e4e3dc; border-radius: 5px; background: #f1f0ea; }
.factory-heading .eyebrow { margin: 0 0 5px; font-size: 8px; }
.factory-heading h2 { margin: 0; color: #3e413a; font-size: 13px; font-weight: 600; letter-spacing: -.02em; }
.factory-options { display: flex; gap: 7px; }
.factory-option { display: flex; align-items: center; gap: 9px; min-width: 158px; height: 48px; padding: 0 10px; border: 1px solid #e2e1da; border-radius: 4px; background: rgba(255,255,255,.68); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s, box-shadow .18s; }
.factory-option:hover { transform: translateY(-1px); border-color: #bac9bd; background: #fff; }
.factory-option.active { border-color: #8ea797; background: #fff; box-shadow: 0 0 0 2px rgba(47,90,73,.08); }
.factory-symbol { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 auto; border-radius: 50%; background: #ecece6; color: #74766d; font-family: var(--mono); font-size: 9px; }
.all-symbol { width: 31px; border-radius: 4px; background: #e8eee8; color: var(--green); font-size: 8px; }
.mango-symbol { background: #f2e9db; color: #9c7842; }.mobao-symbol { background: #e7ecef; color: #647c88; }
.factory-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.factory-copy b { overflow: hidden; color: #4e5049; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.factory-option.active .factory-copy b { color: var(--green); }
.factory-copy small { color: #989990; font-size: 8px; }
.factory-copy strong { color: #73766d; font-family: var(--mono); font-size: 9px; font-weight: 500; }
.factory-arrow { margin-left: auto; color: #b1b1a8; font-size: 13px; }
.factory-option.active .factory-arrow { color: var(--green); }

.review-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; border-top: 1px solid var(--line); }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 9px; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(315px, 31vw); height: 35px; padding: 0 10px; border: 1px solid #e2e1da; border-radius: 4px; background: #fff; }
.search-icon { color: #999b92; font-size: 20px; line-height: 1; transform: rotate(-15deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-box input::placeholder { color: #a7a89f; }
kbd { padding: 2px 5px; border: 1px solid #ecebe5; border-radius: 3px; background: #f8f8f5; color: #9b9c94; font-family: var(--mono); font-size: 8px; white-space: nowrap; }
.shop-filter { position: relative; display: flex; align-items: center; height: 35px; padding: 0 10px; border: 1px solid #e2e1da; border-radius: 4px; background: #fff; }
.shop-filter select { max-width: 150px; padding-right: 18px; border: 0; outline: 0; appearance: none; background: transparent; color: #66685f; font-size: 10px; cursor: pointer; }
.product-type-filter { display: flex; align-items: center; gap: 7px; height: 35px; padding: 0 10px; border: 1px solid #e2e1da; border-radius: 4px; background: #fff; color: #777970; font-size: 10px; white-space: nowrap; }
.product-type-filter select { max-width: 145px; padding: 0 14px 0 0; border: 0; outline: 0; appearance: none; background: transparent; color: #454840; font: inherit; cursor: pointer; }
.select-caret { position: absolute; right: 9px; color: #9d9e96; pointer-events: none; }
.toolbar-right { gap: 4px; }
.result-count { display: flex; gap: 5px; align-items: baseline; margin-right: 10px; color: #9a9b92; font-size: 10px; }
.result-count b { color: #51534c; font-family: var(--mono); font-size: 12px; font-weight: 500; }
.view-button { display: grid; place-items: center; width: 31px; height: 31px; border: 0; border-radius: 4px; background: transparent; color: #9a9b93; font-size: 17px; cursor: pointer; }
.view-button:hover, .view-button.active { background: #ebeae4; color: var(--green); }

.filter-row { display: flex; align-items: center; gap: 7px; min-height: 51px; border-bottom: 1px solid var(--line); }
.filter-chip { display: flex; align-items: center; gap: 7px; height: 29px; padding: 0 10px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: #777970; font-size: 10px; cursor: pointer; transition: all .18s; }
.filter-chip span { color: #a4a59d; font-family: var(--mono); font-size: 9px; }
.filter-chip:hover { background: #eeede7; }
.filter-chip.active { border-color: #d9e3db; background: var(--green-soft); color: var(--green); font-weight: 600; }
.filter-chip.active span { color: #6f907d; }
.filter-spacer { flex: 1; }
.asset-pack { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1px solid #d9e3db; border-radius: 3px; background: #edf2ed; color: #52705e; font-size: 9px; white-space: nowrap; }
.asset-pack b { font-family: var(--mono); font-weight: 500; }
.asset-check { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #dce8dd; color: var(--green); font-size: 10px; }
.hint-bar { display: flex; align-items: center; gap: 9px; min-height: 37px; margin: 15px 0 14px; padding: 0 11px; border-left: 2px solid #c5a56b; background: #f2f0e8; color: #77786e; font-size: 10px; }
.hint-mark { display: grid; place-items: center; width: 15px; height: 15px; border: 1px solid #b9a46d; border-radius: 50%; color: #987d3e; font-family: Georgia, serif; font-size: 10px; font-style: italic; }
.hint-bar b { color: #54564e; font-weight: 600; }
.hint-bar button { margin-left: auto; border: 0; background: transparent; color: #9b9c91; font-size: 17px; cursor: pointer; }

.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; align-items: start; }
.product-card { overflow: hidden; min-width: 0; border: 1px solid #e8e7e0; border-radius: 5px; background: #fff; box-shadow: 0 2px 7px rgba(35,37,32,.025); animation: card-in .28s both; transition: transform .22s, box-shadow .22s, border-color .22s; }
.product-card:hover { transform: translateY(-2px); border-color: #d7d8ce; box-shadow: 0 9px 22px rgba(35,37,32,.07); }
@keyframes card-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.card-media { position: relative; display: grid; place-items: center; overflow: hidden; aspect-ratio: 1.13 / 1; background: #f1f0ea; cursor: zoom-in; }
.card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s; }
.product-card:hover .card-media img { transform: scale(1.035); }
.image-placeholder { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: linear-gradient(142deg, #f1f0eb 4%, #ebeae3 70%, #e7e5dc); }
.placeholder-grid { position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 80%); }
.placeholder-glass { position: relative; width: 60px; height: 92px; margin-top: 8px; border: 2px solid rgba(71,102,85,.3); border-top: 3px solid rgba(71,102,85,.43); border-radius: 7px 7px 19px 19px; background: linear-gradient(90deg, rgba(255,255,255,.6), rgba(99,139,116,.14) 55%, rgba(255,255,255,.45)); box-shadow: 0 14px 22px rgba(65,83,70,.07); transform: perspective(120px) rotateX(-3deg); }
.placeholder-glass::before { content: ""; position: absolute; left: 50%; top: 88px; width: 2px; height: 22px; background: rgba(71,102,85,.32); transform: translateX(-50%); }
.placeholder-glass::after { content: ""; position: absolute; left: 50%; top: 108px; width: 38px; height: 3px; border-radius: 50%; background: rgba(71,102,85,.34); transform: translateX(-50%); }
.placeholder-caption { position: absolute; bottom: 11px; left: 12px; color: #aaaba2; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.media-topline { position: absolute; top: 10px; right: 10px; left: 10px; z-index: 1; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.shop-tag { max-width: 72%; overflow: hidden; padding: 5px 7px; border: 1px solid rgba(255,255,255,.62); border-radius: 3px; background: rgba(255,255,255,.76); color: #6d7068; font-family: var(--mono); font-size: 8px; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(8px); }
.decision-badge { padding: 5px 7px; border-radius: 3px; background: rgba(255,255,255,.88); color: #92938a; font-size: 8px; line-height: 1; }
.decision-badge.shortlist { background: #e7efe8; color: var(--green); }.decision-badge.maybe { background: #f3efdf; color: #977634; }.decision-badge.skip { background: #f7e9e2; color: #b25c3c; }
.card-body { padding: 11px 12px 12px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 7px; }
.card-index { color: #aaa99f; font-family: var(--mono); font-size: 8px; letter-spacing: .04em; }
.image-count { color: #9c9d95; font-size: 9px; white-space: nowrap; }
.product-title { overflow: hidden; margin: 0; color: #33362f; font-family: var(--mono); font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.product-shop { overflow: hidden; margin: 5px 0 11px; color: #a1a198; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; }
.decision-btn { height: 27px; padding: 0 4px; border: 1px solid #e8e7e1; border-radius: 3px; background: #fff; color: #85867d; font-size: 9px; cursor: pointer; transition: .17s; white-space: nowrap; }
.decision-btn:hover { border-color: #b8c9bc; background: #f6f9f6; color: var(--green); }
.decision-btn.selected.shortlist { border-color: #c8d8cb; background: var(--green-soft); color: var(--green); font-weight: 600; }
.decision-btn.selected.maybe { border-color: #e5dbb9; background: var(--yellow-soft); color: #8c6c2e; font-weight: 600; }
.decision-btn.selected.skip { border-color: #efd3c7; background: var(--orange-soft); color: #aa5b3f; font-weight: 600; }
.compact-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.compact-grid .card-media { aspect-ratio: 1 / .78; }
.compact-grid .card-body { padding: 8px 9px 9px; }
.compact-grid .product-shop { display: none; }
.compact-grid .product-title { margin-bottom: 9px; font-size: 10px; }
.compact-grid .decision-btn { height: 24px; font-size: 8px; }
.empty-state { padding: 75px 20px; color: #8d8e85; text-align: center; }
.empty-mark { color: #b5b6ad; font-family: var(--serif); font-size: 43px; }.empty-state h2 { margin: 8px 0 4px; color: #4e5149; font-size: 19px; font-weight: 500; }.empty-state p { margin: 0 0 18px; font-size: 11px; }
.page-footer { display: flex; justify-content: space-between; margin-top: 41px; padding: 16px 0 24px; border-top: 1px solid var(--line); color: #a5a59d; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; }

.detail-dialog { position: fixed; width: min(930px, calc(100vw - 42px)); max-width: none; max-height: min(730px, calc(100vh - 44px)); padding: 0; overflow: hidden; border: 1px solid #e3e2da; border-radius: 7px; background: #fff; color: var(--ink); box-shadow: 0 24px 90px rgba(23,29,24,.24); }
.detail-dialog::backdrop { background: rgba(31,35,31,.48); backdrop-filter: blur(3px); }
.detail-dialog[open] { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr); animation: dialog-in .22s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dialog-close { position: absolute; z-index: 2; top: 13px; right: 14px; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgba(0,0,0,.08); border-radius: 50%; background: rgba(255,255,255,.86); color: #5f6159; font-size: 18px; cursor: pointer; }
.dialog-media { display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto; min-height: 500px; background: #f0efe9; }
.dialog-main-image { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 24px; }
.dialog-main-image img { display: block; max-width: 100%; max-height: 490px; object-fit: contain; }
.dialog-thumbnails { display: flex; gap: 7px; padding: 10px 14px; background: rgba(255,255,255,.66); }
.dialog-thumb { width: 57px; height: 48px; overflow: hidden; padding: 0; border: 1px solid #deddd5; border-radius: 3px; background: #f3f2ec; cursor: pointer; }
.dialog-thumb.active { border: 2px solid var(--green); }.dialog-thumb img { width: 100%; height: 100%; object-fit: contain; }
.dialog-content { overflow-y: auto; padding: 38px 33px 24px; }
.dialog-content .eyebrow { margin-bottom: 15px; }
.dialog-content h2 { margin: 0; font-family: var(--mono); font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.dialog-shop { margin: 6px 0 19px; color: #96978e; font-size: 11px; }
.detail-note { margin-bottom: 15px; padding: 10px 11px; border-left: 2px solid #c5a56b; background: #f5f2e9; color: #706c5e; font-size: 10px; line-height: 1.6; }
.detail-images-label { margin: 0 0 17px; color: #999a92; font-size: 10px; }
.decision-label { margin-bottom: 8px; color: #51534c; font-size: 11px; font-weight: 600; }
.decision-actions { display: flex; gap: 6px; margin-bottom: 19px; }
.decision-actions .decision-btn { flex: 1; height: 34px; font-size: 10px; }
.note-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #55574f; font-size: 10px; font-weight: 600; }
.note-label span { color: #aaaba2; font-family: var(--mono); font-size: 8px; font-weight: 400; letter-spacing: .08em; }
.dialog-content textarea { display: block; width: 100%; resize: vertical; min-height: 72px; padding: 10px; border: 1px solid #e5e4dd; border-radius: 4px; outline: none; background: #fbfbf9; color: #454740; font-size: 10px; line-height: 1.55; }
.dialog-content textarea:focus { border-color: #99b09f; box-shadow: 0 0 0 3px rgba(47,90,73,.08); }
.dialog-content textarea::placeholder { color: #b1b2aa; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 19px; }
.dialog-footer > span { color: #a4a49c; font-size: 9px; }.dialog-footer .button { height: 33px; }
.toast { position: fixed; z-index: 30; right: 25px; bottom: 22px; max-width: min(370px, calc(100vw - 34px)); padding: 11px 15px; border: 1px solid #dce5dd; border-radius: 4px; background: #fff; color: var(--green); box-shadow: 0 8px 26px rgba(25,40,30,.1); font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: translateY(0); }
.sync-dialog { position: fixed; width: min(470px, calc(100vw - 34px)); max-width: none; padding: 31px; border: 1px solid #e3e2da; border-radius: 7px; background: #fff; color: var(--ink); box-shadow: 0 24px 90px rgba(23,29,24,.24); }
.sync-dialog::backdrop { background: rgba(31,35,31,.48); backdrop-filter: blur(3px); }
.sync-dialog[open] { animation: dialog-in .22s ease-out; }
.sync-dialog .eyebrow { margin-bottom: 12px; }
.sync-dialog h2 { margin: 0; color: #30332e; font-size: 21px; font-weight: 500; letter-spacing: -.04em; }
.sync-description { margin: 11px 0 18px; color: #7d7f76; font-size: 11px; line-height: 1.7; }
.sync-file-status { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 10px; border: 1px solid #e7e6df; border-radius: 4px; background: #fafaf8; color: #83857c; font-size: 10px; }
.sync-file-status.connected { border-color: #d6e3d8; background: #f1f6f1; color: var(--green); }
.sync-actions { display: grid; gap: 7px; margin-top: 13px; }
.sync-actions .button { justify-content: flex-start; height: 39px; padding: 0 12px; }
.sync-footnote { margin: 14px 0 0; color: #a0a198; font-size: 9px; line-height: 1.65; }
.image-viewer { position: fixed; inset: 0; width: 100vw; height: 100vh; width: 100dvw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; background: #151916; color: #f7f7f2; }
.image-viewer::backdrop { background: #151916; }
.image-viewer[open] { display: flex; flex-direction: column; animation: none; }
.viewer-header { display: flex; align-items: center; justify-content: space-between; height: 52px; flex: 0 0 auto; padding: 0 19px; border-bottom: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.78); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.viewer-header button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
.viewer-stage { position: relative; display: grid; place-items: center; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 14px 60px; touch-action: pinch-zoom; }
.viewer-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; touch-action: pinch-zoom; user-select: none; -webkit-user-drag: none; }
.viewer-nav { position: absolute; z-index: 1; top: 50%; display: grid; place-items: center; width: 36px; height: 42px; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; background: rgba(255,255,255,.08); color: rgba(255,255,255,.88); font-family: var(--serif); font-size: 26px; cursor: pointer; transform: translateY(-50%); transition: background .18s; }
.viewer-nav:hover { background: rgba(255,255,255,.2); }.viewer-nav:disabled { opacity: .3; cursor: default; }.viewer-prev { left: 16px; }.viewer-next { right: 16px; }
.viewer-footer { display: flex; align-items: center; justify-content: center; gap: 18px; height: 51px; flex: 0 0 auto; padding: 0 14px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.55); font-size: 10px; }
.viewer-footer > span:first-child { color: #f1f0e9; font-family: var(--mono); }.viewer-footer button { padding: 6px 9px; border: 1px solid rgba(255,255,255,.19); border-radius: 3px; background: transparent; color: #fff; font-size: 9px; cursor: pointer; }
.expand-image-button { position: absolute; z-index: 1; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border: 1px solid rgba(255,255,255,.72); border-radius: 3px; background: rgba(31,35,31,.75); color: #fff; font-size: 9px; cursor: pointer; backdrop-filter: blur(6px); }
.expand-image-button span:first-child { font-size: 14px; line-height: 1; }

@media (min-width: 1600px) { .main-content { padding-right: 64px; padding-left: 64px; }.catalog-grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
@media (max-width: 1250px) { .main-content { padding: 0 28px; }.catalog-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }.compact-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }.intro { min-height: 205px; }.factory-chooser { align-items: flex-start; flex-direction: column; }.factory-options { width: 100%; }.factory-option { flex: 1; } }
@media (max-width: 980px) { .sidebar { width: 208px; padding-right: 12px; padding-left: 12px; }.main-content { margin-left: 208px; padding: 0 22px; }.catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.compact-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }.intro-side { min-width: 174px; padding-left: 16px; }.search-box { width: 245px; } }
@media (max-width: 720px) { .sidebar { position: sticky; inset: 0 0 auto; z-index: 15; flex-direction: row; align-items: center; width: 100%; height: 58px; padding: 0 14px; border-right: 0; border-bottom: 1px solid var(--line); }.brand { margin: 0; }.brand-mark { width: 25px; height: 25px; }.brand b { font-size: 10px; }.brand small { font-size: 7px; }.workspace-label, .side-link, .sidebar-spacer, .progress-panel, .sidebar-foot { display: none; }.main-content { margin: 0; padding: 0 16px; }.topbar { height: 56px; }.breadcrumb { font-size: 9px; gap: 7px; }.top-actions { gap: 5px; }.top-actions .button { width: 31px; height: 31px; padding: 0; gap: 0; font-size: 0; }.top-actions .button-symbol { font-size: 14px; }.top-actions #shared-file-label, .top-actions #import-label, .top-actions #export-label { display: none; }.intro { min-height: 0; align-items: end; padding: 28px 0 23px; }.intro .eyebrow { margin-bottom: 11px; font-size: 7px; }.intro h1 { font-size: 35px; }.intro-note { max-width: 245px; font-size: 10px; }.intro-side { min-width: 116px; grid-template-columns: 1fr; gap: 3px; padding-left: 12px; }.stat-number { font-size: 36px; }.stat-caption { font-size: 10px; }.stat-rule { margin: 9px 0 7px; }.image-status { align-items: flex-start; font-size: 8px; }.factory-chooser { gap: 11px; margin-bottom: 12px; padding: 12px; }.factory-heading .eyebrow { margin-bottom: 3px; }.factory-heading h2 { font-size: 12px; }.factory-options { gap: 5px; }.factory-option { min-width: 0; height: 45px; gap: 6px; padding: 0 7px; }.factory-symbol { width: 23px; height: 23px; font-size: 8px; }.all-symbol { width: 27px; font-size: 7px; }.factory-copy b { font-size: 8px; }.factory-copy small { font-size: 7px; }.factory-copy strong { font-size: 8px; }.factory-arrow { display: none; }.review-toolbar { flex-wrap: wrap; gap: 8px; padding: 11px 0 7px; }.toolbar-left { width: 100%; flex-wrap: wrap; }.search-box { flex: 1 1 100%; width: auto; }.product-type-filter { flex: 1; height: 40px; font-size: 12px; }.product-type-filter select { max-width: none; flex: 1; }.toolbar-right { margin-left: auto; }.result-count { margin-right: 3px; }.filter-row { gap: 3px; overflow-x: auto; min-height: 45px; }.filter-chip { flex: 0 0 auto; padding: 0 8px; font-size: 9px; }.asset-pack { gap: 5px; height: 28px; padding: 0 7px; font-size: 8px; white-space: nowrap; }.hint-bar { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; font-size: 9px; }.catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }.compact-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.card-media { aspect-ratio: 1 / .9; }.card-body { padding: 8px; }.product-title { font-size: 9px; }.product-shop { margin: 3px 0 8px; font-size: 8px; }.decision-btn { height: 25px; font-size: 8px; }.shop-tag { top: 7px; left: 7px; font-size: 7px; }.decision-badge { top: 7px; right: 7px; font-size: 7px; }.page-footer { gap: 12px; font-size: 7px; }.page-footer span:last-child { text-align: right; }.detail-dialog[open] { grid-template-columns: 1fr; grid-template-rows: minmax(230px, 42vh) auto; max-height: calc(100vh - 24px); overflow-y: auto; }.dialog-media { min-height: 230px; grid-template-rows: 1fr auto; }.dialog-main-image { padding: 13px; }.dialog-main-image img { max-height: 31vh; }.dialog-content { overflow: visible; padding: 21px 20px 20px; }.dialog-content .eyebrow { margin-bottom: 9px; }.dialog-content h2 { font-size: 15px; }.dialog-shop { margin: 3px 0 10px; }.detail-images-label { margin-bottom: 10px; }.decision-actions { margin-bottom: 12px; }.dialog-close { top: 8px; right: 8px; } }
@media (max-width: 430px) { .intro h1 { font-size: 30px; }.intro-note { max-width: 195px; }.intro-side { min-width: 102px; }.catalog-grid { gap: 7px; }.card-actions { gap: 3px; }.decision-btn { padding: 0 2px; font-size: 7px; }.card-index { font-size: 7px; }.image-count { font-size: 8px; }.filter-chip { gap: 4px; }.filter-chip span { font-size: 8px; } }
@media (max-width: 720px) { .viewer-header { height: 44px; padding: 0 12px; font-size: 9px; }.viewer-stage { padding: 10px 42px; }.viewer-nav { width: 29px; height: 36px; font-size: 21px; }.viewer-prev { left: 6px; }.viewer-next { right: 6px; }.viewer-footer { height: 46px; gap: 9px; font-size: 8px; }.viewer-footer button { font-size: 8px; padding: 6px 7px; }.expand-image-button { top: 8px; right: 8px; height: 28px; font-size: 8px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* Touch-first product detail on narrow screens */
@media (max-width: 720px) {
  .detail-dialog[open] {
    position: fixed;
    inset: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(190px, 34dvh) minmax(0, 1fr);
    border-radius: 12px;
  }

  .dialog-media { min-height: 0; grid-template-rows: minmax(0, 1fr) auto; }
  .dialog-main-image { padding: 12px; }
  .dialog-main-image img { max-height: 29dvh; }
  .dialog-thumbnails { gap: 8px; padding: 9px 12px; overflow-x: auto; }
  .dialog-thumb { width: 60px; height: 52px; flex: 0 0 auto; }
  .dialog-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px max(18px, env(safe-area-inset-bottom)); }
  .dialog-content .eyebrow { margin-bottom: 8px; font-size: 10px; }
  .dialog-content h2 { font-size: 17px; }
  .dialog-shop { margin: 4px 0 13px; font-size: 13px; }
  .detail-note { margin-bottom: 13px; padding: 11px 12px; font-size: 13px; }
  .detail-images-label { margin-bottom: 14px; font-size: 13px; }
  .decision-label { margin-bottom: 9px; font-size: 14px; }
  .decision-actions { gap: 8px; margin-bottom: 18px; }
  .decision-actions .decision-btn { min-width: 0; min-height: 46px; height: auto; padding: 8px 5px; font-size: 13px; }
  .note-label { margin-bottom: 8px; font-size: 13px; }
  .note-label span { font-size: 10px; }
  .dialog-content textarea { min-height: 96px; padding: 12px; font-size: 16px; line-height: 1.5; }
  .dialog-footer { gap: 12px; margin-top: 16px; }
  .dialog-footer > span { font-size: 12px; }
  .dialog-footer .button { min-height: 44px; height: auto; padding: 0 14px; font-size: 13px; }
  .dialog-close { top: 10px; right: 10px; width: 42px; height: 42px; font-size: 23px; }
}

@media (max-width: 390px) {
  .detail-dialog[open] { inset: max(6px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom)); }
  .dialog-content { padding-right: 15px; padding-left: 15px; }
  .dialog-content h2 { font-size: 16px; }
  .decision-actions .decision-btn { font-size: 12px; }
}
