.market-shell {
  --stall-green: #28573d;
  --stall-orange: #984322;
  --stall-edge: #aa957a;
  --stall-paper: #fffaf0;
  margin-top: 0;
  background: #fbf6e9;
}
.market-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 27px clamp(16px, 3.4vw, 48px) 15px;
  border-bottom: 1px solid #c3ae91;
  background: #f7e8cb;
}
.market-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 10px;
  border-bottom: 1px solid #c29271;
  background: repeating-linear-gradient(90deg, #bb5236 0 26px, #ffedc4 26px 52px);
}
.market-brand, .market-tabs, .market-tabs a, .order-paths, .order-adjust, .builder-stepper, .builder-actions, .order-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}
.market-brand { gap: 13px; }
.market-brand img {
  width: 73px;
  height: 61px;
  object-fit: cover;
  border: 3px solid #fffaf0;
  border-radius: 7px;
  box-shadow: 0 1px 3px #69594255;
  transform: rotate(-4deg);
}
.market-brand h1 { font-size: clamp(30px, 3.4vw, 49px); line-height: 1; letter-spacing: -.055em; }
.market-tabs { gap: 3px; padding: 3px; border: 1px solid #c6ad87; border-radius: 28px; background: #fffaf0; }
.market-tabs a {
  gap: 6px;
  min-height: 44px;
  padding: 6px clamp(9px, 1.2vw, 17px);
  border-radius: 23px;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}
.market-tabs a[aria-current] { background: var(--stall-green); color: white; }
.market-tabs a:not([aria-current]):hover { background: #e9ecd7; }
.market-practice { display: flex; justify-content: center; padding-top: 16px; }
.market-practice .modes { margin: 0; }
.grown .note .pill { margin-top: 14px; }
.order-board, .board.builder-board { width: 100%; max-width: 1000px; margin: auto; padding: clamp(18px, 2.3vw, 32px) clamp(15px, 3vw, 45px); }
.order-paths { flex-wrap: wrap; gap: 5px; width: fit-content; max-width: 100%; margin: 0 auto 18px; border-bottom: 1px solid #c9bc9e; }
.order-path {
  min-height: 44px;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 7px 14px;
  background: transparent;
  font-size: 16px;
  font-weight: 800;
}
.order-path[aria-pressed="true"] { color: var(--stall-green); border-bottom-color: currentColor; }
.order-counter { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(16px, 2.5vw, 32px); align-items: stretch; }
.order-slip, .order-basket { min-width: 0; padding: clamp(16px, 2vw, 28px); text-align: center; }
.order-slip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #b4a58c;
  border-radius: 8px;
  background: var(--stall-paper);
  box-shadow: 0 3px 0 #dfd4bf;
}
.order-slip::before {
  display: block;
  content: "";
  height: clamp(62px, 6.6vw, 88px);
  margin: calc(0px - clamp(16px, 2vw, 28px)) calc(0px - clamp(16px, 2vw, 28px)) 15px;
  border-bottom: 1px dashed #887448;
  background: #e6c980 url("assets/market.webp") center 44% / cover;
}
.order-kicker { color: #6c4931; font-weight: 850; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.order-title, .board.builder-board h2, .order-finish h2 {
  font: 770 clamp(29px, 3vw, 44px)/1.06 var(--display);
  letter-spacing: -.048em;
  margin: 8px auto;
}
.order-instruction { font-size: clamp(16px, 1.5vw, 20px); line-height: 1.32; }
.order-target { margin-top: 13px; }
/* Rows of five, matching the ten-frame basket. */
.order-slots {
  display: grid;
  grid-template-columns: repeat(var(--slots, 5), auto);
  justify-content: center;
  gap: 4px;
  margin: auto;
  font-size: clamp(21px, 2.7vw, 33px);
  line-height: 1.18;
}
.order-basket {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1.5px solid #8c9e80;
  border-radius: 18px;
  background: #e8eedb;
}
.order-basket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; text-align: left; }
.order-basket-head h3 { font-size: clamp(21px, 2.2vw, 29px); letter-spacing: -.04em; line-height: 1.12; }
.order-tally { color: #234b35; font: 800 20px/1.2 var(--display); }
.order-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  padding: 10px;
  border: 2px solid #91613c;
  border-bottom: 7px solid #a57948;
  border-radius: 8px 8px 16px 16px;
  background: #ecd6af;
}
.order-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  height: clamp(38px, 4.4vw, 56px);
  border: 1px dashed #947f5c;
  border-radius: 6px;
  background: #f9edd6;
  font-size: clamp(22px, 2.55vw, 33px);
  line-height: 1;
}
.order-cell.is-filled { border: 1px solid #b29973; background: #fffcf1; }
.order-cell.is-start, .legend-start { border: 1.5px solid #a0703a; background: #f1d49b; }
.order-cell.is-extra { border: 2px dashed #b4532e; background: #fbe1d3; }
.order-token.is-waiting { opacity: .32; filter: grayscale(.7); }
.order-token.is-matched { filter: drop-shadow(0 2px 0 #28573d66); }
.order-legend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 7px; margin-top: 9px; font-size: 14px; font-weight: 800; color: #4c4433; }
.legend-start, .legend-added { display: inline-block; width: 16px; height: 16px; border-radius: 4px; }
.legend-added { margin-left: 8px; border: 1px solid #b29973; background: #fffcf1; }
.order-adjust { gap: 9px; flex-wrap: wrap; margin-top: 15px; }
.order-step {
  min-height: 48px;
  min-width: 90px;
  padding: 8px 14px;
  border: 1.5px solid var(--stall-green);
  border-radius: 12px;
  background: #fffdf3;
  color: var(--stall-green);
  font-weight: 850;
}
.order-plus { background: var(--stall-green); color: white; }
.order-step:disabled, .order-step[aria-disabled="true"], .builder-step[aria-disabled="true"] { border-color: #aba99a; background: #ede9dd; color: #615f52; }
.order-actions, .builder-actions { flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.order-check, .builder-play { min-height: 48px; }
.order-board .pill.primary, .builder-board .pill.primary { background: var(--stall-green); border-color: var(--stall-green); }
.order-feedback { text-align: center; }
.order-feedback:not(:empty) { width: fit-content; max-width: 100%; margin: 14px auto 0; padding: 8px 16px; border-radius: 10px; background: #f7e9c5; color: #503d27; }
.order-feedback.is-ready { background: #e3edd7; color: #234b35; }
.order-equation { display: block; margin-top: 3px; font: 760 24px/1.2 var(--display); }
.order-continue, .order-finish, .order-handoff { text-align: center; }
.order-continue:not(:empty) { margin-top: 13px; }
.order-handoff { margin-bottom: 14px; }
.order-finish { padding-block: 22px; }
.order-finish .finish-art { display: block; width: min(100%, 460px); height: 140px; margin: 0 auto 18px; border-radius: 12px; object-fit: cover; object-position: center 43%; }
.order-finish h2 { margin-bottom: 14px; }
.order-finish .pill { margin: 12px 3px 0; }
.order-tools { margin-top: 6px; }
.board.builder-board { max-width: 860px; }
.builder-intro { margin-bottom: 17px; }
.builder-field {
  min-width: 0;
  margin: 12px 0;
  padding: 12px 15px 14px;
  border: 1px solid #c3b496;
  border-radius: 14px;
  background: #fffaf0;
}
.builder-field legend { padding: 0 8px; font-weight: 850; }
.builder-fruits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 530px; margin: auto; }
.builder-fruit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  border: 1.5px solid #aaa28c;
  border-radius: 12px;
  background: #fffdf5;
  font-weight: 850;
}
.builder-fruit[aria-pressed="true"] { border: 2px solid var(--stall-green); background: #e1edd2; box-shadow: 0 2px 0 var(--stall-green); }
.builder-art { font-size: 34px; line-height: 1.15; }
.builder-stepper { gap: 16px; }
.builder-value { font: 800 36px/1 var(--display); min-width: 50px; }
.builder-step { min-width: 48px; min-height: 48px; border-radius: 50%; border: 1.5px solid var(--stall-green); background: #edf3df; color: var(--stall-green); font: 700 28px/1 var(--display); }
.builder-preview { margin: 12px auto 0; max-width: 420px; font-size: 25px; overflow-wrap: anywhere; }
.builder-extra { text-align: center; }
.builder-toggle { padding: 8px 14px; min-height: 44px; border: 0; border-radius: 12px; color: #38583b; background: transparent; font-weight: 850; text-decoration: underline; text-underline-offset: 3px; }
.builder-toggle::before { content: "+" / ""; display: inline-block; margin-right: 6px; }
.builder-toggle[aria-expanded="true"]::before { content: "−" / ""; }
.builder-prefill { margin: 7px auto 14px; max-width: 480px; }
@media (max-width: 780px) {
  .market-header { flex-wrap: wrap; justify-content: center; gap: 12px; padding: 21px 12px 10px; }
  .market-brand img { width: 55px; height: 47px; }
  .order-counter { gap: 12px; }
}
@media (max-width: 620px) {
  .market-header { flex-direction: column; gap: 8px; }
  .market-tabs { width: 100%; }
  .market-tabs a { min-width: 0; flex: 1 1 0; flex-direction: column; font-size: 13px; line-height: 1.1; padding: 5px 4px; gap: 2px; white-space: normal; text-align: center; border-radius: 18px; }
  .market-tabs a .icon { width: 16px; height: 16px; }
  .order-board, .board.builder-board { padding: 14px 12px 20px; }
  .order-counter { grid-template-columns: minmax(0, 1fr); }
  .order-paths { margin-bottom: 12px; }
  .order-path { padding: 5px 11px; }
  .order-slip { padding: 9px 12px 13px; }
  .order-slip::before { display: none; }
  .order-title { font-size: 28px; margin-block: 4px; }
  .order-target { margin-top: 6px; }
  .order-basket { padding: 13px; }
  .order-basket-head { margin-bottom: 7px; }
  .order-grid { padding: 6px; }
  .order-adjust, .order-actions { margin-top: 10px; }
  .builder-field { padding-inline: 8px; }
  .builder-fruits { gap: 6px; }
}
@media (max-width: 380px) {
  .order-step { min-width: 0; padding-inline: 10px; }
}
@media (forced-colors: active) {
  .market-tabs [aria-current], .order-path[aria-pressed="true"], .builder-fruit[aria-pressed="true"] { outline: 2px solid Highlight; }
}
