:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { margin: 0; background: #f6f7f9; color: #122; }
.top { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: #fff; border-bottom: 1px solid #ddd; }
.top button { margin-left: auto; }
main { padding: 16px; }
.panel { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 12px; }
.layout { display: grid; gap: 12px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 280px 1fr; }
}
.customer-workspace-view { grid-template-columns: minmax(0, 1fr); }
.customer-product-view { grid-template-columns: minmax(0, 1fr); }
.customer-workspace-view > #product-list-panel.panel { min-width: 0; border: 0; border-radius: 0; background: transparent; padding: 0; }
.customer-workspace-view > #product-detail-panel { display: none; }
.customer-product-view > #product-list-panel { display: none; }
label { display: block; margin: 10px 0; }
input, textarea, select { width: 100%; box-sizing: border-box; padding: 8px; margin-top: 4px; }
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px; border-bottom: 1px solid #eee; cursor: pointer; }
.list li.active { background: #eef5ff; }
.product-library-search { margin: 0 0 12px; }
.product-library-search label { font-size: 14px; margin: 0; }
.customer-product-workspace-controls { display: grid; gap: 4px; min-width: 0; margin: 0 0 12px; }
.customer-product-workspace-controls label { font-size: 14px; margin: 4px 0 0; }
.customer-product-workspace-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-width: 0; margin-top: 6px; }
.customer-product-display-switch { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.customer-product-display-mode { min-height: 36px; padding: 5px 10px; border: 1px solid #b9c2cc; border-radius: 6px; background: #fff; color: #49535d; font-weight: 600; }
.customer-product-display-mode.active { border-color: #1b4d8f; background: #eef5ff; color: #1b4d8f; }
.customer-product-live-filter { margin-left: auto; }
.customer-product-workspace-msg { margin: 2px 0 0; }
.customer-workspace-view .customer-workspace-heading { margin-bottom: 12px; }
.customer-workspace-view .customer-workspace-heading h2 { margin: 0; }
.customer-product-filter-label { margin-top: 6px; font-size: 14px; }
.customer-product-review-filters { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.customer-product-review-chip { min-height: 36px; padding: 5px 10px; border: 1px solid #b9c2cc; border-radius: 999px; background: #fff; color: #49535d; font-weight: 600; white-space: nowrap; }
.customer-product-review-chip.active { border-color: #1b4d8f; background: #eef5ff; color: #1b4d8f; }
.customer-accounts { margin-top: 20px; padding-top: 12px; border-top: 1px solid #eee; }
.customer-accounts h2 { margin: 0 0 8px; font-size: 16px; }
.customer-create-form { display: grid; gap: 8px; }
.customer-create-form label { margin: 0; font-size: 14px; }
.customer-account-item { display: grid; gap: 8px; cursor: default; }
.customer-account-summary { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.customer-activity-summary { white-space: pre-line; line-height: 1.5; }
.customer-account-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.customer-account-actions input { flex: 1 1 160px; margin: 0; }
.customer-disable-btn { background: #fff5f0; border-color: #d98324; color: #8a4b00; }
.customer-enable-btn { background: #f0fff4; border-color: #0a7; color: #075; }
.product-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; padding: 12px 0; }
.product-card-cover { width: 88px; height: 88px; border: 1px solid #ddd; border-radius: 6px; object-fit: cover; background: #f6f7f9; }
.product-card-cover-empty { display: grid; place-items: center; width: 88px; height: 88px; padding: 6px; box-sizing: border-box; border: 1px dashed #bbb; border-radius: 6px; color: #666; font-size: 12px; text-align: center; }
.product-card-content { min-width: 0; }
.product-card-title { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.product-card-model { margin: 4px 0; color: #444; font-size: 14px; }
.product-card-meta { display: grid; gap: 3px; margin: 8px 0; color: #666; font-size: 13px; }
.product-card-action { min-height: 44px; padding: 5px 10px; }
.customer-product-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.customer-product-actions .product-card-action { flex: 1 1 96px; }
.customer-workspace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; min-width: 0; align-items: stretch; }
.customer-workspace-grid .customer-product-card { display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 0; border: 1px solid #e2e6ea; border-radius: 12px; background: #fff; overflow: hidden; cursor: default; }
.customer-workspace-grid .customer-product-card.active { background: #eef5ff; }
.customer-workspace-grid .product-card-cover { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; box-sizing: border-box; border: 0; border-radius: 0; }
.customer-workspace-grid .product-card-cover-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; height: auto; aspect-ratio: 4 / 3; box-sizing: border-box; background: #f2f4f6; border: 0; border-radius: 0; color: #59636e; text-align: center; }
.customer-workspace-grid .product-card-cover-empty-title { font-size: 15px; font-weight: 600; }
.customer-workspace-grid .product-card-cover-empty-hint { font-size: 12px; color: #7b858f; }
.customer-workspace-grid .product-card-content { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 14px; }
.customer-workspace-grid .product-card-title { margin: 0 0 2px; }
.customer-workspace-grid .product-card-model { margin: 0; }
.customer-workspace-grid .product-card-meta { margin: 8px 0; }
.customer-workspace-grid .customer-product-actions { margin-top: auto; }
.customer-workspace-grid .customer-product-actions .product-card-action { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; }
.customer-workspace-list { display: grid; gap: 8px; min-width: 0; }
.customer-workspace-list .customer-product-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 0; min-width: 0; padding: 0; border: 1px solid #e2e6ea; border-radius: 10px; background: #fff; overflow: hidden; cursor: default; }
.customer-workspace-list .customer-product-card.active { background: #eef5ff; }
.customer-workspace-list .product-card-cover, .customer-workspace-list .product-card-cover-empty { width: 88px; height: 100%; min-height: 88px; aspect-ratio: auto; box-sizing: border-box; border: 0; border-radius: 0; object-fit: cover; }
.customer-workspace-list .product-card-content { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(160px, 1fr) minmax(180px, .9fr) minmax(250px, 1.3fr); gap: 12px; align-items: center; min-width: 0; padding: 10px 12px; }
.customer-workspace-list .product-card-model, .customer-workspace-list .product-card-title, .customer-workspace-list .product-card-meta { min-width: 0; margin: 0; }
.customer-workspace-list .customer-product-actions { min-width: 0; justify-content: flex-end; }
.customer-workspace-list .customer-product-actions .product-card-action { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 44px; }
.customer-product-delete { border-color: #d8a09b; background: #fff7f5; color: #8b1a15; }
.customer-workspace-back-btn { margin: 0 0 12px; padding: 6px 0; min-height: 44px; border: 0; background: transparent; color: #1b4d8f; font-weight: 600; }
.customer-product-view-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #eef5ff; font-weight: 600; }
.customer-clone-banner { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #9fc0ef; border-radius: 8px; background: #eef5ff; color: #1b4d8f; font-weight: 600; overflow-wrap: anywhere; }
.customer-live-status-live { background: #f0fff4; border-color: #79bd8e; color: #075; }
.customer-product-public-link { border: 1px solid #79bd8e; border-radius: 3px; background: #f0fff4; color: #075; font-size: 14px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.status-badge-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.status-badge { display: inline-flex; align-items: center; min-height: 26px; box-sizing: border-box; max-width: 100%; padding: 3px 8px; border: 1px solid #b9c2cc; border-radius: 999px; background: #f3f5f7; color: #49535d; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.review-status-draft { background: #f3f5f7; border-color: #cbd3da; color: #4e5965; }
.review-status-submitted { background: #eef5ff; border-color: #9fc0ef; color: #1b4d8f; }
.review-status-returned { background: #fff3e0; border-color: #e1ad70; color: #8a4b00; }
.review-status-accepted, .review-status-published { background: #f1f5fb; border-color: #b6c6dc; color: #31577c; }
.review-status-unknown { background: #f3f5f7; border-color: #b9c2cc; color: #49535d; }
.website-status-live { background: #f0fff4; border-color: #79bd8e; color: #075; }
.website-status-pending_publish { background: #eef5ff; border-color: #9fc0ef; color: #1b4d8f; }
.website-status-pending_unpublish { background: #fff3e0; border-color: #e1ad70; color: #8a4b00; }
.website-status-offline { background: #f3f5f7; border-color: #cbd3da; color: #4e5965; }
.website-status-unknown { border-style: dashed; background: #f8f9fa; color: #49535d; }
.website-status-unknown::before { content: "?"; display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 4px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }
.product-status-summary { margin: 4px 0 6px; }
.website-status-hint { margin: 0 0 8px; }
.customer-product-status { margin-top: 6px; }
.muted { color: #666; font-size: 14px; }
.error { color: #b00020; }
.msg { min-height: 1.2em; white-space: pre-line; }
.status-banner { margin: 4px 0 8px; padding: 8px 10px; border-radius: 6px; background: #eef5ff; color: #1b4d8f; font-weight: 600; }
.status-banner.status-returned { background: #fff3e0; color: #8a4b00; }
.status-banner.status-accepted { background: #eef5ff; color: #1b4d8f; }
.publish-controls { margin: 10px 0; padding: 10px 12px; border: 1px solid #d9e3f0; border-radius: 6px; background: #f8fbff; }
.publish-controls h3, .publish-controls p { margin: 4px 0 8px; }
.delete-product-controls { margin: 10px 0; padding: 10px 12px; border: 1px solid #f0c6c0; border-radius: 6px; background: #fff7f5; }
.delete-product-controls h3, .delete-product-controls p { margin: 4px 0 8px; }
#publish-btn { background: #f0fff4; border-color: #0a7; color: #075; }
#unpublish-btn { background: #fff5f0; border-color: #d98324; color: #8a4b00; }
#delete-product-btn { background: #fff1f0; border-color: #b3261e; color: #8b1a15; }
.return-reason { padding: 6px 10px; border-left: 3px solid #d98324; background: #fff8ef; white-space: pre-wrap; }
button { padding: 8px 12px; min-height: 44px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
textarea { resize: vertical; }
#return-btn { background: #fff5f0; border-color: #d98324; color: #8a4b00; }
#accept-btn { background: #f0fff4; border-color: #0a7; color: #0a7; }
.required-tag { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: #fff3e0; color: #8a4b00; margin-left: 6px; }
.optional-tag { display: inline-block; font-size: 12px; padding: 1px 6px; border-radius: 4px; background: #f0f0f0; color: #888; margin-left: 6px; }
.helper { display: block; font-size: 12px; color: #888; margin-top: 2px; }
.guide-toggle { cursor: pointer; color: #1b4d8f; font-size: 14px; padding: 8px 0; border-bottom: 1px solid #eee; margin-bottom: 10px; user-select: none; }
.guide-toggle:hover { color: #0a7; }
.guide-body { font-size: 14px; color: #333; margin-bottom: 12px; }
.guide-body ol { margin: 6px 0; padding-left: 20px; }
.guide-body ol li { margin: 4px 0; }
.guide-body .guide-note { display: block; padding: 8px 10px; border-radius: 6px; background: #fff8ef; color: #8a4b00; margin-top: 8px; font-weight: 600; }
.review-hint { font-size: 13px; color: #555; background: #f9f9f9; border-radius: 6px; padding: 10px 12px; margin-top: 10px; }
.review-hint p { margin: 4px 0; }
.review-hint ul { margin: 4px 0; padding-left: 18px; }
.review-hint ul li { margin: 2px 0; }
.media-guide { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 10px; }
.media-guide p { margin: 4px 0; }
.media-guide ul { margin: 4px 0; padding-left: 18px; }
.media-guide ul li { margin: 2px 0; }
.video-upload { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eee; }
.video-upload p { margin: 4px 0; font-size: 13px; color: #555; }
.media-video-error { margin: 6px 0 0; }
.dirty-hint { font-size: 14px; color: #8a4b00; margin-left: 8px; }
.media-item-label { font-size: 13px; color: #555; margin-bottom: 4px; }
#media-list img, #media-list video { display: block; max-width: 100%; height: auto; }
@media (max-width: 480px) {
  .top { flex-wrap: wrap; padding: 10px 12px; }
  .top button { margin-left: 0; }
  main { padding: 12px; }
  .panel, .layout, .product-card-content { min-width: 0; }
  .customer-workspace-view, .customer-workspace-view > #product-list-panel, .customer-workspace-grid, .customer-workspace-list { min-width: 0; }
  .product-card { grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
  .product-card-cover, .product-card-cover-empty { width: 72px; height: 72px; }
  .product-card-model { overflow-wrap: anywhere; }
  .product-card-action { width: 100%; }
  .customer-product-actions .product-card-action { width: auto; }
  .customer-workspace-grid { grid-template-columns: 1fr; gap: 16px; }
  .customer-workspace-grid .customer-product-card { width: 100%; box-sizing: border-box; }
  .customer-workspace-list .customer-product-card { grid-template-columns: 72px minmax(0, 1fr); width: 100%; box-sizing: border-box; }
  .customer-workspace-list .product-card-cover, .customer-workspace-list .product-card-cover-empty { width: 72px; min-height: 72px; height: 100%; }
  .customer-workspace-list .product-card-content { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px; }
  .customer-workspace-list .customer-product-actions { justify-content: flex-start; }
  .customer-product-workspace-toolbar { align-items: stretch; }
  .customer-product-display-switch { flex: 1 1 auto; }
  .customer-product-live-filter { flex: 1 1 100%; margin-left: 0; }
  .customer-product-review-filters { gap: 6px; }
  .customer-product-review-chip { flex: 0 1 auto; }
  .product-status-summary { align-items: flex-start; }
}
