/* Reference-matched artwork wall. Only the inspection page is affected. */
html body .inspection-gallery.inspection-gallery {
  --ig-bg: #f4f7fa;
  --ig-panel: #ffffff;
  --ig-raised: #f4f7fc;
  --ig-border: #dce5ed;
  --ig-text: #213449;
  --ig-muted: #566980;
  --ig-accent: #365cc2;
  --ig-selected: #e9efff;
  --ig-on-accent: #ffffff;
  --ig-bad: #b23b4a;
  --ig-bad-bg: #fcecef;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: 14px 32px 12px;
  color: var(--ig-text);
  background: var(--ig-bg);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
html.dark body .inspection-gallery.inspection-gallery,
html body.dark .inspection-gallery.inspection-gallery {
  --ig-bg: #0e1726;
  --ig-panel: #162232;
  --ig-raised: #1b2a3c;
  --ig-border: #3a4d64;
  --ig-text: #e8eff7;
  --ig-muted: #b0bfd0;
  --ig-accent: #a9beff;
  --ig-selected: #293b61;
  --ig-on-accent: #122346;
  --ig-bad: #ffaaa9;
  --ig-bad-bg: #422c34;
  color-scheme: dark;
}
html body .inspection-gallery.inspection-gallery > :is(nav,header,section) { margin: 0 0 12px !important; }
html body .inspection-gallery.inspection-gallery > nav {
  padding: 4px !important;
  border: 1px solid var(--ig-border) !important;
  border-radius: 9px !important;
  background: var(--ig-panel) !important;
  box-shadow: none !important;
}
html body .inspection-gallery.inspection-gallery > nav a { font-size: 12px; padding: 7px 12px; color: var(--ig-muted); }
html body .inspection-gallery.inspection-gallery > nav a[aria-current=page] { background: var(--ig-selected); color: var(--ig-accent); }
html body .inspection-gallery.inspection-gallery > header { gap: 12px; padding: 0 !important; }
html body .inspection-gallery.inspection-gallery > header > div:first-child { align-items: center; gap: 14px; }
html body .inspection-gallery.inspection-gallery > header > div:first-child > span {
  width: 45px; height: 45px; border: 1px solid var(--ig-border); border-radius: 11px;
  background: var(--ig-selected); color: var(--ig-accent); font-size: 14px;
}
html body .inspection-gallery.inspection-gallery > header h1 { margin: 3px 0 !important; color: var(--ig-text); font-size: 20px; font-weight: 650; letter-spacing: -.6px; }
html body .inspection-gallery.inspection-gallery > header p { margin: 3px 0 0 !important; color: var(--ig-muted); font-size: 11px; line-height: 1.5; }
html body .inspection-gallery.inspection-gallery > header p:first-child { font-size: 9px; letter-spacing: 1.8px; font-weight: 700; }
html body .inspection-gallery.inspection-gallery .btn {
  min-height: 34px; padding: 7px 12px; border: 1px solid var(--ig-border); border-radius: 8px;
  background: var(--ig-panel); color: var(--ig-text); font-family: inherit; font-size: 12px;
  font-weight: 400; box-shadow: none;
}
html body .inspection-gallery.inspection-gallery .btn-primary { background: var(--ig-accent); border-color: var(--ig-accent); color: var(--ig-on-accent); font-weight: 600; }
html body .inspection-gallery.inspection-gallery .btn:disabled { opacity: .5; cursor: default; }
html body .inspection-gallery.inspection-gallery > section.card {
  padding: 10px !important; border: 1px solid var(--ig-border) !important;
  border-radius: 14px !important; background: var(--ig-panel) !important; box-shadow: none !important;
}
html body .inspection-gallery.inspection-gallery > section.card > div:first-child {
  gap: 8px 12px; margin: 0 4px 6px; padding: 0 !important; border: 0 !important;
}
html body .inspection-gallery.inspection-gallery > section.card > div:first-child label { gap: 8px; color: var(--ig-muted); font-size: 12px; }
html body .inspection-gallery.inspection-gallery > section.card > div:first-child > div > span:first-child { color: var(--ig-muted) !important; }
html.dark body .inspection-gallery.inspection-gallery > section.card > div:first-child > div > span:last-child,
html body.dark .inspection-gallery.inspection-gallery > section.card > div:first-child > div > span:last-child { color: #87e1b5 !important; background: #1c3c32 !important; }
html body .inspection-gallery.inspection-gallery select {
  max-width: 100%; padding: 6px 10px !important; border: 1px solid var(--ig-border); border-radius: 8px;
  color: var(--ig-text); background: var(--ig-panel); font-size: 12px; box-shadow: none;
}
html body .inspection-gallery.inspection-gallery > section.card > p { margin: 0 4px 8px; font-size: 12px; line-height: 1.5; color: var(--ig-muted); }
html body .inspection-gallery.inspection-gallery .inspection-group {
  box-sizing: border-box; position: relative; min-width: 0; width: 100%; max-width: 100%;
  margin: 10px 0 0 !important; padding: 10px !important; overflow: visible;
  border: 1px solid var(--ig-border) !important; border-radius: 12px !important;
  background: var(--ig-panel) !important; box-shadow: none !important;
}
html body .inspection-gallery.inspection-gallery .inspection-group::before,
html body .inspection-gallery.inspection-gallery .inspection-group::after { content: none !important; }
html body .inspection-gallery.inspection-gallery .inspection-group > div:first-child {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0 12px; margin: 0 !important; padding: 0 !important; border: 0 !important;
}
html body .inspection-gallery.inspection-gallery .inspection-group > div:first-child > div { min-width: 0; }
html body .inspection-gallery.inspection-gallery .inspection-group h2 {
  margin: 0 !important; color: var(--ig-text) !important; font-size: 13px !important;
  font-weight: 700 !important; line-height: 1.45; letter-spacing: 0; overflow-wrap: anywhere;
}
html body .inspection-gallery.inspection-gallery .inspection-group h2 + p {
  margin: 5px 0 9px !important; color: var(--ig-muted) !important; font-size: 12px !important;
  font-weight: 400; line-height: 1.5;
}
html body .inspection-gallery.inspection-gallery .inspection-group > div:first-child > span {
  padding: 0 !important; margin: 0 0 9px; border: 0 !important; border-radius: 0 !important;
  color: var(--ig-muted) !important; background: transparent !important; box-shadow: none !important;
  font-size: 12px !important; font-weight: 400; line-height: 1.5;
}
html body .inspection-gallery.inspection-gallery .inspection-group > div:first-child > span::before { content: none !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid {
  box-sizing: border-box; display: flex !important; flex-wrap: nowrap; align-items: stretch;
  width: 100%; min-width: 0; max-width: 100%; margin: 0 !important; padding: 2px 2px 8px !important;
  gap: 10px !important; overflow-x: auto !important; overflow-y: hidden;
  overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 2px;
  scrollbar-width: auto !important; scrollbar-color: auto !important;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid::-webkit-scrollbar { display: block !important; height: 6px !important; background: transparent !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid::-webkit-scrollbar-track { border: 0 !important; border-radius: 6px; background: transparent !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid::-webkit-scrollbar-thumb { min-width: 40px; border: 0 !important; border-radius: 6px; background: var(--ig-border) !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid::-webkit-scrollbar-thumb:hover { background: var(--ig-muted) !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid::-webkit-scrollbar-button { display: none !important; width: 0 !important; height: 0 !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section {
  box-sizing: border-box; display: block; flex: 0 0 244px !important; width: 244px !important;
  min-width: 0 !important; max-width: 244px !important; margin: 0 !important; padding: 10px !important;
  border: 1px solid var(--ig-border) !important; border-radius: 10px !important;
  background: var(--ig-raised) !important; box-shadow: none !important;
  transform: none !important; scroll-snap-align: start; transition: border-color 140ms ease;
  container-type: normal;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section:hover { box-shadow: none !important; transform: none !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section:focus-within { border-color: var(--ig-accent) !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section h3 {
  margin: 0 !important; color: var(--ig-text) !important; font-size: 14px !important;
  font-weight: 650 !important; line-height: 21px !important; letter-spacing: .1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section h3 + p {
  margin: 3px 0 8px !important; color: var(--ig-muted) !important;
  font-size: 12px !important; line-height: 18px !important; white-space: nowrap;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section > div:has(> .inspection-artwork-cover),
html body .inspection-gallery.inspection-gallery .inspection-work-status {
  box-sizing: border-box; position: relative; width: 100%; height: 128px !important; min-height: 128px !important;
  margin: 0 !important; padding: 0; aspect-ratio: auto !important; overflow: hidden;
  border: 1px solid var(--ig-border) !important; border-radius: 7px !important;
  background: #f7faf8 !important; box-shadow: none !important;
}
html body .inspection-gallery.inspection-gallery .inspection-artwork-cover {
  position: relative; width: 100%; height: 100% !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important; aspect-ratio: auto !important;
  overflow: hidden; border: 0 !important; border-radius: 0 !important; background: #f7faf8 !important;
}
html body .inspection-gallery.inspection-gallery .inspection-artwork-cover img {
  display: block; width: 100%; height: 100%; margin: 0; object-fit: contain !important;
  object-position: center; transform: none !important; transition: none !important; background: transparent !important;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid button {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  border: 0; border-radius: 7px; background: transparent; cursor: zoom-in;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid button > span:first-child {
  position: absolute; left: 5px !important; top: 5px !important; padding: 2px 5px !important;
  border: 1px solid #dce5e0 !important; border-radius: 4px !important;
  background: #fffdf5ed !important; color: #415e56 !important;
  font-size: 9px !important; font-weight: 400; line-height: 1.5; box-shadow: none !important; backdrop-filter: none !important;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid button > span:last-child {
  position: absolute; display: inline-block !important; right: 5px !important; bottom: 5px !important;
  width: auto !important; height: auto !important; padding: 3px 6px !important;
  border: 0 !important; border-radius: 5px !important; background: #173b36eb !important; color: #fff !important;
  font-size: 10px !important; font-weight: 400; line-height: 1.5 !important; box-shadow: none !important;
  transform: none !important;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid button > span:last-child::after { content: none !important; }
html body .inspection-gallery.inspection-gallery .inspection-work-status {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 10px !important; background: var(--ig-raised) !important; color: var(--ig-muted);
}
html body .inspection-gallery.inspection-gallery .inspection-work-status:has(.text-rose-500) { background: var(--ig-bad-bg) !important; }
html body .inspection-gallery.inspection-gallery .inspection-work-status > span { width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 20px; line-height: 22px; }
html body .inspection-gallery.inspection-gallery .inspection-work-status .text-rose-500 { color: var(--ig-bad) !important; }
html body .inspection-gallery.inspection-gallery .inspection-work-status strong { font-size: 12px; line-height: 18px; }
html body .inspection-gallery.inspection-gallery .inspection-work-status p { display: -webkit-box; margin: 0 !important; color: var(--ig-muted); font-size: 11px; line-height: 16px; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section > p.mt-3 {
  margin: 6px 0 0 !important; color: var(--ig-muted) !important; font-size: 12px !important;
  line-height: 18px !important; white-space: nowrap; font-variant-numeric: tabular-nums;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section > div.mt-2 {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start;
  gap: 2px 10px !important; margin: 5px 0 0 !important; padding: 0 !important; border: 0 !important;
  color: var(--ig-muted) !important; font-size: 12px !important; line-height: 18px !important;
}
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section > div.mt-2 > span { white-space: nowrap; font-variant-numeric: tabular-nums; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid > section > div.mt-2 > span:last-child { font-weight: 600; color: inherit !important; }
html body .inspection-gallery.inspection-gallery .inspection-pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 12px;
  min-height: 0; margin: 10px 0 0 !important; padding: 0 !important;
  border: 0 !important; background: transparent !important; box-shadow: none !important;
}
html body .inspection-gallery.inspection-gallery .inspection-page-button {
  min-height: 30px; padding: 5px 10px !important; border: 1px solid var(--ig-border) !important;
  border-radius: 7px !important; background: var(--ig-raised) !important; color: var(--ig-text) !important;
  font-size: 12px !important; font-weight: 400; line-height: 18px; box-shadow: none !important;
}
html body .inspection-gallery.inspection-gallery .inspection-page-number,
html body .inspection-gallery.inspection-gallery .inspection-page-hint { margin: 0; color: var(--ig-muted) !important; font-size: 11px !important; font-weight: 400; }
html body .inspection-gallery.inspection-gallery .inspection-page-hint { margin-left: auto; }
html body .inspection-gallery.inspection-gallery :is(button,a,select,[tabindex]):focus-visible { outline: 2px solid var(--ig-accent); outline-offset: 3px; }
html body .inspection-gallery.inspection-gallery [hidden] { display: none !important; }
@media(max-width:1100px) { html body .inspection-gallery.inspection-gallery { padding-inline: 20px; } }
@media(max-width:850px) { html body .inspection-gallery.inspection-gallery { padding-inline: 16px; } }
@media(max-width:639px) {
  html body .inspection-gallery.inspection-gallery { padding: 12px 10px; }
  html body .inspection-gallery.inspection-gallery > header > div:first-child { gap: 8px; align-items: flex-start; }
  html body .inspection-gallery.inspection-gallery > header > div:first-child > span { width: 35px; height: 35px; }
  html body .inspection-gallery.inspection-gallery > header > div:last-child { margin-left: auto; }
  html body .inspection-gallery.inspection-gallery > section.card { padding: 8px !important; }
  html body .inspection-gallery.inspection-gallery > section.card > div:first-child label { align-items: flex-start; flex-direction: column; gap: 4px; width: 100%; }
  html body .inspection-gallery.inspection-gallery .inspection-group { padding: 8px !important; margin-top: 8px !important; }
  html body .inspection-gallery.inspection-gallery .inspection-works-grid > section { flex-basis: min(244px, calc(100vw - 88px)) !important; width: min(244px, calc(100vw - 88px)) !important; }
  html body .inspection-gallery.inspection-gallery .inspection-page-hint { flex-basis: 100%; margin-left: 0; }
}
@media(prefers-reduced-motion:reduce) { html body .inspection-gallery.inspection-gallery .inspection-works-grid > section { transition: none; } }

html body .inspection-gallery.inspection-gallery .inspection-works-grid > section > div.mt-2 { min-height: 20px; }

/* Native dialog and a complete live document; keep gallery artwork untouched. */
body.inspection-dialog-open { overflow:hidden; }
html body dialog.inspection-artwork-dialog {
  box-sizing:border-box; width:min(1100px,calc(100vw - 32px)); max-width:calc(100vw - 32px);
  max-height:calc(100dvh - 32px); margin:auto; padding:0; overflow:hidden;
  border:1px solid #dce5ed; border-radius:12px; background:#fff; color:#213449;
  box-shadow:0 20px 80px #08111f35;
}
html body dialog.inspection-artwork-dialog[open] { display:flex; flex-direction:column; }
html body dialog.inspection-artwork-dialog:not([open]) { display:none; }
html body dialog.inspection-artwork-dialog::backdrop { background:#10243c99; backdrop-filter:none; }
html body .inspection-artwork-heading { display:flex; flex:0 0 auto; align-items:flex-start; justify-content:space-between; gap:16px; padding:16px 20px 8px; }
html body .inspection-artwork-heading h2 { margin:0; min-width:0; font-size:15px; font-weight:650; line-height:1.5; overflow-wrap:anywhere; }
html body .inspection-artwork-actions { display:flex; flex:0 0 auto; align-items:center; gap:16px; }
html body .inspection-artwork-download { color:#566980; font-size:11px; white-space:nowrap; }
html body .inspection-artwork-close { display:grid; place-items:center; width:28px; height:28px; margin:-5px -5px 0 0; padding:0; border:0; border-radius:7px; background:transparent; color:#566980; font-size:24px; line-height:1; cursor:pointer; }
html body .inspection-artwork-close:hover { background:#edf2f7; }
html body .inspection-artwork-dialog .inspection-artwork-document { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; min-width:0; overflow:hidden; }
html body .inspection-artwork-dialog .inspection-artwork-document > :not(.inspection-fit-viewport) { flex:0 0 auto; margin:0; padding:0 20px 12px; border:0; border-radius:0; background:transparent; color:#566980; font-size:12px; line-height:1.65; }
html body .inspection-artwork-dialog .inspection-artwork-document > div > p { margin:0; }
html body .inspection-artwork-dialog .inspection-fit-viewport { position:relative; display:flex; flex:0 1 auto; width:100%; height:70dvh; min-height:0; margin:0; padding:0; border:0; border-radius:0; overflow:hidden; background:#f4f7fa; }
html body .inspection-artwork-dialog .inspection-fit-frame { display:block; position:static; width:100%; height:100%; min-width:0; min-height:0; border:0; border-radius:0; transform:none; background:#fff; color-scheme:normal; }
html body .inspection-viewer-feedback { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:12px; background:#f4f7fa; color:#566980; font-size:12px; }
html body .inspection-artwork-dialog :is(a,button):focus-visible { outline:2px solid #365cc2; outline-offset:3px; }
html body .inspection-gallery.inspection-gallery .inspection-group-notice { margin:0 0 10px !important; padding:7px 10px; border:1px solid #eadfc7; border-radius:7px; background:#fffaf0; color:#78623f; font-size:11px; line-height:1.6; }
/* A native range control keeps the bar visible even when OS scrollbars auto-hide. */
html body .inspection-gallery.inspection-gallery .inspection-works-grid { scrollbar-width:none !important; padding-bottom:2px !important; }
html body .inspection-gallery.inspection-gallery .inspection-works-grid::-webkit-scrollbar { display:none !important; }
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar { height:14px; margin:2px 2px 0; padding:0; display:flex; align-items:center; }
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input {
  --inspection-thumb-size:50%; appearance:none; -webkit-appearance:none; display:block; width:100%; height:14px;
  margin:0; padding:0; border:0; border-radius:6px; background:transparent; cursor:grab;
}
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input:active { cursor:grabbing; }
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input::-webkit-slider-runnable-track { height:5px; border:0; border-radius:5px; background:#edf1f6; }
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:var(--inspection-thumb-size); height:5px; border:0; border-radius:5px; background:#c7d3e0; box-shadow:none; }
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input::-moz-range-track { height:5px; border:0; border-radius:5px; background:#edf1f6; }
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input::-moz-range-thumb { width:var(--inspection-thumb-size); height:5px; border:0; border-radius:5px; background:#c7d3e0; }
html body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input:disabled { cursor:default; opacity:.5; }
html.dark body dialog.inspection-artwork-dialog { background:#162232; color:#e8eff7; border-color:#3a4d64; }
html.dark body .inspection-artwork-dialog .inspection-artwork-document > :not(.inspection-fit-viewport),html.dark body .inspection-artwork-download,html.dark body .inspection-artwork-close { color:#b0bfd0; }
html.dark body .inspection-gallery.inspection-gallery .inspection-group-notice { background:#302b21; border-color:#574c35; color:#e0c795; }
html.dark body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input::-webkit-slider-runnable-track { background:#223247; }
html.dark body .inspection-gallery.inspection-gallery .inspection-group-scrollbar input::-webkit-slider-thumb { background:#516783; }
@media(max-width:640px) {
  html body dialog.inspection-artwork-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
  html body .inspection-artwork-heading { gap:8px; padding:12px 12px 7px; }
  html body .inspection-artwork-heading h2 { font-size:14px; }
  html body .inspection-artwork-actions { gap:8px; }
  html body .inspection-artwork-download { font-size:10px; }
  html body .inspection-artwork-dialog .inspection-artwork-document > :not(.inspection-fit-viewport) { padding:0 12px 10px; font-size:11px; }
  html body .inspection-artwork-dialog .inspection-fit-viewport { height:64dvh; }
}
