.cs-showcase-app {
    --cs-border: #d0d7de;
    --cs-muted: #656d76;
    --cs-bg: #fff;
    --cs-subtle: #f6f8fa;
    --cs-text: #1f2328;
    color: var(--cs-text);
    background: var(--cs-bg);
    border: 1px solid var(--cs-border);
    border-radius: 8px;
    padding: 14px;
    max-width: 1200px;
}
.cs-showcase-toolbar { display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; }
.cs-showcase-tabs, .cs-showcase-actions { display:flex; gap:6px; flex-wrap:wrap; }
.cs-showcase-app .cs-showcase-actions .button { border:1px solid var(--cs-border); background:var(--cs-subtle); color:var(--cs-text); padding:7px 11px; border-radius:6px; cursor:pointer; min-height:36px; }
.cs-showcase-app .cs-showcase-actions .button:hover { filter:brightness(1.08); }
.cs-showcase-app .cs-showcase-actions .button-primary { background:#2271b1; border-color:#2271b1; color:#fff; font-weight:600; }
.cs-showcase-app .cs-showcase-actions .button:disabled { opacity:.6; cursor:wait; }
.cs-tab { border:1px solid var(--cs-border); background:var(--cs-subtle); color:var(--cs-text); padding:7px 11px; border-radius:6px; cursor:pointer; }
.cs-tab.is-active { background:#2271b1; border-color:#2271b1; color:#fff; }
.cs-showcase-status { min-height:22px; margin:10px 0 4px; color:var(--cs-muted); }
.cs-showcase-status.is-error, .cs-error { color:#b32d2e; }
.cs-showcase-status.is-success { color:#008a20; }
.cs-diagnostics { margin-top:12px; padding:12px; background:var(--cs-subtle); border:1px solid var(--cs-border); border-radius:6px; }
.cs-diagnostics-title { font-weight:700; margin-bottom:8px; }
.cs-check-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:7px 16px; }
.cs-check-item { display:flex; gap:7px; align-items:center; }
.cs-check-ok { color:#008a20; }
.cs-check-fail { color:#b32d2e; }
.cs-check-note { margin-top:8px; color:var(--cs-muted); }
.cs-quota-panel { margin-top:12px; padding-top:12px; border-top:1px solid var(--cs-border); }
.cs-quota-title { font-weight:700; }
.cs-quota-status { margin-top:5px; }
.cs-quota-status.is-warning { color:#b45309; font-weight:600; }
.cs-quota-status.is-error { color:#b32d2e; font-weight:600; overflow-wrap:anywhere; }
.cs-quota-form { display:grid; grid-template-columns:repeat(3,minmax(140px,1fr)) auto; gap:8px; align-items:end; margin-top:10px; }
.cs-quota-field { display:grid; gap:4px; }
.cs-quota-label { color:var(--cs-muted); font-size:11px; font-weight:600; }
.cs-quota-input { box-sizing:border-box; width:100%; min-height:36px; padding:6px 8px; border:1px solid var(--cs-border); border-radius:5px; background:var(--cs-bg); color:var(--cs-text); }
.cs-showcase-app .cs-quota-save { min-height:36px; padding:7px 12px; }
.cs-table-wrap { overflow:auto; max-height:70vh; border:1px solid var(--cs-border); border-radius:6px; }
.cs-table { width:100%; border-collapse:collapse; min-width:680px; }
.cs-table th, .cs-table td { padding:10px; border-bottom:1px solid var(--cs-border); text-align:left; vertical-align:middle; }
.cs-table thead th { position:sticky; top:0; background:var(--cs-subtle); z-index:1; }
.cs-table tbody tr:last-child td { border-bottom:0; }
.cs-sport-col { width:110px; white-space:nowrap; }
.cs-price-col { width:120px; text-align:right !important; white-space:nowrap; font-weight:600; }
.cs-actions-col { width:92px; text-align:right !important; white-space:nowrap; }
.cs-card-name { font-weight:600; }
.cs-card-meta { color:var(--cs-muted); font-size:12px; margin-top:3px; }
.cs-showcase-app .cs-icon-button { width:34px; height:34px; margin-left:5px; border:1px solid transparent; border-radius:5px; color:#fff !important; cursor:pointer; font:700 22px/1 Arial, sans-serif; padding:0; vertical-align:middle; }
.cs-showcase-app .cs-card-refresh { background:#2271b1 !important; border-color:#2271b1; }
.cs-showcase-app .cs-card-delete { background:#b32d2e !important; border-color:#b32d2e; }
.cs-showcase-app .cs-icon-button:hover { filter:brightness(1.15); }
.cs-showcase-app .cs-icon-button:focus-visible { outline:3px solid #72aee6; outline-offset:2px; }
.cs-showcase-app .cs-icon-button:disabled, .cs-showcase-app.is-bulk-repricing .cs-icon-button { opacity:.45; cursor:wait; }
.cs-empty { padding:30px 12px; text-align:center; color:var(--cs-muted); }
@media (prefers-color-scheme: dark) {
    .cs-showcase-app { --cs-border:#3d444d; --cs-muted:#9da7b3; --cs-bg:#151b23; --cs-subtle:#212830; --cs-text:#f0f6fc; }
}
@media (max-width: 700px) {
    .cs-showcase-app { padding:10px; }
    .cs-showcase-toolbar { align-items:stretch; }
    .cs-showcase-actions { width:100%; }
    .cs-showcase-actions .button { flex:1; }
    .cs-table-wrap { max-height:none; }
    .cs-quota-form { grid-template-columns:1fr; }
}
.cs-live-test-result { margin-top:12px; padding-top:12px; border-top:1px solid var(--cs-border); }
.cs-live-result-title { font-weight:700; margin-bottom:10px; }
.cs-live-result-title.is-active { color:#008a20; }
.cs-live-result-title.is-warning { color:#b32d2e; }
.cs-live-result-grid { display:grid; grid-template-columns:minmax(170px,220px) minmax(0,1fr); gap:6px 14px; }
.cs-live-result-label { font-weight:600; }
.cs-live-result-value { overflow-wrap:anywhere; }
.cs-live-samples-title { margin-top:10px; }
.cs-live-samples { margin:6px 0 0 22px; }
@media (max-width:700px) {
    .cs-live-result-grid { grid-template-columns:1fr; gap:2px; }
    .cs-live-result-value { margin-bottom:7px; }
}

/* Dealer shorthand lookup (v0.2.0). This is intentionally isolated from the Showcase table layout. */
.cs-lookup-panel { margin-bottom:14px; padding:13px; border:1px solid var(--cs-border); border-radius:7px; background:var(--cs-subtle); }
.cs-lookup-heading { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.cs-lookup-title { font-size:16px; font-weight:700; }
.cs-build-version { flex:0 0 auto; color:var(--cs-muted); font-size:11px; line-height:1.5; }
.cs-lookup-hint { margin-top:3px; color:var(--cs-muted); font-size:13px; }
.cs-lookup-hint code { padding:1px 4px; border:1px solid var(--cs-border); border-radius:4px; background:var(--cs-bg); color:var(--cs-text); }
.cs-lookup-form { display:flex; gap:8px; align-items:stretch; margin-top:10px; }
.cs-lookup-input { flex:1 1 420px; min-width:180px; min-height:40px; padding:8px 10px; border:1px solid var(--cs-border); border-radius:6px; background:var(--cs-bg); color:var(--cs-text); font-size:16px; }
.cs-lookup-input:focus { border-color:#2271b1; box-shadow:0 0 0 1px #2271b1; outline:0; }
.cs-lookback-field { flex:0 0 auto; display:flex; align-items:center; gap:6px; min-height:40px; padding:4px 8px; border:1px solid var(--cs-border); border-radius:6px; background:var(--cs-bg); }
.cs-lookback-label { color:var(--cs-muted); font-size:11px; font-weight:700; white-space:nowrap; }
.cs-lookback-select { min-height:30px; max-width:145px; border:0; background:var(--cs-bg); color:var(--cs-text); font-weight:700; cursor:pointer; }
.cs-lookback-select:focus { outline:2px solid #2271b1; outline-offset:1px; }
.cs-showcase-app .cs-lookup-submit { min-height:40px; padding:8px 16px; border:1px solid #2271b1; border-radius:6px; background:#2271b1; color:#fff; font-weight:700; cursor:pointer; }
.cs-showcase-app .cs-lookup-submit:disabled { opacity:.65; cursor:wait; }
.cs-lookup-result { margin-top:11px; padding-top:11px; border-top:1px solid var(--cs-border); }
.cs-lookup-query-line { display:flex; gap:8px; align-items:center; flex-wrap:wrap; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:13px; }
.cs-lookup-original { color:var(--cs-muted); }
.cs-lookup-arrow { color:var(--cs-muted); }
.cs-lookup-expanded { font-weight:700; }
.cs-lookback-result { margin-left:auto; padding:2px 7px; border:1px solid var(--cs-border); border-radius:999px; color:var(--cs-muted); font-family:inherit; font-size:11px; font-weight:700; }
.cs-lookup-message { margin-top:8px; font-weight:600; }
.cs-lookup-message.is-match { color:#008a20; }
.cs-lookup-message.is-no-price { color:#b26200; }
.cs-lookup-message.is-warning { color:#b32d2e; }
.cs-lookup-loading { color:var(--cs-muted); }
.cs-lookup-match { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-top:10px; padding:11px; border:1px solid #00a32a; border-radius:6px; background:var(--cs-bg); }
.cs-lookup-match.has-no-price { border-color:#dba617; }
.cs-lookup-match-title { font-weight:700; }
.cs-lookup-no-price { color:#b26200; font-weight:600; }
.cs-lookup-match-price { font-size:20px; font-weight:800; white-space:nowrap; }
.cs-lookup-candidate-heading { margin-top:12px; font-weight:700; }
.cs-lookup-candidates { margin:6px 0 0 22px; padding:0; }
.cs-lookup-candidate { padding:6px 8px; border-radius:5px; }
.cs-lookup-candidate.is-selected { background:rgba(0,163,42,.10); }
.cs-lookup-candidate.is-held-back { opacity:.72; }
.cs-lookup-candidate-title { font-weight:600; }
.cs-lookup-candidate-meta { margin-top:2px; color:var(--cs-muted); font-size:12px; }
.cs-lookup-diagnostics { margin-top:12px; border:1px solid var(--cs-border); border-radius:6px; background:var(--cs-bg); }
.cs-lookup-diagnostics > summary { padding:9px 11px; color:#72aee6; font-weight:700; cursor:pointer; }
.cs-lookup-diagnostics-body { padding:0 11px 11px; }
.cs-lookup-diagnostic-counts { color:var(--cs-muted); font-size:12px; }
.cs-lookup-diagnostic-heading { margin-top:11px; font-weight:700; }
.cs-lookup-diagnostic-attempts, .cs-lookup-diagnostic-rows { margin-top:5px; border-top:1px solid var(--cs-border); }
.cs-lookup-diagnostic-attempt, .cs-lookup-diagnostic-row { padding:7px 0; border-bottom:1px solid var(--cs-border); }
.cs-lookup-diagnostic-request { display:block; overflow-wrap:anywhere; color:var(--cs-text); }
.cs-lookup-diagnostic-row-title { font-weight:600; overflow-wrap:anywhere; }
.cs-lookup-diagnostic-meta { margin-top:2px; color:var(--cs-muted); font-size:12px; overflow-wrap:anywhere; }
.cs-pricing-diagnostic-facts { display:grid; gap:6px; margin-bottom:9px; }
.cs-pricing-diagnostic-fact { display:grid; grid-template-columns:minmax(150px,190px) minmax(0,1fr); gap:8px; align-items:start; }
.cs-pricing-diagnostic-label { font-size:12px; }
.cs-pricing-diagnostic-value { min-width:0; font-size:12px; overflow-wrap:anywhere; }
.cs-pricing-diagnostic-record-heading { display:flex; gap:7px; align-items:flex-start; }
.cs-pricing-diagnostic-status { flex:0 0 auto; padding:1px 5px; border-radius:999px; font-size:9px; font-weight:800; letter-spacing:.04em; }
.cs-pricing-diagnostic-record.is-accepted .cs-pricing-diagnostic-status { background:rgba(0,138,32,.14); color:#008a20; }
.cs-pricing-diagnostic-record.is-rejected .cs-pricing-diagnostic-status { background:rgba(179,45,46,.14); color:#b32d2e; }
.cs-lookup-no-price-evidence { max-width:850px; color:var(--cs-muted); font-size:12px; line-height:1.4; }
@media (max-width:700px) {
    .cs-lookup-form { flex-wrap:wrap; }
    .cs-lookup-input, .cs-lookback-field, .cs-showcase-app .cs-lookup-submit { width:100%; }
    .cs-lookback-field { justify-content:space-between; }
    .cs-lookback-select { flex:1 1 auto; max-width:none; }
    .cs-lookback-result { width:100%; margin-left:0; border:0; padding:2px 0 0; }
    .cs-lookup-match { align-items:flex-start; flex-direction:column; gap:5px; }
    .cs-pricing-diagnostic-fact { grid-template-columns:1fr; gap:1px; }
}

/* Exact candidate confirmation/add flow (v0.2.1). */
.cs-lookup-candidate { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.cs-lookup-candidate-copy { min-width:0; flex:1 1 auto; }
.cs-showcase-app .cs-candidate-use { flex:0 0 auto; min-width:130px; padding:7px 11px; border:1px solid #2271b1; border-radius:6px; background:#2271b1; color:#fff; font-weight:700; cursor:pointer; }
.cs-showcase-app .cs-candidate-use:disabled { opacity:.65; cursor:wait; }
.cs-lookup-add-status { margin-top:10px; padding:9px 10px; border:1px solid var(--cs-border); border-radius:6px; background:var(--cs-bg); font-weight:600; }
.cs-lookup-add-status.is-success { border-color:#00a32a; color:#008a20; }
.cs-lookup-add-status.is-error { border-color:#b32d2e; color:#b32d2e; }
.cs-lookup-add-status.is-busy { color:var(--cs-muted); }
@media (max-width:700px) {
    .cs-lookup-candidate { align-items:stretch; flex-direction:column; }
    .cs-showcase-app .cs-candidate-use { width:100%; }
}

/* CardSight compact evidence summary (v0.4.0). */
.cs-price-col { width:220px; min-width:205px; text-align:left !important; white-space:normal; font-weight:400; }
.cs-price-summary { min-width:190px; line-height:1.15; }
.cs-price-summary.is-lookup { min-width:230px; }
.cs-price-comp-row { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
.cs-price-comp-label { color:var(--cs-muted); font-size:9px; font-weight:800; letter-spacing:.08em; }
.cs-price-comp-value { font-size:19px; line-height:1; white-space:nowrap; }
.cs-price-comp-value-wrap { display:flex; align-items:baseline; justify-content:flex-end; gap:6px; flex-wrap:wrap; }
.cs-price-proxy-label { color:#9a3412; font-size:9px; font-weight:900; letter-spacing:.05em; white-space:nowrap; }
.cs-price-summary.is-lookup .cs-price-comp-value { font-size:25px; }
.cs-price-range { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin-top:6px; }
.cs-price-range-item { min-width:0; }
.cs-price-range-label { display:block; color:var(--cs-muted); font-size:8px; font-weight:800; letter-spacing:.06em; }
.cs-price-range-value { display:block; margin-top:1px; font-size:12px; white-space:nowrap; }
.cs-price-range-item.is-anomaly .cs-price-range-value { color:#b45309; font-weight:800; }
.cs-price-warning { margin-top:5px; padding-top:4px; border-top:1px solid var(--cs-border); font-size:11px; }
.cs-price-warning-summary { color:#b45309; font-weight:800; cursor:pointer; list-style:none; white-space:nowrap; }
.cs-price-warning-summary::-webkit-details-marker { display:none; }
.cs-price-warning-detail { margin-top:5px; color:var(--cs-text); line-height:1.3; overflow-wrap:anywhere; }
.cs-price-warning-meta { color:var(--cs-muted); font-size:10px; }
.cs-price-warning-title { margin-top:3px; }
.cs-price-warning-link { display:inline-block; margin-top:4px; }
.cs-completed-sales { margin-top:6px; padding-top:5px; border-top:1px solid var(--cs-border); font-size:11px; }
.cs-completed-sales-summary { color:#2271b1; font-weight:800; cursor:pointer; list-style:none; white-space:nowrap; }
.cs-completed-sales-summary::-webkit-details-marker { display:none; }
.cs-completed-sales-summary::before { content:'▸'; display:inline-block; margin-right:5px; font-size:15px; line-height:1; }
.cs-completed-sales[open] > .cs-completed-sales-summary::before { content:'▾'; }
.cs-completed-sales-list { margin-top:6px; display:grid; gap:7px; }
.cs-completed-sale { padding-top:6px; border-top:1px solid var(--cs-border); }
.cs-completed-sale:first-child { padding-top:0; border-top:0; }
.cs-completed-sale-meta { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.cs-completed-sale-price { white-space:nowrap; }
.cs-completed-sale-date { color:var(--cs-muted); font-size:10px; white-space:nowrap; }
.cs-completed-sale-title { margin-top:2px; line-height:1.3; overflow-wrap:anywhere; }
.cs-completed-sale-link { display:block; color:#2271b1; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:2px; }
.cs-lookup-match { display:grid; grid-template-columns:minmax(0,1fr) 250px; align-items:flex-start; }
.cs-lookup-match-title { min-width:0; flex:1 1 auto; }
.cs-lookup-match .cs-price-summary { width:250px; min-width:0; }
.cs-lookup-match > .cs-completed-sales.is-wide { grid-column:1 / -1; width:100%; }
.cs-showcase-sales-row > td { padding-top:0; }
.cs-showcase-sales-row .cs-completed-sales { margin-top:0; }
.cs-completed-sales.is-wide .cs-completed-sales-list { gap:0; }
.cs-completed-sales.is-wide .cs-completed-sale { display:grid; grid-template-columns:minmax(70px,90px) minmax(90px,110px) minmax(0,1fr); gap:12px; align-items:baseline; padding:7px 0; }
.cs-completed-sales.is-wide .cs-completed-sale-meta { display:contents; }
.cs-completed-sales.is-wide .cs-completed-sale-title { margin-top:0; }
.cs-live-test-result, .cs-live-test { display:none !important; }

/* Read-only experimental photo identification diagnostic code retained but UI parked in v0.5.2. */
.cs-image-panel { margin:0 0 14px; padding:13px; border:1px solid var(--cs-border); border-radius:7px; background:var(--cs-subtle); }
.cs-image-heading { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.cs-image-title { font-size:16px; font-weight:700; }
.cs-image-hint { margin-top:3px; color:var(--cs-muted); font-size:13px; line-height:1.4; }
.cs-image-badge { flex:0 0 auto; padding:2px 7px; border:1px solid var(--cs-border); border-radius:999px; color:var(--cs-muted); font-size:10px; font-weight:700; }
.cs-image-form { display:flex; gap:8px; align-items:stretch; margin-top:10px; }
.cs-image-input { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.cs-image-picker { display:flex; flex:1 1 auto; min-width:0; align-items:center; gap:10px; min-height:40px; padding:7px 10px; border:1px solid var(--cs-border); border-radius:6px; background:var(--cs-bg); cursor:pointer; }
.cs-image-picker:focus-within { border-color:#2271b1; box-shadow:0 0 0 1px #2271b1; }
.cs-image-picker-label { flex:0 0 auto; font-weight:700; color:#2271b1; }
.cs-image-file-name { min-width:0; overflow:hidden; color:var(--cs-muted); text-overflow:ellipsis; white-space:nowrap; }
.cs-showcase-app .cs-image-submit { min-height:40px; padding:8px 16px; border:1px solid #2271b1; border-radius:6px; background:#2271b1; color:#fff; font-weight:700; cursor:pointer; }
.cs-showcase-app .cs-image-submit:disabled { opacity:.65; cursor:wait; }
.cs-image-preview-wrap { margin-top:10px; padding:8px; border:1px solid var(--cs-border); border-radius:6px; background:var(--cs-bg); text-align:center; }
.cs-image-preview { display:block; width:auto; max-width:100%; max-height:360px; margin:auto; border-radius:4px; object-fit:contain; }
.cs-image-result { margin-top:10px; padding:10px; border:1px solid var(--cs-border); border-radius:6px; background:var(--cs-bg); }
.cs-image-result-summary { font-weight:700; }
.cs-image-request-id { display:block; margin-top:5px; overflow-wrap:anywhere; color:var(--cs-muted); font-size:10px; }
.cs-image-message { margin-top:6px; color:#b45309; font-size:12px; }
.cs-image-failure-diagnostic { margin-top:9px; padding-top:8px; border-top:1px solid var(--cs-border); }
.cs-image-failure-title { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.03em; }
.cs-image-failure-meta { margin-top:5px; color:var(--cs-muted); font-size:11px; }
.cs-image-loading, .cs-image-empty { color:var(--cs-muted); }
.cs-image-detections { display:grid; gap:8px; margin:9px 0 0; padding:0; list-style:none; }
.cs-image-detection { padding:9px 10px; border:1px solid var(--cs-border); border-left-width:4px; border-radius:5px; }
.cs-image-detection.is-exact-card { border-left-color:#00a32a; }
.cs-image-detection.is-set-level { border-left-color:#dba617; }
.cs-image-detection.is-unidentified { border-left-color:#b32d2e; }
.cs-image-detection-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.cs-image-level { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.cs-image-confidence { padding:1px 6px; border-radius:999px; background:var(--cs-subtle); color:var(--cs-muted); font-size:10px; font-weight:700; }
.cs-image-confidence.is-high { color:#008a20; }
.cs-image-confidence.is-medium { color:#b45309; }
.cs-image-confidence.is-low { color:#b32d2e; }
.cs-image-detection-title { margin-top:5px; font-weight:700; overflow-wrap:anywhere; }
.cs-image-detection-meta, .cs-image-verification { margin-top:3px; color:var(--cs-muted); font-size:11px; line-height:1.35; }
.cs-image-card-id { display:block; margin-top:4px; overflow-wrap:anywhere; color:var(--cs-text); font-size:10px; }
.cs-image-readonly { margin-top:9px; padding-top:8px; border-top:1px solid var(--cs-border); color:var(--cs-muted); font-size:11px; font-weight:600; }

@media (max-width:700px) {
    .cs-image-heading, .cs-image-detection-heading { align-items:flex-start; flex-direction:column; }
    .cs-image-form { flex-wrap:wrap; }
    .cs-image-picker, .cs-showcase-app .cs-image-submit { width:100%; }
    .cs-image-preview { max-height:260px; }
}

@media (prefers-color-scheme: dark) {
    .cs-price-range-item.is-anomaly .cs-price-range-value,
    .cs-price-warning-summary { color:#f6ad55; }
    .cs-completed-sales-summary, .cs-completed-sale-link { color:#72b7f2; }
    .cs-price-proxy-label { color:#fdba74; }
    .cs-shorthand-dictionary > summary { border-color:#d6a52d; background:#4b3907; color:#ffe49a; }
    .cs-shorthand-dictionary > summary:hover { background:#5a4509; }
    .cs-pricing-diagnostic-record.is-accepted .cs-pricing-diagnostic-status { color:#7ee787; }
    .cs-pricing-diagnostic-record.is-rejected .cs-pricing-diagnostic-status { color:#ff7b72; }
}
@media (max-width:700px) {
    .cs-lookup-match { grid-template-columns:1fr; }
    .cs-price-col { width:205px; min-width:195px; }
    .cs-lookup-match .cs-price-summary { flex:1 1 auto; width:100%; min-width:0; }
    .cs-lookup-match > .cs-completed-sales.is-wide { grid-column:1; }
    .cs-completed-sales.is-wide .cs-completed-sale { display:block; }
    .cs-completed-sales.is-wide .cs-completed-sale-meta { display:flex; }
    .cs-completed-sales.is-wide .cs-completed-sale-title { margin-top:2px; }
}

/* Runtime-derived shorthand cheat sheet; intentionally obvious (v0.4.3). */
.cs-shorthand-dictionary { margin-top:10px; }
.cs-shorthand-dictionary > summary { display:block; box-sizing:border-box; width:100%; padding:9px 12px; border:1px solid #d39b00; border-radius:6px; background:#fff3cd; color:#5f4100; font-size:12px; font-weight:800; letter-spacing:.02em; cursor:pointer; }
.cs-shorthand-dictionary > summary:hover { background:#ffe9a6; }
.cs-shorthand-dictionary > summary::before { content:'▸ '; }
.cs-shorthand-dictionary[open] > summary::before { content:'▾ '; }
.cs-dictionary-open { display:none; }
.cs-shorthand-dictionary[open] .cs-dictionary-closed { display:none; }
.cs-shorthand-dictionary[open] .cs-dictionary-open { display:inline; }
.cs-shorthand-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:4px 12px; margin-top:7px; }
.cs-shorthand-entry { display:grid; grid-template-columns:minmax(46px,auto) 12px 1fr; gap:4px; align-items:baseline; min-width:0; font-size:11px; line-height:1.25; }
.cs-shorthand-entry code { width:max-content; max-width:100%; padding:1px 4px; border:1px solid var(--cs-border); border-radius:3px; background:var(--cs-bg); color:var(--cs-text); overflow-wrap:anywhere; }
.cs-shorthand-entry small { color:var(--cs-muted); font-size:10px; }
@media (max-width:700px) { .cs-shorthand-grid { grid-template-columns:1fr 1fr; } }
@media (max-width:460px) { .cs-shorthand-grid { grid-template-columns:1fr; } }

/* Direct matched-card add action (v0.4.2). */
.cs-lookup-match-copy { min-width:0; flex:1 1 auto; display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.cs-showcase-app .cs-lookup-match-add { min-width:145px; }
.cs-candidate-selected-label { flex:0 0 auto; color:var(--cs-muted); font-size:11px; font-weight:700; white-space:nowrap; }
@media (max-width:700px) {
    .cs-lookup-match-copy { width:100%; }
    .cs-showcase-app .cs-lookup-match-add { width:100%; }
}


/* v0.6.3-D2 administrator-only Stadium runtime evidence */
.cs-lookup-diagnostic-json-details{margin-top:8px;border-top:1px solid #dcdcde;padding-top:6px}
.cs-lookup-diagnostic-json-details summary{cursor:pointer;font-weight:600;color:var(--cs-text)}
.cs-lookup-diagnostic-json{max-height:420px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--cs-subtle);color:var(--cs-text);border:1px solid var(--cs-border);border-radius:4px;padding:10px;margin:7px 0 0;font-size:12px;line-height:1.45}


/* Standard-phone card-show layout (v0.6.3-D7).
 * Presentation only: desktop keeps the validated table and lookup layout. */
@media (max-width:782px) {
    .cs-showcase-app,
    .cs-showcase-app * { box-sizing:border-box; }
    .cs-showcase-app { width:100%; max-width:none; padding:8px; overflow:hidden; }
    .cs-lookup-panel { margin-bottom:10px; padding:10px; }
    .cs-lookup-heading { align-items:center; }
    .cs-lookup-title { font-size:18px; line-height:1.2; }
    .cs-build-version { font-size:10px; }
    .cs-lookup-hint { font-size:12px; line-height:1.45; }
    .cs-shorthand-dictionary > summary { display:flex; align-items:center; min-height:44px; padding:10px 12px; }
    .cs-lookup-form { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
    .cs-lookup-input,
    .cs-showcase-app .cs-lookup-submit { width:100%; min-width:0; min-height:48px; }
    .cs-showcase-app .cs-lookup-submit { font-size:15px; }
    .cs-lookup-query-line { gap:5px 7px; line-height:1.35; }
    .cs-lookup-message { line-height:1.4; }
    .cs-lookup-match { display:grid; grid-template-columns:minmax(0,1fr); align-items:flex-start; padding:10px; gap:10px; border-radius:8px; }
    .cs-lookup-match-title { font-size:15px; line-height:1.35; overflow-wrap:anywhere; }
    .cs-lookup-match .cs-price-summary { width:100%; }
    .cs-price-summary.is-lookup .cs-price-comp-value { font-size:28px; }
    .cs-showcase-app .cs-lookup-match-add,
    .cs-showcase-app .cs-candidate-use { min-height:46px; }
    .cs-lookup-candidates { margin:8px 0 0; padding-left:20px; }
    .cs-lookup-candidate { margin-bottom:8px; padding:10px; border:1px solid var(--cs-border); background:var(--cs-bg); }
    .cs-lookup-candidate:last-child { margin-bottom:0; }
    .cs-lookup-candidate-title { line-height:1.35; overflow-wrap:anywhere; }
    .cs-candidate-selected-label { align-self:flex-start; white-space:normal; }
    .cs-lookup-diagnostics > summary { min-height:44px; display:flex; align-items:center; }
    .cs-lookup-diagnostic-json { max-height:55vh; font-size:11px; }

    .cs-showcase-toolbar { display:grid; grid-template-columns:minmax(0,1fr); gap:9px; align-items:stretch; }
    .cs-showcase-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; gap:6px; overflow:visible; padding:0; }
    .cs-tab { width:100%; min-width:0; min-height:44px; padding:9px 6px; font-size:12px; }
    .cs-showcase-actions { display:grid; grid-template-columns:1.25fr .8fr 1fr; width:100%; gap:8px; }
    .cs-showcase-app .cs-showcase-actions .button { flex:none; width:100%; min-width:0; min-height:46px; margin:0; padding:8px 6px; white-space:normal; line-height:1.15; }
    .cs-showcase-status { margin:8px 0 6px; line-height:1.35; }

    .cs-table-wrap { max-height:none; overflow:visible; border:0; border-radius:0; }
    .cs-table { display:block; width:100%; min-width:0; border-collapse:separate; }
    .cs-table thead { display:none; }
    .cs-table tbody { display:block; width:100%; }
    .cs-table .cs-card-row { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:'sport actions' 'card card' 'price price'; gap:10px 12px; width:100%; margin:0 0 12px; padding:12px; border:1px solid var(--cs-border); border-radius:9px; background:var(--cs-bg); }
    .cs-table .cs-card-row.has-completed-sales { margin-bottom:0; border-bottom-right-radius:0; border-bottom-left-radius:0; }
    .cs-table .cs-card-row > td { display:block; width:auto; min-width:0; padding:0; border:0; }
    .cs-table .cs-card-row > td::before { display:none; }
    .cs-table .cs-sport-col { grid-area:sport; align-self:center; width:auto; color:var(--cs-muted); font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; white-space:normal; }
    .cs-table .cs-card-col { grid-area:card; }
    .cs-table .cs-price-col { grid-area:price; width:auto; min-width:0; padding-top:10px; border-top:1px solid var(--cs-border); }
    .cs-table .cs-actions-col { grid-area:actions; display:flex; justify-content:flex-end; align-items:center; width:auto; white-space:nowrap; }
    .cs-card-name { font-size:17px; line-height:1.25; }
    .cs-card-meta { margin-top:5px; font-size:13px; line-height:1.4; overflow-wrap:anywhere; }
    .cs-table .cs-price-summary { width:100%; min-width:0; }
    .cs-table .cs-price-comp-value { font-size:27px; }
    .cs-table .cs-price-range { gap:10px; }
    .cs-table .cs-price-range-label { font-size:9px; }
    .cs-table .cs-price-range-value { font-size:14px; }
    .cs-showcase-app .cs-icon-button { width:46px; height:46px; margin-left:8px; border-radius:7px; font-size:24px; }
    .cs-showcase-app .cs-icon-button:first-child { margin-left:0; }

    .cs-table .cs-showcase-sales-row { display:block; width:100%; margin:0 0 12px; }
    .cs-table .cs-showcase-sales-row > td { display:block; width:100%; padding:0 12px 12px; border:1px solid var(--cs-border); border-top:0; border-bottom-right-radius:9px; border-bottom-left-radius:9px; background:var(--cs-bg); }
    .cs-showcase-sales-row .cs-completed-sales { margin:0; padding-top:10px; }
    .cs-completed-sales-summary { display:flex; align-items:center; min-height:38px; white-space:normal; line-height:1.3; }
    .cs-completed-sales.is-wide .cs-completed-sale { display:block; padding:9px 0; }
    .cs-completed-sales.is-wide .cs-completed-sale-meta { display:flex; }
    .cs-completed-sales.is-wide .cs-completed-sale-title { margin-top:4px; }
    .cs-completed-sale-title { font-size:12px; }
    .cs-empty { padding:24px 10px; }
}

@media (max-width:430px) {
    .cs-showcase-app { padding:6px; }
    .cs-lookup-panel { padding:9px; }
    .cs-lookup-heading { gap:8px; }
    .cs-lookup-title { font-size:17px; }
    .cs-showcase-actions { grid-template-columns:1.2fr .75fr 1fr; gap:6px; }
    .cs-showcase-app .cs-showcase-actions .button { font-size:12px; }
    .cs-table .cs-card-row { padding:11px; }
    .cs-card-name { font-size:16px; }
    .cs-table .cs-price-comp-value { font-size:25px; }
}

/* Compact mobile workflow (v0.6.3-D8).
 * Mobile separates Lookup and Showcase, then keeps Showcase cards collapsed
 * until the dealer asks for details. Desktop behavior is unchanged. */
.cs-mobile-view-switch { display:none; }
.cs-tab-icon, .cs-sport-icon { display:none; }
.cs-card-expand { display:none; background:#4b5563 !important; border-color:#4b5563 !important; }

@media (max-width:782px) {
    .cs-mobile-view-switch {
        position:sticky;
        top:46px;
        z-index:20;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:6px;
        margin:0 0 8px;
        padding:5px;
        border:1px solid var(--cs-border);
        border-radius:9px;
        background:var(--cs-bg);
        box-shadow:0 2px 8px rgba(0,0,0,.12);
    }
    .cs-mobile-view-button {
        display:flex;
        align-items:center;
        justify-content:center;
        gap:5px;
        min-width:0;
        min-height:44px;
        border:1px solid transparent;
        border-radius:7px;
        background:var(--cs-subtle);
        color:var(--cs-text);
        font-weight:700;
        cursor:pointer;
    }
    .cs-mobile-view-button.is-active {
        border-color:#2271b1;
        background:#2271b1;
        color:#fff;
    }
    .cs-mobile-showcase-count {
        display:inline-flex;
        align-items:center;
        justify-content:center;
        min-width:22px;
        height:22px;
        margin-left:4px;
        padding:0 6px;
        border-radius:999px;
        background:rgba(255,255,255,.18);
        font-size:11px;
        line-height:1;
    }
    .cs-mobile-view-button:not(.is-active) .cs-mobile-showcase-count { background:var(--cs-border); }
    .cs-showcase-app[data-mobile-active-view="lookup"] .cs-showcase-view { display:none; }
    .cs-showcase-app[data-mobile-active-view="showcase"] .cs-lookup-panel { display:none; }

    .cs-showcase-view { min-width:0; }
    .cs-showcase-tabs { grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
    .cs-tab { min-height:42px; padding:5px 3px; font-size:20px; line-height:1; }
    .cs-tab-label { display:none; }
    .cs-tab-icon { display:inline; }
    .cs-tab[data-sport="all"] .cs-tab-icon { font-size:12px; font-weight:800; }
    .cs-showcase-actions { grid-template-columns:1.15fr .75fr 1fr; }
    .cs-showcase-app .cs-showcase-actions .button { min-height:42px; }

    .cs-table .cs-card-row,
    .cs-table .cs-card-row.has-completed-sales {
        display:grid;
        grid-template-columns:30px minmax(0,1fr) auto auto;
        grid-template-areas:'sport card price actions';
        align-items:center;
        gap:7px;
        margin:0 0 7px;
        padding:8px;
        border-radius:8px;
    }
    .cs-table .cs-card-row.has-completed-sales { border-bottom-right-radius:8px; border-bottom-left-radius:8px; }
    .cs-table .cs-sport-col {
        grid-area:sport;
        display:flex;
        align-items:center;
        justify-content:center;
        width:30px;
        min-height:38px;
        font-size:20px;
        letter-spacing:0;
        text-transform:none;
    }
    .cs-table .cs-sport-icon { display:inline; line-height:1; }
    .cs-table .cs-sport-name { display:none; }
    .cs-table .cs-card-col { grid-area:card; min-width:0; }
    .cs-card-name {
        max-width:100%;
        overflow:hidden;
        font-size:14px;
        line-height:1.2;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .cs-card-meta {
        max-width:100%;
        margin-top:2px;
        overflow:hidden;
        font-size:11px;
        line-height:1.25;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
    .cs-table .cs-price-col {
        grid-area:price;
        width:auto;
        min-width:58px;
        padding:0;
        border:0;
    }
    .cs-table .cs-price-summary { display:block; width:auto; }
    .cs-table .cs-price-comp-row { display:block; text-align:right; }
    .cs-table .cs-price-comp-label,
    .cs-table .cs-price-range,
    .cs-table .cs-price-warning { display:none; }
    .cs-table .cs-price-comp-value { font-size:18px; line-height:1.1; white-space:nowrap; }
    .cs-table .cs-actions-col { grid-area:actions; width:auto; }
    .cs-showcase-app .cs-card-expand {
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:38px;
        height:38px;
        margin:0;
        font-size:23px;
    }
    .cs-showcase-app .cs-card-refresh,
    .cs-showcase-app .cs-card-delete { display:none; }

    .cs-table .cs-card-row.is-expanded {
        grid-template-columns:30px minmax(0,1fr) auto;
        grid-template-areas:
            'sport card actions'
            'price price price';
        gap:9px;
        padding:10px;
        border-bottom-right-radius:0;
        border-bottom-left-radius:0;
    }
    .cs-table .cs-card-row.is-expanded .cs-card-name {
        overflow:visible;
        font-size:16px;
        white-space:normal;
    }
    .cs-table .cs-card-row.is-expanded .cs-card-meta {
        margin-top:5px;
        overflow:visible;
        font-size:12px;
        line-height:1.4;
        white-space:normal;
    }
    .cs-table .cs-card-row.is-expanded .cs-price-col {
        padding-top:9px;
        border-top:1px solid var(--cs-border);
    }
    .cs-table .cs-card-row.is-expanded .cs-price-summary { width:100%; }
    .cs-table .cs-card-row.is-expanded .cs-price-comp-row { display:flex; text-align:left; }
    .cs-table .cs-card-row.is-expanded .cs-price-comp-label,
    .cs-table .cs-card-row.is-expanded .cs-price-range,
    .cs-table .cs-card-row.is-expanded .cs-price-warning { display:flex; }
    .cs-table .cs-card-row.is-expanded .cs-price-warning { display:block; }
    .cs-table .cs-card-row.is-expanded .cs-price-comp-value { font-size:25px; }
    .cs-table .cs-card-row.is-expanded .cs-actions-col { display:flex; gap:6px; }
    .cs-showcase-app .cs-card-row.is-expanded .cs-card-refresh,
    .cs-showcase-app .cs-card-row.is-expanded .cs-card-delete {
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:38px;
        height:38px;
        margin:0;
        font-size:22px;
    }
    .cs-table .cs-showcase-sales-row { display:none; margin:0 0 7px; }
    .cs-table .cs-showcase-sales-row.is-expanded { display:block; }
    .cs-table .cs-showcase-sales-row.is-expanded > td {
        padding:0 10px 10px;
        border-bottom-right-radius:8px;
        border-bottom-left-radius:8px;
    }
    .cs-showcase-sales-row .cs-completed-sales { padding-top:7px; }
    .cs-showcase-status { min-height:0; margin:6px 0; font-size:12px; }
}

@media (max-width:430px) {
    .cs-mobile-view-switch { top:46px; }
    .cs-showcase-actions { grid-template-columns:1.1fr .72fr 1fr; }
    .cs-table .cs-card-row,
    .cs-table .cs-card-row.has-completed-sales { grid-template-columns:28px minmax(0,1fr) auto auto; }
    .cs-table .cs-sport-col { width:28px; font-size:19px; }
    .cs-card-name { font-size:13px; }
    .cs-card-meta { font-size:10px; }
    .cs-table .cs-price-comp-value { font-size:17px; }
}

/* Mobile viewport use and surfaced per-card repricing (v0.6.3-D9).
 * Keep D8's compact workflow, but let the admin app occupy the available
 * phone canvas and keep each card's CardSight refresh one tap away. */
@media (max-width:782px) {
    body.tools_page_cardsnark-showcase #wpcontent { padding-left:0; }
    body.tools_page_cardsnark-showcase #wpbody-content { padding-bottom:0; }
    body.tools_page_cardsnark-showcase .wrap { margin:0; }
    body.tools_page_cardsnark-showcase .wrap > h1 { display:none; }
    body.tools_page_cardsnark-showcase .cs-showcase-app {
        width:100%;
        max-width:none;
        min-height:calc(100vh - 46px);
        min-height:calc(100dvh - 46px);
        margin:0;
        padding:5px;
        border:0;
        border-radius:0;
    }

    /* D8 deliberately hid both row actions. D9 keeps delete behind expansion
       but surfaces repricing beside the details chevron. */
    .cs-showcase-app .cs-card-refresh {
        display:inline-flex;
        align-items:center;
        justify-content:center;
        width:38px;
        height:38px;
        margin:0;
        font-size:22px;
    }
    .cs-showcase-app .cs-card-delete { display:none; }
}


/* Mobile sport-filter visibility repair (v0.6.3-D10).
 * Some front-end themes render the sticky Lookup/Showcase switch over the
 * following toolbar. Keep the same compact design but return the switch to
 * normal document flow and explicitly protect the five filter buttons. */
@media (max-width:782px) {
    .cs-mobile-view-switch {
        position:relative;
        top:auto;
        z-index:2;
    }
    .cs-showcase-toolbar {
        position:relative;
        z-index:1;
    }
    .cs-showcase-tabs {
        display:grid !important;
        grid-template-columns:repeat(5,minmax(0,1fr)) !important;
        width:100% !important;
        min-height:42px;
        height:auto !important;
        margin:0 0 8px !important;
        padding:0 !important;
        overflow:visible !important;
        position:relative;
    }
    .cs-showcase-tabs .cs-tab {
        display:flex !important;
        align-items:center;
        justify-content:center;
        visibility:visible !important;
        opacity:1 !important;
        width:100% !important;
        min-width:0 !important;
        min-height:42px !important;
        height:42px !important;
        max-height:none !important;
        margin:0 !important;
        position:relative !important;
        top:auto !important;
        transform:none !important;
        overflow:visible !important;
    }
}


/* Showcase price sorting and compact dealer labels (v0.6.3-D11). */
.cs-showcase-status-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.cs-showcase-status-row .cs-showcase-status { flex:1 1 auto; }
.cs-sort-price {
    flex:0 0 auto;
    min-width:88px;
    font-weight:700;
    white-space:nowrap;
}
.cs-sort-price-arrow { display:inline-block; min-width:1em; font-size:1.15em; line-height:1; }
.cs-card-meta-short { display:none; }
.cs-card-meta-full { display:block; }

@media (max-width:782px) {
    .cs-showcase-status-row { margin:4px 0 7px; }
    .cs-showcase-status-row .cs-showcase-status { margin:0; }
    .cs-sort-price {
        min-width:76px;
        min-height:36px;
        padding:4px 9px;
        font-size:12px;
    }
    .cs-card-meta-short { display:block; }
    .cs-card-meta-full { display:none; }
    .cs-table .cs-card-row.is-expanded .cs-card-meta-short { display:none; }
    .cs-table .cs-card-row.is-expanded .cs-card-meta-full { display:block; }
}

/* D11R3: make the native lookup-history controls easier to hit. */
.cs-lookup-input::-webkit-search-cancel-button,
.cs-lookup-input::-webkit-calendar-picker-indicator {
    cursor:pointer;
    transform:scale(1.4);
    transform-origin:center;
    margin-inline:5px;
}


/* D11R14 priced-first evidence control */
.cs-showcase-status-row { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:8px; }
.cs-showcase-status-row .cs-showcase-status { flex:1 1 auto; margin:0; }
.cs-showcase-app .cs-sort-price { flex:0 0 auto; min-height:36px; padding:7px 11px; border:1px solid #2271b1; border-radius:6px; background:#2271b1; color:#fff; font-weight:700; cursor:pointer; }
.cs-showcase-app .cs-sort-price:not(:disabled):hover { filter:brightness(1.1); }
.cs-showcase-app .cs-sort-price:focus-visible { outline:3px solid #72aee6; outline-offset:2px; }
.cs-showcase-app .cs-sort-price:disabled { border-color:var(--cs-border); background:var(--cs-subtle); color:var(--cs-muted); opacity:1; cursor:default; }
.cs-sort-price-arrow { display:inline-block; min-width:1em; text-align:center; }
@media (max-width:782px) {
    .cs-showcase-status-row { align-items:stretch; flex-direction:column; }
    .cs-showcase-app .cs-sort-price { width:100%; min-height:44px; }
}
