:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: #ffffff;
  --text: #17191d;
  --muted: #69727d;
  --line: #dfe4ea;
  --line-strong: #c9d1da;
  --accent: #1268d8;
  --accent-soft: #eef5ff;
  --success: #147344;
  --success-soft: #edf8f1;
  --warning: #9a5b00;
  --warning-soft: #fff5df;
  --danger: #b42318;
  --danger-soft: #fff0ee;
}

* { box-sizing: border-box; }
body {
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; letter-spacing: 0; }

.preview-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
}
.preview-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.preview-brand img { display: block; width: 32px; height: 32px; border-radius: 7px; }
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: 15px; line-height: 1.25; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.preview-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.state-dot, .availability-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

.preview-main { width: min(1180px, calc(100% - 56px)); margin: 0 auto; padding: 44px 0 64px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.eyebrow, .section-kicker { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 750; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: 38px; line-height: 1.12; }
.intro-copy { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.demo-note { flex: 0 0 auto; color: var(--muted); font-size: 12px; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.summary-item { min-height: 72px; padding: 15px 18px; border-right: 1px solid var(--line); }
.summary-item:last-child { border-right: 0; }
.summary-item span, .summary-item strong { display: block; }
.summary-item span { color: var(--muted); font-size: 12px; }
.summary-item strong { margin-top: 5px; font-size: 23px; line-height: 1; }
.summary-item.attention strong { color: var(--danger); }
.summary-item.warning strong { color: var(--warning); }

.project-section { margin-bottom: 42px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.section-heading h2 { margin-bottom: 0; font-size: 22px; line-height: 1.25; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 184px;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(27, 39, 54, .03);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.project-card:hover { border-color: #a9c5ec; box-shadow: 0 10px 24px rgba(27, 55, 93, .08); transform: translateY(-2px); }
.card-topline { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.project-glyph { display: inline-flex; min-width: 48px; min-height: 32px; align-items: center; justify-content: center; border-radius: 6px; font-size: 12px; font-weight: 750; }
.product-glyph { background: var(--accent-soft); color: var(--accent); }
.compliance-glyph { background: var(--success-soft); color: var(--success); }
.availability { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 12px; font-weight: 700; }
.card-body h3 { margin-bottom: 8px; font-size: 20px; }
.card-body p { max-width: 44ch; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.card-link { align-self: end; color: var(--accent); font-size: 13px; font-weight: 750; white-space: nowrap; }

.shop-heading { margin-bottom: 14px; }
.shop-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; margin-bottom: 12px; }
.search-control, .sort-control { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.search-control input, .sort-control select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  outline: 0;
}
.search-control input { padding: 0 13px; }
.sort-control select { padding: 0 34px 0 12px; }
.search-control input:focus, .sort-control select:focus { border-color: #7da9e3; box-shadow: 0 0 0 3px rgba(18, 104, 216, .12); }

.shop-table { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.shop-table-head, .shop-row { display: grid; grid-template-columns: minmax(210px, 1.45fr) minmax(170px, 1.05fr) minmax(190px, 1.2fr) minmax(130px, .85fr) 100px 48px; align-items: center; gap: 16px; }
.shop-table-head { min-height: 42px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #f8f9fb; color: var(--muted); font-size: 11px; font-weight: 700; }
.shop-row { min-height: 92px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.shop-row:last-child { border-bottom: 0; }
.shop-row[hidden] { display: none; }
.shop-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3px 10px; min-width: 0; }
.shop-identity strong { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.shop-identity small { grid-column: 2; color: var(--muted); font-size: 11px; }
.agent-binding-panel { grid-column: 1 / -1; width: 100%; margin-top: 7px; color: var(--muted); font-size: 11px; }
.agent-binding-panel summary { cursor: pointer; list-style: none; color: #344054; font-weight: 650; }
.agent-binding-panel summary::-webkit-details-marker { display: none; }
.agent-binding-panel summary::before { content: "+"; display: inline-grid; width: 16px; height: 16px; margin-right: 6px; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 12px; }
.agent-binding-panel[open] summary::before { content: "-"; }
.agent-binding-options { display: grid; gap: 6px; margin-top: 8px; }
.agent-binding-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 7px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.agent-binding-option input { margin: 2px 0 0; }
.agent-binding-option span { display: grid; min-width: 0; }
.agent-binding-option strong { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agent-binding-option small { grid-column: auto; overflow-wrap: anywhere; }
.agent-binding-option.is-disabled { opacity: .58; }
.agent-binding-empty { margin: 8px 0 0; color: var(--muted); }
.platform-badge { grid-row: 1 / 3; display: inline-flex; min-width: 50px; min-height: 28px; align-items: center; justify-content: center; border-radius: 6px; font-size: 10px; font-weight: 800; }
.platform-badge.temu { background: #fff1eb; color: #bb3f13; }
.platform-badge.shein { background: #f0f1f3; color: #202329; }
.platform-badge.compliance { background: var(--success-soft); color: var(--success); }
.auth-cell, .task-cell, .sync-cell { min-width: 0; }
.auth-cell small, .task-cell small, .sync-cell small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.task-cell strong, .sync-cell strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.task-cell.muted strong { color: var(--muted); font-weight: 600; }
.status-chip, .task-status { display: inline-flex; min-height: 25px; align-items: center; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.status-chip.active, .task-status.idle { background: var(--success-soft); color: var(--success); }
.status-chip.soon, .status-chip.warning, .task-status.queued { background: var(--warning-soft); color: var(--warning); }
.status-chip.expired, .task-status.failed { background: var(--danger-soft); color: var(--danger); }
.task-status.running { background: var(--accent-soft); color: var(--accent); }
.row-link { appearance: none; border: 0; padding: 0; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; }
.row-link:disabled { color: var(--muted); cursor: wait; }
.shop-feedback { grid-column: 1 / -1; min-width: 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.shop-feedback:empty { display: none; }
.shop-feedback.pending { color: var(--accent); }
.shop-feedback.success { color: var(--success); }
.shop-feedback.warning { color: var(--warning); }
.shop-feedback.error { color: var(--danger); overflow-wrap: anywhere; }
.empty-state { padding: 42px 20px; color: var(--muted); text-align: center; font-size: 13px; }

a:focus-visible { outline: 3px solid rgba(18, 104, 216, .22); outline-offset: 3px; }

@media (max-width: 960px) {
  .shop-table-head { display: none; }
  .shop-row { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
  .shop-row > * { grid-column: 1; }
  .shop-row .auth-cell { grid-column: 2; grid-row: 1; text-align: right; }
  .shop-row .task-cell { grid-row: 2; }
  .shop-row .task-status { grid-row: 3; }
  .shop-row .sync-cell { grid-column: 2; grid-row: 2; text-align: right; }
  .shop-row .row-link { grid-column: 2; grid-row: 3; justify-self: end; }
}

@media (max-width: 720px) {
  .preview-header { padding: 0 18px; }
  .preview-main { width: min(100% - 28px, 1180px); padding: 34px 0 40px; }
  .intro, .section-heading { display: block; }
  .demo-note, .section-heading > span { display: inline-block; margin-top: 14px; }
  h1 { font-size: 32px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-item:nth-child(2) { border-right: 0; }
  .summary-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .project-grid, .shop-toolbar { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 1fr; min-height: 210px; }
  .card-topline { grid-column: 1; }
  .card-link { align-self: auto; }
  .shop-row { grid-template-columns: 1fr; }
  .shop-row .auth-cell, .shop-row .task-cell, .shop-row .task-status, .shop-row .sync-cell, .shop-row .row-link { grid-column: 1; grid-row: auto; justify-self: start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .project-card { transition: none; }
}

/* The project launch area is the primary action on the home overview. */
.project-section-primary { margin-bottom: 42px; }
.project-section-primary .section-heading h2 { font-size: 26px; }
.project-section-primary .project-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 18px; }
.project-section-primary .project-card { min-height: 224px; padding: 28px; box-shadow: 0 8px 20px rgba(27, 39, 54, .045); }
.project-section-primary .project-card:first-child { border-top: 3px solid var(--accent); }
.project-section-primary .project-card:nth-child(2) { border-top: 3px solid var(--success); }
.project-section-primary .project-card:hover { box-shadow: 0 16px 30px rgba(27, 55, 93, .10); }

@media (max-width: 720px) {
  .project-section-primary .project-grid { grid-template-columns: 1fr; }
  .project-section-primary .project-card { min-height: 210px; padding: 24px; }
}

.project-section-primary .project-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1fr); }
.team-glyph { min-width: 68px; background: #f2efff; color: #6546b8; }
.team-card { background: var(--surface); }
.team-card .card-body p { max-width: 44ch; }
.image-glyph { min-width: 68px; background: #fff0dc; color: #9a5b00; }
.image-card { background: var(--surface); }
.availability-pending { color: #8a5a14; }

@media (max-width: 960px) {
  .project-section-primary .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-section-primary .project-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .project-section-primary .project-grid { grid-template-columns: 1fr; }
  .project-section-primary .project-card:last-child { grid-column: auto; }
}

.asset-section { margin-top: 42px; }
.section-intro { margin: -4px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.asset-overview { display: flex; gap: 24px; margin: 18px 0 16px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.asset-summary { display: flex; min-width: 132px; align-items: baseline; justify-content: space-between; gap: 18px; }
.asset-summary + .asset-summary { padding-left: 24px; border-left: 1px solid var(--line); }
.asset-summary span { color: var(--muted); font-size: 12px; }
.asset-summary strong { color: var(--ink); font-size: 20px; }
.material-toolbar { display: grid; grid-template-columns: minmax(280px, 1fr) auto; align-items: end; gap: 18px; margin: 0 0 18px; }
.material-search-control { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.material-search-control input { width: 100%; min-height: 40px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; outline: 0; }
.material-search-control input::placeholder { color: #8a95a3; }
.material-search-control input:focus { border-color: #7da9e3; box-shadow: 0 0 0 3px rgba(18, 104, 216, .12); }
.material-toolbar-actions { display: flex; min-height: 40px; align-items: center; justify-content: flex-end; gap: 12px; }
.material-search-state { min-width: 86px; color: var(--muted); font-size: 11px; text-align: right; }
.material-search-state:empty { display: none; }
.material-browser { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: 0 4px 14px rgba(27, 39, 54, .04); }
.material-browser-bar { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.material-breadcrumb { display: flex; min-width: 0; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.material-breadcrumb button { padding: 4px 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-weight: 750; cursor: pointer; }
.material-breadcrumb button:disabled { color: var(--muted); cursor: default; }
.material-breadcrumb strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.material-refresh { display: inline-grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); color: var(--accent); font: inherit; font-size: 18px; cursor: pointer; }
.material-refresh:hover { background: var(--accent-soft); }
.material-refresh:disabled { opacity: .5; cursor: wait; }
.material-browser .material-toolbar { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #f6f8fb; }
.material-browser .material-search-control { max-width: 560px; }
.material-browser .material-groups { min-height: 360px; padding: 24px 18px; }
.material-browser-summary { min-height: 42px; padding: 13px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.material-folder-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 18px; }
.material-folder { display: grid; min-width: 0; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; padding: 13px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.material-folder:hover { border-color: #bad5f6; background: #f5f9ff; }
.material-folder:focus-visible, .material-file:focus-visible, .material-refresh:focus-visible, .material-breadcrumb button:focus-visible { outline: 3px solid rgba(18, 104, 216, .22); outline-offset: 2px; }
.material-folder-icon { position: relative; display: block; width: 58px; height: 42px; border-radius: 5px; background: #83b8f4; box-shadow: inset 0 -8px 14px rgba(30, 100, 180, .08); }
.material-folder-icon::before { content: ""; position: absolute; top: -7px; left: 4px; width: 25px; height: 10px; border-radius: 4px 4px 0 0; background: #74a9e7; }
.material-folder-copy { display: grid; min-width: 0; gap: 6px; }
.material-folder-copy strong, .material-folder-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-folder-copy strong { font-size: 13px; }
.material-folder-copy small { color: var(--muted); font-size: 10px; }
.material-folder-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.material-folder-heading > div:first-child { min-width: 0; }
.material-folder-heading > div:first-child > span { color: var(--accent); font-size: 10px; font-weight: 750; }
.material-folder-heading h2 { margin: 4px 0 0; font-size: 20px; }
.material-folder-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.material-folder-heading > div:last-child { display: grid; grid-template-columns: auto auto auto auto; align-items: baseline; gap: 5px 10px; color: var(--muted); font-size: 10px; }
.material-folder-heading > div:last-child strong { color: var(--ink); font-size: 17px; }
.material-file-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.material-file { display: grid; min-width: 0; gap: 9px; padding: 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.material-file:hover { border-color: var(--line-strong); background: #f8fafc; color: var(--accent); }
.material-file-preview { display: grid; aspect-ratio: 1 / 1; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f2f5f8; }
.material-file-preview img { width: 100%; height: 100%; object-fit: cover; }
.asset-image-trigger .material-file-preview { cursor: zoom-in; }
.material-file-type { display: grid; width: 62px; height: 76px; place-items: center; border: 1px solid #bbd8ca; border-radius: 6px; background: #edf8f1; color: #26744c; font-size: 11px; font-weight: 800; }
.material-file-copy { display: grid; min-width: 0; gap: 5px; }
.material-file-copy strong, .material-file-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.material-file-copy strong { font-size: 12px; }
.material-file-copy small { color: var(--muted); font-size: 10px; }
.material-view-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f5f7fa; }
.material-view-switch button { min-width: 76px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; }
.material-view-switch button[aria-selected="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px rgba(27, 39, 54, .08); }
.material-view-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.material-groups { display: grid; gap: 16px; }
.shop-material-section { display: grid; gap: 12px; padding-top: 8px; }
.shop-material-section + .shop-material-section { margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--line-strong); }
.shop-material-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.shop-material-heading h2 { margin: 0; font-size: 20px; line-height: 1.25; }
.shop-material-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.shop-material-heading > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.shop-material-products { display: grid; gap: 14px; }
.material-card { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: 0 3px 10px rgba(27, 39, 54, .035); }
.material-card-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
.material-card-title { display: flex; min-width: 0; align-items: baseline; gap: 10px; }
.material-card-title > span { color: var(--accent); font-size: 11px; font-weight: 750; }
.material-card-title h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.material-card-title small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.material-card-counts { display: flex; flex: 0 0 auto; gap: 16px; color: var(--muted); font-size: 11px; }
.material-group-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); }
.material-band { min-width: 0; padding: 14px 18px 8px; }
.material-band + .material-band { border-left: 1px solid var(--line); }
.material-certificate-band { background: #fbfdfc; }
.material-band-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.material-band-heading h3 { margin: 0; font-size: 13px; }
.material-band-heading span { color: var(--muted); font-size: 11px; }
.material-items { min-width: 0; }
.material-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.material-certificate-list { display: grid; }
.material-certificate-list .asset-row { border-bottom-color: var(--line); }
.material-empty { margin: 0; padding: 20px 0 22px; color: var(--muted); font-size: 12px; }
.asset-row { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.asset-row:hover { color: var(--accent); }
.asset-row:nth-last-child(-n + 2) { border-bottom-color: transparent; }
.material-certificate-list .asset-row:last-child { border-bottom-color: transparent; }
.asset-row img { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 6px; object-fit: cover; background: #f3f5f7; }
.asset-row > span:last-child { min-width: 0; }
.asset-row strong, .asset-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-row strong { font-size: 13px; }
.asset-row small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.asset-document .asset-icon { display: inline-flex; width: 48px; height: 48px; flex: 0 0 48px; align-items: center; justify-content: center; border-radius: 6px; background: var(--success-soft); color: var(--success); font-size: 11px; font-weight: 800; }
.header-back-link { display: inline-flex; min-height: 34px; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--accent); font-size: 12px; font-weight: 750; }
.image-lightbox { width: min(1180px, calc(100vw - 32px)); max-width: none; height: min(860px, calc(100dvh - 32px)); max-height: none; padding: 0; border: 0; border-radius: 8px; background: #111821; color: #fff; box-shadow: 0 24px 80px rgba(4, 12, 22, .35); }
.image-lightbox::backdrop { background: rgba(9, 16, 25, .78); backdrop-filter: blur(3px); }
.image-lightbox-shell { display: grid; height: 100%; grid-template-rows: auto minmax(0, 1fr); }
.image-lightbox-header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 14px 13px 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.image-lightbox-header > div:first-child { display: grid; min-width: 0; gap: 3px; }
.image-lightbox-header span { color: rgba(255, 255, 255, .58); font-size: 10px; font-weight: 750; }
.image-lightbox-header strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.image-lightbox-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.image-lightbox-actions a, .image-lightbox-actions button { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; border: 1px solid rgba(255, 255, 255, .22); border-radius: 7px; background: rgba(255, 255, 255, .08); color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.image-lightbox-actions a { padding: 0 12px; }
.image-lightbox-actions button { width: 34px; padding: 0; font-size: 22px; line-height: 1; }
.image-lightbox-actions a:hover, .image-lightbox-actions button:hover { background: rgba(255, 255, 255, .16); }
.image-lightbox-actions a:focus-visible, .image-lightbox-actions button:focus-visible { outline: 3px solid rgba(134, 190, 255, .5); outline-offset: 2px; }
.image-lightbox-stage { position: relative; display: grid; min-height: 0; place-items: center; overflow: auto; padding: 18px; }
.image-lightbox-stage img { display: block; width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.image-lightbox-stage > span { position: absolute; inset: 50% auto auto 50%; padding: 8px 11px; border-radius: 7px; background: rgba(9, 16, 25, .82); color: rgba(255, 255, 255, .84); font-size: 12px; transform: translate(-50%, -50%); }

/* HOME keeps every project as an independent destination behind one workbench. */
.project-section-primary .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .project-section-primary .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .project-section-primary .project-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .asset-overview { gap: 16px; }
  .asset-summary { min-width: 0; flex: 1; }
  .asset-summary + .asset-summary { padding-left: 16px; }
  .material-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .material-toolbar-actions { display: grid; grid-template-columns: 1fr; }
  .material-search-state { min-width: 0; text-align: left; }
  .material-view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .shop-material-heading { align-items: flex-start; }
  .material-card-header, .material-card-title { align-items: flex-start; }
  .material-card-header { display: grid; }
  .material-card-title { flex-wrap: wrap; }
  .material-card-title small { width: 100%; white-space: normal; }
  .material-group-body { grid-template-columns: 1fr; }
  .material-band + .material-band { border-top: 1px solid var(--line); border-left: 0; }
  .material-media-grid { grid-template-columns: 1fr; }
  .asset-row:nth-last-child(-n + 2) { border-bottom-color: var(--line); }
  .asset-row:last-child { border-bottom-color: transparent; }
  .material-browser-bar { padding: 0 10px 0 12px; }
  .material-browser .material-toolbar { padding: 12px; }
  .material-browser .material-groups { min-height: 280px; padding: 16px 12px; }
  .material-folder-grid { grid-template-columns: 1fr; gap: 6px; }
  .material-folder { grid-template-columns: 52px minmax(0, 1fr); padding: 10px; }
  .material-folder-icon { width: 48px; height: 35px; }
  .material-file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .material-folder-heading { display: grid; align-items: start; }
  .material-folder-heading > div:last-child { justify-content: start; }
  .material-browser-summary { padding: 12px; }
  .image-lightbox { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  .image-lightbox-header { align-items: flex-start; padding: 12px; }
  .image-lightbox-actions a { display: none; }
  .image-lightbox-stage { padding: 10px; }
}

@media (min-width: 721px) and (max-width: 1100px) {
  .material-folder-grid, .material-file-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .image-lightbox::backdrop { backdrop-filter: none; }
}
