.j-workspace, .j-card, .j-picker, .j-dialog {
  --j-ink:#153d32;
  --j-muted:#52665c;
  --j-line:#d7ded5;
  --j-accent:#07563f;
  --j-ease:cubic-bezier(.23,1,.32,1);
  color:var(--j-ink);
  min-inline-size:0;
  overflow-wrap:anywhere;
}
.j-workspace {max-width:1140px;margin:0 auto;padding-block:1rem 3rem;display:grid;gap:1.1rem}
.j-workspace h1 {font-size:clamp(1.8rem,4vw,3rem);margin:.3rem 0;font-weight:650;letter-spacing:-.035em}
[dir=rtl] .j-workspace h1 {letter-spacing:normal}
.j-workspace p,.j-card p {margin-block:.5rem;line-height:1.55}
.j-top {display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.j-filters {display:flex;align-items:center;flex-wrap:wrap;gap:.4rem;padding-block:.3rem;min-width:0}
.j-filter {display:inline-flex;align-items:center;gap:.4rem;min-height:44px;padding:.6rem .85rem;color:#244c3c;background:#fff;border:1px solid #c9d7cb;border-radius:.55rem;font-size:.88rem;font-weight:600;text-decoration:none}
.j-filter[aria-current] {background:#154d3b;border-color:#154d3b;color:white}
.j-filtercount {font-variant-numeric:tabular-nums;font-weight:400}
.j-tab,.j-link,.j-choice,.j-primary {display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:44px;border-radius:.55rem;padding:.55rem .85rem;font:inherit;line-height:1.25;font-weight:600;text-decoration:none;cursor:pointer}
.j-tab,.j-link {color:var(--j-accent,#07563f);text-underline-offset:.25em}
.j-tab[aria-current=page] {background:#deeade}
.j-link {padding-inline:0;justify-self:start;text-decoration:underline}
.j-choice,.j-primary {border:1px solid var(--j-line);background:#fafbf7;color:var(--j-ink);transition:background-color 140ms ease-out,transform 140ms var(--j-ease)}
.j-primary,.j-choice[aria-pressed=true] {background:var(--j-accent);border-color:var(--j-accent);color:white}
.j-primary {width:fit-content}
.j-choice small {font-size:.7rem;display:block}
.j-picker .j-choice {flex-direction:column;align-items:flex-start;font-variant-numeric:tabular-nums}
.j-picker .j-choice[aria-pressed=true] small {color:#e0f1e7}
.j-dialog.j-date-dialog {
  width: min(25rem, calc(100% - 1.25rem));
  margin: auto;
  padding: clamp(.75rem, 3vw, 1.25rem);
  border-radius: 14px;
  overscroll-behavior: contain;
}
.j-date-dialog h2 { margin: 0 0 .7rem; font-size: 1.15rem; }
.j-month-controls { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.j-date-dialog table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: separate; border-spacing: 1px 3px; margin: .75rem 0; }
.j-date-dialog :is(th, td) { border: 0; padding: 0; text-align: center; background: transparent; }
.j-date-dialog th { font-size: .79rem; font-weight: 600; color: var(--j-muted); }
.j-date-dialog button {
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--j-ink);
  min-height: 44px;
  padding: .25rem;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.j-date-dialog td button { width: 100%; }
.j-date-dialog .j-month-controls button { width: 44px; font-size: 1.45rem; }
.j-date-dialog > button { padding-inline: .85rem; border-color: var(--j-line); }
.j-date-dialog button[aria-disabled=true] { color: #68766c; background: #f4f5f1; cursor: default; }
.j-date-dialog td[aria-selected=true] button { background: var(--j-accent); color: white; }
.j-date-dialog button:focus-visible { outline: 2px solid #99611d; outline-offset: -2px; }
@media (hover:hover) and (pointer:fine) {
  .j-date-dialog td:not([aria-selected=true]) button:not([aria-disabled=true]):hover { background: #e7f1e9; }
}
.j-checkoutbar {display:none}
.j-choice:not(:disabled):active,.j-primary:not(:disabled):active {transform:scale(.98)}
.j-workspace :disabled,.j-card :disabled {cursor:default;opacity:.58}
.j-layout {display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:1rem;align-items:start}
.j-stack,.j-list {min-width:0;display:grid;gap:1rem}
.j-card {background:white;border:1px solid var(--j-line);border-radius:1rem;padding:clamp(1rem,2.5vw,1.65rem);box-shadow:0 3px 10px #12392305;align-self:start}
.j-card h2 {font-size:clamp(1.2rem,2vw,1.5rem);line-height:1.23;margin:0 0 1rem;letter-spacing:normal}
.j-card h3,.j-picker h3 {font-size:1rem;margin:.9rem 0 .5rem}
.j-card small,.j-unit small,.j-orderlink small {display:block;line-height:1.5;color:var(--j-muted)}
.j-orderlink time {display:block;font-size:.85rem;line-height:1.5;color:var(--j-muted)}
.j-card summary {margin-block:.6rem;min-height:44px;padding-block:.6rem;cursor:pointer;font-weight:650}
.j-options {display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.j-card .j-primary,.j-card .j-scan,.j-card .j-options {margin-block:.4rem}
.j-total,.j-nextdate {display:block;font-size:clamp(1.55rem,3vw,2.5rem);line-height:1.2;font-weight:650;font-variant-numeric:tabular-nums}
.j-clock,.j-mini-clock {font-family:ui-monospace,monospace;display:inline-block;direction:ltr;margin-inline-start:.5rem}
.j-held,.j-status {color:#17533d;background:#e8f3e8;border-radius:.45rem;padding:.3rem .55rem}
.j-status {width:fit-content;display:inline-block;font-size:.85rem}
.j-summary {position:sticky;top:1rem}
.j-unit {display:flex;gap:.85rem;align-items:center;min-width:0}
.j-unit>div {min-width:0}
.j-unit strong {font-weight:650;display:block}
.j-photo {width:4.4rem;height:4.4rem;object-fit:cover;background:#edf0e9;border:1px solid var(--j-line);border-radius:.6rem}
.j-orderhead .j-photo {width:6rem;height:6rem}
.j-orderhead .j-unit {border-top:1px solid var(--j-line);padding-top:.8rem;margin-top:.8rem}
.j-orderhead h2 {font-size:clamp(1.65rem,3vw,2.4rem);margin-block:.3rem .75rem}
.j-orderlink {display:flex;align-items:center;justify-content:space-between;gap:.75rem;min-width:0;border:1px solid var(--j-line);border-radius:.8rem;padding:.75rem;color:var(--j-ink);background:#fcfcf8;text-decoration:none}
.j-lead {border-block-start:4px solid #20775b;background:#f8faf5}
.j-stops {display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.35rem .75rem;margin:.75rem 0 1rem}
.j-stops dt {font-weight:650}
.j-stops dd {margin:0}
.j-field,.j-scan {display:grid;gap:.3rem;margin-block:.65rem;min-width:0;font-weight:600}
.j-field input,.j-field textarea,.j-scan input {font:inherit;box-sizing:border-box;min-width:0;width:100%;padding:.6rem .7rem;background:#fff;color:var(--j-ink);border:1px solid #aebbb0;border-radius:.5rem;min-height:44px}
.j-scan input {font-size:.87rem}
.j-pair {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}
.j-feedback:empty {display:none}
.j-feedback {border-inline-start:3px solid #a9742c;padding-inline:.6rem}
.j-field input[aria-invalid=true] {border-color:#9b481f}
.j-mapframe {position:relative;direction:ltr;overflow:hidden;height:clamp(12rem,25vw,17rem);border-radius:.75rem;background:#e8e8df;isolation:isolate}
.j-mapframe>img {width:100%;height:100%;object-fit:fill;display:block}
.j-mapframe>img[hidden] {display:none}
.j-gridmap {background-color:#e5e8dd;background-image:linear-gradient(#c3cfbe 1px,transparent 1px),linear-gradient(90deg,#c3cfbe 1px,transparent 1px);background-size:26px 26px}
.j-placeable {cursor:crosshair}
.j-maptitle {position:absolute;inset:8px auto auto 8px;background:#fffef9ed;border:1px solid #d2dacc;color:#243c30;border-radius:.35rem;padding:.2rem .45rem;font-size:.75rem}
.j-pin {background:#fffefa;border:2px solid #07563f;color:#07563f;position:absolute;transform:translate(-50%,-100%);border-radius:50% 50% 50% 0;min-width:1.8rem;height:1.8rem;text-align:center;line-height:1.5rem;font-weight:700;box-shadow:0 1px 5px #34463544;pointer-events:none}
.j-pin.selected {background:#07563f;color:white}
.j-credit {font-size:.72rem;display:block;text-align:end;color:#42634f;margin:.25rem 0}
.j-mapaddress small {direction:ltr;unicode-bidi:isolate;text-align:start}
.j-mapaddress {padding:.35rem .25rem}
.j-dialog {box-sizing:border-box;width:min(48rem,96vw);max-height:90dvh;border:1px solid #c7d3c6;border-radius:1rem;background:white;padding:1.25rem;overflow:auto}
.j-dialog::backdrop {background:#142d2399}
.j-dialog .j-mapframe {height:min(42vh,25rem)}
.j-progress,.j-history {list-style:none;margin:.5rem 0;padding:0}
.j-progress li,.j-history li {position:relative;min-height:2.65rem;border-inline-start:2px solid #dbe4db;padding-inline-start:1rem;margin-inline-start:.4rem;color:var(--j-muted)}
.j-progress li:before {content:'';width:.58rem;height:.58rem;border-radius:50%;position:absolute;inset-inline-start:-.36rem;top:.45rem;background:#c1cec3}
.j-progress li.done:before {background:#237753}
.j-progress li[aria-current] {color:var(--j-ink);font-weight:700}
.j-history li {margin-block:.7rem;min-height:0}
.j-eventwindow {display:block;margin-top:.2rem;font-size:.9rem;font-weight:600;font-variant-numeric:tabular-nums}
.j-code {display:block;font:650 2rem/1.5 ui-monospace,monospace;letter-spacing:.18em}
.j-workspace :focus-visible,.j-card :focus-visible,.j-picker :focus-visible {outline:3px solid #ac6921;outline-offset:3px}
@media(hover:hover){
  .j-filter:not([aria-current]):hover {background:#e9efe4}
  .j-choice:not(:disabled):not([aria-pressed=true]):hover,.j-orderlink:hover,.j-tab:hover {background:#e9efe4}
  .j-primary:not(:disabled):hover {background:#063e30}
  .j-link:hover {color:#102e23}
}
@media(max-width:720px){
  .j-filters {flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding:.35rem .2rem .55rem;scroll-padding-inline:.6rem}
  .j-filter {flex:none;white-space:nowrap}
  .j-layout {grid-template-columns:minmax(0,1fr)}
  .j-summary {position:static}
  .j-checkoutbar {position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:.55rem;flex-wrap:wrap;background:#f8faf4f7;box-shadow:0 2px 6px #153d3220;padding:.4rem .6rem;border:1px solid var(--j-line);border-radius:.55rem;font-size:.83rem}
  .j-checkoutbar strong {margin-inline-end:auto}
  .j-checkoutbar .j-link {font-size:.78rem;min-height:32px}
  .j-workspace [id] {scroll-margin-block-start:6rem}
  .j-orderlink {flex-wrap:wrap}
  .j-pair {grid-template-columns:1fr}
  .j-dialog {margin:auto 0 0;width:100%;max-width:100%;max-height:92dvh;border-radius:1rem 1rem 0 0}
  .j-primary {width:100%}
}
@media(prefers-reduced-motion:no-preference){
  .j-orderhead,.j-dialog[open] {animation:j-enter 170ms var(--j-ease)}
  ::view-transition-group(*) {animation-duration:180ms}
  @keyframes j-enter {from{opacity:.2;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
}
@media(prefers-reduced-motion:reduce){
  .j-card *,.j-picker *,.j-dialog,.j-dialog * {animation:none!important;transition:none!important}
  .j-choice:not(:disabled):active,.j-primary:not(:disabled):active {transform:none}
}

/* Interaction review: make role feedback easier to find after a failed check. */
.j-card:has(.j-stock) .j-feedback:not(:empty) {
  background: #fbf4e7;
  border-inline-start: 4px solid #a9742c;
  border-radius: .35rem;
  padding: .65rem .8rem;
  color: #49391e;
  line-height: 1.5;
}
