/* JewelryScene project styles. Built on FDS tokens; FDS files themselves are
   vendored in /assets/fds and never edited. Class prefix: jsc-. */

.jsc-skip { position: absolute; left: -999px; top: var(--fds-space-2); background: var(--fds-bg-panel); padding: var(--fds-space-2) var(--fds-space-3); border-radius: var(--fds-radius-sm); z-index: 10; }
.jsc-skip:focus { left: var(--fds-space-2); }

.jsc-topbar { background: var(--fds-bg-panel); border-bottom: 1px solid var(--fds-border); }
/* The bar spans the window: logo at the left edge, languages at the right, whatever the width of the page below. */
.jsc-topbar-inner { min-height: var(--fds-topbar); padding: var(--fds-space-2) var(--fds-space-5); display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; }
.jsc-brand { display: flex; align-items: center; gap: var(--fds-space-3); text-decoration: none; flex-wrap: wrap; }
.jsc-logo { display: block; height: 36px; width: auto; }

.jsc-languages { display: flex; gap: var(--fds-space-1); }
.jsc-languages a { min-height: 36px; padding: 0 var(--fds-space-3); display: inline-flex; align-items: center; border-radius: var(--fds-radius-md); color: var(--fds-text-secondary); font-size: .875rem; text-decoration: none; white-space: nowrap; }
.jsc-languages a:hover { background: var(--fds-bg-muted); color: var(--fds-text-primary); }
.jsc-languages a[aria-current] { background: var(--fds-action-primary); color: var(--fds-text-inverse); }

.jsc-main { max-width: 960px; margin: 0 auto; padding: var(--fds-space-10) var(--fds-space-5) var(--fds-space-8); }
.jsc-entrance { padding: clamp(1rem, 4vw, 4rem); }
.jsc-hero {
  max-width: 80rem; min-height: min(76vh, 48rem); margin: auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center; padding: clamp(2rem, 6vw, 6rem); overflow: hidden;
  background: var(--fds-gray-900); color: var(--fds-text-inverse);
  border-radius: var(--fds-radius-xl);
}
.jsc-hero h1 { margin: 0; color: inherit; font: 500 clamp(2.25rem, 4.5vw, 4.5rem)/1.2 Georgia, "Songti SC", serif; text-wrap: balance; }
.jsc-lead { max-width: 34rem; margin: var(--fds-space-5) 0 0; line-height: 1.8; color: var(--fds-gray-300); }
.jsc-entrance .fds-btn-primary { background: var(--fds-white); color: var(--fds-gray-900); min-height: 44px; }
.jsc-ring-study { position: relative; aspect-ratio: 1.4; }
.jsc-ring-study::before, .jsc-ring-study::after {
  content: ""; position: absolute; width: 72%; height: 55%; left: 4%; top: 16%;
  border-radius: 50%; transform: rotate(-34deg);
  background: conic-gradient(from 35deg, var(--fds-gray-500), var(--fds-white), var(--fds-gray-700), var(--fds-gray-300), var(--fds-gray-500));
  mask: radial-gradient(ellipse, transparent 58%, black 59%);
}
.jsc-ring-study::after { left: 41%; top: 46%; width: 54%; height: 36%; transform: rotate(32deg); }
@media (max-width: 700px) {
  .jsc-hero { grid-template-columns: 1fr; min-height: 0; gap: var(--fds-space-5); }
  .jsc-ring-study { width: min(80%, 20rem); justify-self: end; }
}
@media (max-width: 480px) {
  .jsc-topbar-inner, .jsc-main { padding-left: var(--fds-space-4); padding-right: var(--fds-space-4); }
  .jsc-main { padding-top: var(--fds-space-6); }
}

/* --- Workspace (M1) --- */
.jsc-hero-actions { margin: var(--fds-space-6) 0 0; }
.jsc-work { padding-top: var(--fds-space-6); }
.jsc-muted { color: var(--fds-text-secondary); }
.jsc-card { padding: var(--fds-space-6); }
.jsc-signin { max-width: 28rem; margin: var(--fds-space-8) auto; display: grid; gap: var(--fds-space-3); justify-items: start; }
.jsc-signin > p { margin: 0; }

.jsc-workbar { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; margin-bottom: var(--fds-space-4); }
.jsc-workbar-title { display: flex; align-items: center; gap: var(--fds-space-3); flex-wrap: wrap; min-width: 0; }
.jsc-workbar-title h1 { margin: 0; overflow-wrap: anywhere; }
.jsc-workbar-user { display: flex; align-items: center; gap: var(--fds-space-2); flex-wrap: wrap; }
.jsc-switcher { width: auto; max-width: 16rem; }
.jsc-tabs { margin-bottom: var(--fds-space-6); }
.jsc-tabs .fds-tab { text-decoration: none; }

.jsc-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; margin-bottom: var(--fds-space-4); }
.jsc-section-title { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.jsc-gap { margin: var(--fds-space-8) 0 var(--fds-space-4); }
.jsc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--fds-space-3); }
.jsc-row { display: flex; align-items: center; gap: var(--fds-space-3); padding: var(--fds-space-4) var(--fds-space-5); flex-wrap: wrap; }
.jsc-row-main { flex: 1 1 12rem; min-width: 0; display: grid; gap: var(--fds-space-1); overflow-wrap: anywhere; }
.jsc-row-actions { display: flex; gap: var(--fds-space-2); flex-wrap: wrap; }
.jsc-member { align-items: flex-start; }
.jsc-grants { list-style: none; margin: var(--fds-space-1) 0 0; padding: 0; display: flex; gap: var(--fds-space-2) var(--fds-space-4); flex-wrap: wrap; }
.jsc-grants li { display: inline-flex; align-items: center; gap: var(--fds-space-2); }
.jsc-link { border: 0; background: none; padding: 0; min-height: 26px; color: var(--fds-text-secondary); font-size: .8125rem; text-decoration: underline; cursor: pointer; }
.jsc-link:hover { color: var(--fds-red-700); }
.jsc-audit-row { display: flex; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; padding: var(--fds-space-3) 0; border-bottom: 1px solid var(--fds-border); }

.jsc-notices { position: fixed; z-index: 200; left: 50%; bottom: var(--fds-space-5); transform: translateX(-50%); width: min(32rem, calc(100vw - 2rem)); display: grid; gap: var(--fds-space-2); pointer-events: none; }
.jsc-notice { margin: 0; padding: var(--fds-space-3) var(--fds-space-4); border-radius: var(--fds-radius-md); box-shadow: var(--fds-shadow-2); }

.jsc-dialog { width: min(30rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: var(--fds-radius-xl); box-shadow: var(--fds-shadow-3); color: var(--fds-text-primary); }
.jsc-dialog::backdrop { background: rgba(17, 24, 39, .46); }
.jsc-form { display: grid; gap: var(--fds-space-4); padding: var(--fds-space-6); }
.jsc-form h2 { margin: 0; overflow-wrap: anywhere; }
.jsc-form p { margin: 0; }
.jsc-field { display: grid; gap: var(--fds-space-1); font-size: .875rem; font-weight: 550; }
.jsc-field[hidden] { display: none; }
.jsc-form-error { margin: 0; color: var(--fds-red-700); font-size: .875rem; }
.jsc-form-actions { display: flex; justify-content: flex-end; gap: var(--fds-space-2); flex-wrap: wrap; }
.jsc-btn-danger { background: var(--fds-red-700); color: var(--fds-text-inverse); }

@media (max-width: 480px) {
  .jsc-row { padding: var(--fds-space-4); }
  .jsc-row-actions, .jsc-row-actions .fds-btn, .jsc-form-actions .fds-btn { flex: 1 1 auto; }
  .jsc-form { padding: var(--fds-space-5); }
}

a.fds-btn { text-decoration: none; }

/* --- Store layout viewer (M2) --- */
.jsc-wide { max-width: 1280px; }
.jsc-store-layout { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: var(--fds-space-5); align-items: start; margin-bottom: var(--fds-space-5); }
.jsc-stage-wrap { position: relative; min-width: 0; }
.jsc-stage { position: relative; height: min(62vh, 560px); min-height: 280px; border: 1px solid var(--fds-border); border-radius: var(--fds-radius-lg); overflow: hidden; background: var(--fds-bg-muted); }
.jsc-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.jsc-stage-status, .jsc-stage > .jsc-form-error { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: var(--fds-space-4); text-align: center; }
.jsc-modes { position: absolute; z-index: 2; top: var(--fds-space-3); left: var(--fds-space-3); background: var(--fds-bg-panel); }
.jsc-modes button { padding: 0 var(--fds-space-4); cursor: pointer; font-size: .875rem; }
.jsc-host-list { min-width: 0; }
.jsc-hosts { list-style: none; margin: var(--fds-space-3) 0 0; padding: 0; display: grid; gap: var(--fds-space-2); max-height: min(56vh, 510px); overflow: auto; }
.jsc-host-card { display: grid; gap: 2px; padding: var(--fds-space-3) var(--fds-space-4); border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); background: var(--fds-bg-panel); text-decoration: none; }
.jsc-host-card:hover { border-color: var(--fds-gray-600); }
.jsc-host-card[aria-current="true"] { border-color: var(--fds-action-primary); box-shadow: inset 0 0 0 1px var(--fds-action-primary); }
.jsc-host-panel { display: grid; gap: var(--fds-space-4); }
.jsc-host-panel .jsc-section-head { margin: 0; }
.jsc-area { margin: 0; display: grid; gap: var(--fds-space-2); }
.jsc-facts { margin: 0; display: grid; gap: var(--fds-space-2); }
.jsc-fact { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--fds-space-3); }
.jsc-fact dt { color: var(--fds-text-muted); font-size: .875rem; }
.jsc-fact dd { margin: 0; overflow-wrap: anywhere; }
.jsc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875rem; }

/* Drawings made by the vendored SpaceScene display-area module. Class names are its own. */
.da-svg { display: block; width: 100%; max-height: 60vh; background: var(--fds-bg-panel); border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); }
.da-case { fill: var(--fds-gray-100); stroke: var(--fds-gray-300); stroke-width: 2; }
.da-surface { fill: var(--fds-gray-50); stroke: none; }
.da-deck { fill: var(--fds-white); stroke: var(--fds-gray-400); stroke-width: 2; }
.fpa-gridline { fill: none; stroke: var(--fds-gray-200); stroke-width: 1; }
.fpa-dimension { fill: none; stroke: var(--fds-gray-400); stroke-width: 2; }
.fpa-dimension-label { fill: var(--fds-gray-600); font-size: 26px; }
.da-margin { fill: none; stroke: var(--fds-gray-300); stroke-width: 1.5; stroke-dasharray: 8 6; }
.da-component { fill: var(--fds-gray-200); stroke: var(--fds-gray-700); stroke-width: 2.5; }
.da-component.is-error { stroke: var(--fds-red-700); }
.fpa-detail { fill: none; stroke: var(--fds-gray-500); stroke-width: 1.5; }
.fpa-label { fill: var(--fds-gray-700); font-size: 20px; pointer-events: none; }
.da-slot { fill: none; stroke: var(--fds-gray-500); stroke-width: 1.5; stroke-dasharray: 5 4; }
.da-slot.is-taken { stroke-dasharray: none; }
.da-carrier-hint { fill: none; stroke: var(--fds-gray-600); stroke-width: 2; }
.da-selection { fill: rgba(37, 99, 235, .12); stroke: var(--fds-blue-600); stroke-width: 4; pointer-events: none; }
.da-lux-cell { display: none; }
.da-svg [data-kind="component"] { cursor: pointer; }
.da-svg [data-kind="component"]:hover .da-component { fill: var(--fds-blue-50); }
.da-svg [data-kind="component"]:focus-visible { outline: none; }
.da-svg [data-kind="component"]:focus-visible .da-component { stroke: var(--fds-blue-600); stroke-width: 5; }
.da-svg .is-stacked .da-component { fill: var(--fds-gray-300); }
.da-svg [data-plan="missing"] .da-component, .da-svg [data-plan="different"] .da-component { stroke: var(--fds-amber-700); stroke-width: 6; stroke-dasharray: 14 8; }
.da-svg [data-plan="same"] .da-component { stroke: var(--fds-green-700); stroke-width: 4; }

@media (max-width: 860px) {
  .jsc-store-layout { grid-template-columns: minmax(0, 1fr); }
  .jsc-hosts { grid-auto-flow: column; grid-auto-columns: minmax(9.5rem, 1fr); max-height: none; overflow-x: auto; padding-bottom: var(--fds-space-2); }
  .jsc-stage { height: 52vh; }
  .jsc-fact { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* --- Products (M3) --- */
.jsc-filters { display: grid; grid-template-columns: minmax(10rem, 1fr) repeat(3, auto) auto; gap: var(--fds-space-2); margin-bottom: var(--fds-space-4); }
.jsc-filters .fds-input { min-width: 0; }
.jsc-products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--fds-space-3); }
.jsc-product { width: 100%; height: 100%; display: grid; grid-template-rows: auto 1fr; padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.jsc-product:hover { border-color: var(--fds-gray-600); }
.jsc-product-image { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--fds-gray-100); }
.jsc-product-noimage { display: grid; place-items: center; color: var(--fds-text-muted); font-size: .8125rem; }
.jsc-product-text { display: grid; gap: 2px; padding: var(--fds-space-3); min-width: 0; overflow-wrap: anywhere; }
.jsc-pager { display: flex; align-items: center; justify-content: center; gap: var(--fds-space-3); margin-top: var(--fds-space-5); }

.jsc-dialog-wide { width: min(56rem, calc(100vw - 2rem)); }
.jsc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); }
.jsc-panel-body { display: grid; gap: var(--fds-space-4); min-width: 0; }
.jsc-product-detail { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--fds-space-6); align-items: start; }
.jsc-product-title { margin: var(--fds-space-1) 0 var(--fds-space-3); font-size: 1.25rem; overflow-wrap: anywhere; }
.jsc-product-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: var(--fds-space-3); align-items: start; }
.jsc-product-shot { margin: 0; display: grid; gap: var(--fds-space-1); }
.jsc-product-shot img { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); background: var(--fds-gray-100); }
.jsc-product-shot[data-shown="cutout"] img { background: linear-gradient(135deg, var(--fds-gray-700), var(--fds-gray-900)); }
.jsc-product-shot figcaption { display: grid; gap: 2px; }
.jsc-shot-actions { display: flex; flex-wrap: wrap; gap: var(--fds-space-1) var(--fds-space-3); }
.jsc-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.jsc-file-button { position: relative; cursor: pointer; align-self: start; }
.jsc-file-button:focus-within { outline: 3px solid var(--fds-focus); outline-offset: 2px; }
.jsc-file-plain { height: auto; padding: var(--fds-space-2); }
.jsc-textarea { height: auto; padding: var(--fds-space-2) var(--fds-space-3); resize: vertical; font: inherit; }
.jsc-field-pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--fds-space-3); }
.jsc-import-errors, .jsc-upload-list { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--fds-space-1); max-height: 40vh; overflow: auto; font-size: .875rem; }
.jsc-upload-list li { display: flex; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; padding: var(--fds-space-1) 0; border-bottom: 1px solid var(--fds-border); overflow-wrap: anywhere; }
.jsc-upload-list li[data-result="failed"] .fds-meta, .jsc-upload-list li[data-result="unmatched"] .fds-meta { color: var(--fds-amber-700); }

@media (max-width: 720px) {
  .jsc-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .jsc-filters input[type="search"] { grid-column: 1 / -1; }
  .jsc-product-detail { grid-template-columns: minmax(0, 1fr); }
  .jsc-products { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); }
}

/* --- Display (M4) --- */
.jsc-gap-small { margin: var(--fds-space-5) 0 var(--fds-space-2); }
.jsc-shown { margin: 0; padding-left: 1.1rem; display: grid; gap: var(--fds-space-1); }
.jsc-position { display: grid; gap: var(--fds-space-4); }
.jsc-placed-row { display: flex; align-items: center; gap: var(--fds-space-3); flex-wrap: wrap; padding: var(--fds-space-2) 0; border-bottom: 1px solid var(--fds-border); }
.jsc-placed-row img, .jsc-pick img, .jsc-pick-noimage { width: 56px; height: 56px; flex: none; object-fit: contain; border-radius: var(--fds-radius-sm); background: var(--fds-gray-100); }
.jsc-quantity { display: inline-flex; align-items: center; gap: var(--fds-space-2); }
.jsc-quantity .fds-btn { width: 40px; padding: 0; font-size: 1.125rem; }
.jsc-quantity > span { min-width: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.jsc-moving { margin: 0; }
.jsc-picker { max-height: 55vh; overflow: auto; }
.jsc-pick { width: 100%; display: flex; align-items: center; gap: var(--fds-space-3); padding: var(--fds-space-2); border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); background: var(--fds-bg-panel); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.jsc-pick:hover:not(:disabled) { border-color: var(--fds-gray-600); }
.jsc-pick:disabled { opacity: .5; cursor: not-allowed; }
.jsc-adjust { display: grid; gap: var(--fds-space-3); }
.jsc-adjust > p { margin: 0; }
.jsc-adjust-pad { display: flex; flex-wrap: wrap; gap: var(--fds-space-2); }
.jsc-adjust-pad .fds-btn { flex: 1 1 6.5rem; }
/* Product photos on the engine's top view. */
.da-svg .jsc-jewel { pointer-events: none; }
.da-svg .jsc-jewel-dot { fill: var(--fds-gray-700); }
.da-svg .jsc-jewel-badge { fill: var(--fds-action-primary); }
.da-svg .jsc-jewel-count { fill: var(--fds-text-inverse); font-weight: 600; }
.da-svg [data-kind="component"]:not([data-placed="0"]) .da-component { fill: var(--fds-white); stroke: var(--fds-gray-900); }
.da-svg [data-kind="component"][data-placed="0"] .da-component { stroke-dasharray: 10 6; }
.da-svg [data-kind="component"]:not([data-placed="0"]) .fpa-label, .da-svg [data-kind="component"]:not([data-placed="0"]) .fpa-detail { display: none; }

/* --- Check-ins and inspection tasks (M5) --- */
.jsc-host-check { font-size: .8125rem; color: var(--fds-text-muted); }
.jsc-host-card[data-checkin="waiting"] .jsc-host-check { color: var(--fds-amber-700); font-weight: 600; }
.jsc-host-card[data-checkin="issue"] .jsc-host-check { color: var(--fds-amber-700); }
.jsc-checkin-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; }
.jsc-task-banner { list-style: none; margin: 0 0 var(--fds-space-4); padding: 0; display: grid; gap: var(--fds-space-2); }
.jsc-task-banner .jsc-notice { box-shadow: none; display: flex; align-items: baseline; gap: var(--fds-space-2); flex-wrap: wrap; }
.jsc-task-note { flex-basis: 100%; overflow-wrap: anywhere; }
.jsc-checkin { display: grid; gap: var(--fds-space-4); min-width: 0; }
.jsc-checkin > p { margin: 0; }
.jsc-checkin-list { max-height: 40vh; overflow: auto; padding: 0; }
.jsc-checkin-row { display: flex; align-items: center; gap: var(--fds-space-3); flex-wrap: wrap; padding: var(--fds-space-2) 0; border-bottom: 1px solid var(--fds-border); }
.jsc-checkin-no { flex: none; width: 2rem; text-align: center; font-variant-numeric: tabular-nums; color: var(--fds-text-muted); }
.jsc-checkin-row .jsc-mark { flex: 0 1 14rem; min-width: 9rem; }
.jsc-checkin[data-result="ok"] .jsc-mark { display: none; }
.jsc-choices { margin: 0; padding: 0; border: 0; display: grid; gap: var(--fds-space-2); min-width: 0; }
.jsc-choices legend { padding: 0; margin-bottom: var(--fds-space-1); font-weight: 600; }
.jsc-choice { display: flex; align-items: center; gap: var(--fds-space-2); min-height: 40px; overflow-wrap: anywhere; }
.jsc-choice input { flex: none; width: 20px; height: 20px; }
.jsc-store-choices { display: grid; gap: 0; max-height: 30vh; overflow: auto; padding-left: var(--fds-space-5); }
.jsc-checkin-photo:empty { display: none; }
.jsc-checkin-preview { display: block; max-width: 100%; max-height: 40vh; width: auto; height: auto; border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); }
.jsc-checkin-entries { padding: 0; }
.jsc-checkin-entry { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: var(--fds-space-4); padding: var(--fds-space-3) 0; border-bottom: 1px solid var(--fds-border); align-items: start; }
.jsc-checkin-thumb img { display: block; width: 100%; height: auto; border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); background: var(--fds-gray-100); }
.jsc-checkin-note { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .jsc-checkin-entry { grid-template-columns: minmax(0, 1fr); }
  .jsc-checkin-row .jsc-mark { flex-basis: 100%; }
}

/* --- Review and fix requests (M6) --- */
.jsc-wall { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--fds-space-3); }
.jsc-wall-card { display: grid; grid-template-rows: auto 1fr; height: 100%; padding: 0; overflow: hidden; text-decoration: none; color: inherit; }
.jsc-wall-card:hover { border-color: var(--fds-gray-600); }
.jsc-wall-photo { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--fds-gray-100); }
.jsc-wall-none { display: grid; place-items: center; color: var(--fds-text-muted); font-size: .8125rem; }
.jsc-wall-text { display: grid; gap: 2px; padding: var(--fds-space-3); min-width: 0; overflow-wrap: anywhere; }
.jsc-wall-badges { display: flex; flex-wrap: wrap; gap: var(--fds-space-1); align-items: center; }
.jsc-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--fds-space-5); align-items: start; min-width: 0; }
.jsc-compare-photo, .jsc-compare-display { display: grid; gap: var(--fds-space-3); min-width: 0; }
.jsc-compare-photo p, .jsc-compare-display p { margin: 0; }
.jsc-compare-drawing { display: grid; gap: var(--fds-space-3); min-width: 0; }
.jsc-compare-drawing .jsc-area { margin: 0; }
.jsc-compare-list { max-height: 30vh; overflow: auto; padding-left: 2rem; }
.jsc-compare-actions { grid-column: 1 / -1; }
.jsc-fixes { display: grid; gap: var(--fds-space-3); }
.jsc-fixes .jsc-section-title { margin: 0; }
.jsc-fix { display: grid; gap: var(--fds-space-2); padding: var(--fds-space-3); border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); }
.jsc-fix[data-fix="open"] { border-color: var(--fds-amber-700); }
.jsc-fix-head { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; }
.jsc-fix-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--fds-space-2); }
.jsc-fix-messages li { display: grid; gap: 2px; padding-left: var(--fds-space-3); border-left: 3px solid var(--fds-border); }
.jsc-fix-messages li[data-kind="reply"] { border-left-color: var(--fds-action-primary); }
.jsc-fix-messages p { margin: 0; overflow-wrap: anywhere; }
.jsc-fix-banner { box-shadow: none; margin: 0 0 var(--fds-space-4); }
.jsc-host-card:not([data-fixes="0"]) .jsc-host-check { color: var(--fds-amber-700); }
@media (max-width: 720px) {
  .jsc-compare { grid-template-columns: minmax(0, 1fr); }
}

/* --- What waits for the person, beside the workspace tabs --- */
.jsc-tab-count { display: inline-block; min-width: 1.25rem; margin-left: .375rem; padding: 0 .375rem; border-radius: 999px; background: var(--fds-action-primary); color: var(--fds-text-inverse); font-size: .75rem; line-height: 1.25rem; text-align: center; font-variant-numeric: tabular-nums; }

/* The store without its picture: positions by name. */
.jsc-position-list { display: grid; gap: var(--fds-space-2); }
.jsc-position-list .jsc-list { gap: var(--fds-space-2); grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); }
.jsc-position-pick { display: grid; gap: 2px; width: 100%; padding: var(--fds-space-3) var(--fds-space-4); border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); background: var(--fds-bg-panel); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.jsc-position-pick:hover { border-color: var(--fds-gray-600); }
.jsc-position-pick[aria-pressed="true"] { border-color: var(--fds-action-primary); box-shadow: inset 0 0 0 1px var(--fds-action-primary); }

/* --- The store on a phone (M8): the picture fills the screen, a host opens as a sheet --- */
.jsc-stage-wrap .jsc-markers { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.jsc-marker { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 1px solid var(--fds-border); border-radius: 50%; background: var(--fds-bg-panel); color: var(--fds-text-secondary); font: inherit; font-size: .75rem; font-weight: 600; line-height: 1; cursor: pointer; pointer-events: auto; }
.jsc-marker[hidden] { display: none; }
.jsc-marker::before { content: "–"; }
.jsc-marker[data-state="done"] { background: var(--fds-green-50); border-color: var(--fds-green-700); color: var(--fds-green-700); }
.jsc-marker[data-state="done"]::before { content: "✓"; }
.jsc-marker[data-state="waiting"] { background: var(--fds-amber-50); border-color: var(--fds-amber-700); color: var(--fds-amber-700); }
.jsc-marker[data-state="waiting"]::before { content: "○"; }
.jsc-marker[data-state="issue"] { background: var(--fds-red-50); border-color: var(--fds-red-700); color: var(--fds-red-700); }
.jsc-marker[data-state="issue"]::before { content: "!"; }
.jsc-marker[aria-current="true"] { box-shadow: 0 0 0 2px var(--fds-action-primary); }
.jsc-hosts-open, .jsc-hosts-close { display: none; }
.jsc-checkin-seen > summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.jsc-checkin-seen > .fds-meta { margin: 0 0 var(--fds-space-2); }
.jsc-checkin-shot .jsc-file-button { align-self: stretch; justify-content: center; }

@media (max-width: 860px), (max-height: 500px) {
  body.jsc-storeview { overflow: hidden; }
  body.jsc-storeview .jsc-topbar, body.jsc-storeview .jsc-skip { display: none; }
  body.jsc-storeview .jsc-main { position: fixed; inset: 0; max-width: none; margin: 0; padding: 0; background: var(--fds-bg-page); }
  body.jsc-storeview #app { height: 100%; display: grid; grid-template: "bar" auto "stage" minmax(0, 1fr) "sheet" auto / minmax(0, 1fr); }
  body.jsc-storeview .jsc-notices { top: var(--fds-space-3); bottom: auto; }
  body.jsc-storeview .jsc-workbar { grid-area: bar; margin: 0; padding: var(--fds-space-2) var(--fds-space-3); flex-wrap: nowrap; background: var(--fds-bg-panel); border-bottom: 1px solid var(--fds-border); }
  body.jsc-storeview .jsc-workbar-title { flex: 1; flex-wrap: nowrap; gap: var(--fds-space-2); }
  body.jsc-storeview .jsc-workbar-title h1 { flex: 1; min-width: 0; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.jsc-storeview .jsc-workbar-title > .fds-meta, body.jsc-storeview .jsc-workbar-user, body.jsc-storeview #task-banner { display: none; }
  body.jsc-storeview .jsc-hosts-open, body.jsc-storeview .jsc-hosts-close { display: inline-flex; }
  body.jsc-storeview .jsc-store-layout { grid-area: stage; display: block; position: relative; margin: 0; min-height: 0; overflow: hidden; }
  body.jsc-storeview .jsc-stage-wrap { height: 100%; }
  body.jsc-storeview .jsc-stage { height: 100%; min-height: 0; border: 0; border-radius: 0; }
  body.jsc-storeview .jsc-modes { left: auto; right: var(--fds-space-3); }
  body.jsc-storeview .jsc-host-list { display: none; position: absolute; inset: 0; z-index: 4; padding: var(--fds-space-3); overflow: auto; background: var(--fds-bg-page); }
  body.jsc-storeview[data-list="open"] .jsc-host-list, body.jsc-storeview[data-engine="none"] .jsc-host-list { display: block; }
  body.jsc-storeview[data-engine="none"] .jsc-store-layout { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  body.jsc-storeview[data-engine="none"] .jsc-stage-wrap { height: auto; }
  body.jsc-storeview[data-engine="none"] .jsc-stage { height: auto; min-height: 4.5rem; }
  body.jsc-storeview[data-engine="none"] .jsc-stage > .jsc-form-error { position: static; }
  body.jsc-storeview[data-engine="none"] .jsc-host-list { position: static; min-height: 0; }
  body.jsc-storeview[data-engine="none"] .jsc-modes, body.jsc-storeview[data-engine="none"] .jsc-hosts-open, body.jsc-storeview[data-engine="none"] .jsc-hosts-close { display: none; }
  body.jsc-storeview .jsc-hosts { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); max-height: none; overflow: visible; padding-bottom: 0; }
  body.jsc-storeview #host-panel { grid-area: sheet; min-height: 0; max-height: 46dvh; overflow: auto; background: var(--fds-bg-panel); border-top: 1px solid var(--fds-border); z-index: 3; }
  body.jsc-storeview[data-sheet="none"] #host-panel { display: none; }
  body.jsc-storeview[data-sheet="full"] #host-panel { grid-row: 2 / 4; max-height: none; }
  .jsc-sheet { gap: var(--fds-space-3); padding: var(--fds-space-3) var(--fds-space-4) var(--fds-space-4); }
  .jsc-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-2); }
  .jsc-sheet-head h2 { margin: 0; min-width: 0; overflow-wrap: anywhere; }
  .jsc-sheet-status { margin: 0; }
  .jsc-sheet-main { min-height: 48px; justify-content: center; align-self: stretch; font-size: 1rem; }
  .jsc-sheet-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr)); gap: var(--fds-space-2); }
  .jsc-sheet-tabs .fds-btn { padding-left: var(--fds-space-2); padding-right: var(--fds-space-2); }
  .jsc-sheet-tabs .fds-btn[aria-pressed="true"] { border-color: var(--fds-action-primary); box-shadow: inset 0 0 0 1px var(--fds-action-primary); }
  .jsc-sheet-body { display: grid; gap: var(--fds-space-4); min-width: 0; }
  body.jsc-storeview .jsc-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; margin: auto 0 0; border-radius: var(--fds-radius-xl) var(--fds-radius-xl) 0 0; }
  body.jsc-storeview .jsc-checkin-preview { max-height: 30dvh; }
}
@media (max-height: 500px) and (min-width: 560px) {
  body.jsc-storeview #app { grid-template: "bar bar" auto "stage sheet" minmax(0, 1fr) / minmax(0, 1fr) auto; }
  body.jsc-storeview #host-panel { width: min(22rem, 46vw); max-height: none; border-top: 0; border-left: 1px solid var(--fds-border); }
  body.jsc-storeview[data-sheet="full"] #host-panel { grid-row: auto; }
}
.jsc-checkin-seen > summary::after { content: "▾"; margin-left: var(--fds-space-2); color: var(--fds-text-muted); }
.jsc-checkin-seen[open] > summary::after { content: "▴"; }

/* --- Display plans (M9) --- */
.jsc-plan-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; box-shadow: none; margin-bottom: var(--fds-space-3); }
.jsc-plan-view button { padding: 0 var(--fds-space-3); cursor: pointer; font-size: .875rem; }
.jsc-plan-block { display: grid; gap: var(--fds-space-2); padding: var(--fds-space-3); border: 1px solid var(--fds-border); border-radius: var(--fds-radius-md); background: var(--fds-bg-muted); }
.jsc-plan-block > p { margin: 0; overflow-wrap: anywhere; }
.jsc-plan-block[data-plan="missing"], .jsc-plan-block[data-plan="different"] { border-color: var(--fds-amber-700); }
.jsc-plan-editor { display: grid; gap: var(--fds-space-3); }
.jsc-plan-editor > p { margin: 0; }
.jsc-plan-row { display: flex; align-items: center; justify-content: space-between; gap: var(--fds-space-3); flex-wrap: wrap; padding: var(--fds-space-2) 0; border-bottom: 1px solid var(--fds-border); }
.jsc-checkin-plan { box-shadow: none; display: grid; gap: var(--fds-space-2); }
.jsc-checkin-plan > p, .jsc-checkin-plan > ul { margin: 0; }
