/* Miniature counters share the box shop's three series palettes and vinyl casts. */
.market-stalls {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: clamp(12px,1.6vw,22px);
}
.market-stall {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 4px 0 var(--shadow), 0 8px 18px #49321e08;
  text-align: left;
}
.market-stall:hover {
  border-color: var(--series-btn);
  box-shadow: 0 4px 0 var(--shadow), 0 7px 16px var(--shadow);
}
.stall-window {
  --cloth: color-mix(in srgb,var(--deep) 60%,var(--pbg));
  --canvas: #ffecd6;
  --frame: #ca9a73;
  --rim: #ad7757;
  --bench: color-mix(in srgb,var(--shelf-lip) 80%,#f7cfac);
  --face: color-mix(in srgb,var(--soft) 60%,#fce4cf);
  --rack-level: 52%;
  --table-level: 79%;
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  aspect-ratio: 1.42;
  overflow: hidden;
  background: var(--pbg);
}
.stall-window > span, .stall-window > .toy { position: absolute; }
.stall-backdrop {
  inset: 0;
  background:
    radial-gradient(#fff9 1.25px, transparent 1.7px) 2px 1px/15px 15px,
    linear-gradient(155deg,var(--paper2),var(--pbg) 68%);
  box-shadow: inset 0 12px 22px #63504332;
}
.stall-backdrop::before {
  content: "";
  position: absolute;
  inset: 19% 50% 10% 3%;
  border-radius: 50% 50% 0 0;
  background: color-mix(in srgb,var(--paper2) 62%,transparent);
  border: 3px solid #fff8;
  box-shadow: inset 2px 2px 2px #66524717, 0 0 0 5px #ffffff24;
}
.stall-crest {
  display: grid;
  place-items: center;
  z-index: 1;
  top: 13%;
  right: 5%;
  width: 11%; 
  aspect-ratio: 1;
  color: var(--stage-ink);
  border-radius: 50%;
  background: var(--paper2);
  box-shadow: 1px 3px 3px #72574632;
  transform: rotate(7deg);
}
.stall-crest .ico { width: 60%; height: 60%; }
.stall-crest::before {
  content: "";
  position: absolute;
  height: 85%;
  width: 1px;
  left: 51%;
  bottom: 99%;
  background: var(--rim);
}
.stall-back-rack {
  inset: var(--rack-level) 8% auto 49%;
  height: 4.8%;
  border-radius: 3px;
  border-top: 3px solid color-mix(in srgb,var(--frame),#ffedd2);
  border-bottom: 2px solid var(--rim);
  background: var(--frame);
  box-shadow: 1px 4px 3px #5844522e;
}
.stall-back-rack::before, .stall-back-rack::after {
  content: "";
  position: absolute;
  width: 8%;
  height: 90%;
  top: 100%;
  left: 7%;
  border-radius: 0 0 50% 15%;
  background: var(--rim);
}
.stall-back-rack::after { left: 83%; }
.stall-rack-stock, .stall-front-stock {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3%;
}
.stall-rack-stock { left: 50%; right: 9%; bottom: calc(100% - var(--rack-level)); height: 23%; }
.stall-rack-stock .toy, .stall-front-stock .toy {
  min-width: 0;
  flex: 1 1 0;
  width: 0;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(1px 2px 1px #48364040);
}
.stall-rack-stock .toy:nth-child(2) { height: 92%; }
.stall-countertop {
  inset: 68% 0 0;
  background: linear-gradient(161deg,color-mix(in srgb,var(--canvas) 72%,var(--bench)),var(--bench));
  border-top: 2px solid #fffa;
}
.stall-host {
  height: 71%; width: 49%;
  left: 4%; bottom: 11%;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: 50% 91%;
  filter: drop-shadow(2px 4px 2px #4f374530);
  transition: transform .3s ease;
}
.market-stall:is(:hover,:focus-visible) .stall-host { transform: rotate(-3deg) translateY(-1%); }
.stall-counterfront {
  inset: var(--table-level) 0 0;
  background: repeating-linear-gradient(90deg,transparent 0 16px,#fff2 16px 30px), var(--face);
  box-shadow: inset 0 5px 6px #84665622;
  border-top: 5px solid var(--bench);
  border-bottom: 6px solid var(--bench);
}
.stall-counterfront::before {
  content: "";
  position: absolute;
  inset: -5px 0 auto;
  height: 2px;
  background: #fffb;
}
.stall-counterfront i {
  position: absolute;
  inset: 19% 8%;
  border: 1px solid color-mix(in srgb,var(--stage-ink) 25%,transparent);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 #fff4, 0 1px 0 #fff5;
}
.stall-front-stock { left: 43%; right: 6%; bottom: calc(99.4% - var(--table-level)); height: 30%; }
.stall-front-stock .toy:last-child { height: 80%; }
.stall-post {
  inset: 0 auto 0 0;
  width: 3.2%;
  background: linear-gradient(90deg,var(--rim),var(--frame) 30%,var(--canvas) 80%,var(--frame) 90%);
  box-shadow: 2px 0 3px #3d343221;
}
.right-post { left: auto; right: 0; }
.stall-canopy, .stall-valance {
  inset: 0 -1% auto;
  background: repeating-linear-gradient(90deg,var(--cloth) 0 6.25%,var(--canvas) 6.25% 12.5%);
}
.stall-canopy {
  height: 10%;
  border-bottom: 1px solid #65414742;
  box-shadow: inset 0 3px #ffffff55,inset 0 -6px 6px #70564424;
}
.stall-valance {
  top: 10%; height: 6%;
  mask: radial-gradient(ellipse 50% 95% at 50% 0,#000 96%,transparent 100%) 0 0 / 6.25% 100% repeat-x;
  filter: brightness(.94);
}
.stall-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px clamp(12px,1.25vw,18px) 16px;
}
.stall-label b { display: block; font-size: clamp(1.07rem,1.75vw,1.48rem); letter-spacing: -.045em; }
.stall-label small { display: block; margin-top: 2px; font-size: .85rem; }
.stall-browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--series-btn);
  color: white;
  border-radius: 9px;
  padding: 8px 10px;
  white-space: nowrap;
  font-size: .84rem;
  font-weight: 700;
}
.fair-preview {
  position: absolute;
  inset: 0 0 0 auto;
  width: 43%;
  overflow: hidden;
  mask-image: linear-gradient(90deg,transparent,#000 13%);
}
.fair-preview .stall-window { height: 100%; }
.fair-preview .left-post { display: none; }
.fair-preview .stall-crest { width: 10%; }
.fair-sign-intro { display: flex; align-items: center; gap: 13px; }
.fair-sign-icon {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 46px;
  color: var(--accent); background: var(--wash);
  border: 1px dashed var(--accent);
  border-radius: 8px; transform: rotate(-5deg);
}
.sign-slip {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: radial-gradient(var(--grain) 1px,transparent 1.6px) 0 0/10px 10px,var(--paper);
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 10px;
}
.sign-half { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sign-half .toy { width: 45px; height: 48px; flex: none; }
.sign-half small, .sign-half b { display:block; }
.sign-half small { font-size: .79rem; color:var(--muted); }
.sign-swap { color: var(--accent); background: var(--blush); border-radius: 50%; padding: 5px; }
.booth-banner {
  position: relative; overflow: hidden;
  display: flex; gap: 14px; align-items: center;
  margin: 0 0 8px; min-height: 92px;
  padding: 12px 37px 8px 12px;
  color: #3d3038;
  border-radius: 14px;
  background: radial-gradient(#fff8 1px,transparent 1.5px) 0 0/12px 12px,linear-gradient(110deg,var(--paper2),var(--pbg));
  border-bottom: 6px solid var(--shelf-lip);
}
.banner-host { align-self: stretch; width: 66px; position: relative; flex: none; }
.banner-host .toy { position: absolute; left: 0; bottom: -11px; width: 100%; height: 110%; object-position: center bottom; filter: drop-shadow(1px 3px 2px #59495533); }
.booth-specialty { display: inline-flex; gap: 6px; align-items: center; font-size: .83rem; font-weight: 700; color: #483d49; }
.booth-banner h2 { font-size: clamp(1.58rem,3.6vw,2.1rem); margin-top: 3px; }
.stall-quote { font-size: .93rem; margin: 6px 1px 14px; }
.booth-prompt { font-weight: 700; color: var(--ink); font-size: .9rem; margin-bottom: 7px; }
.booth-tray { gap: 7px; grid-template-columns: repeat(4,minmax(0,1fr)); }
.booth-tray:has(> :nth-child(5)) { grid-template-columns: repeat(5,minmax(0,1fr)); }
.booth-item { padding: 0 0 6px; overflow: hidden; background: var(--panel); }
.booth-plinth {
  display: grid; place-items: end center; width: 100%; height: 70px;
  background: linear-gradient(160deg,var(--paper2),var(--pbg) 82%);
  border-bottom: 3px solid var(--shelf-lip);
}
.booth-item .booth-plinth .toy { height: 100%; max-height: 62px; width: 90%; object-position: center bottom; }
.booth-item-name { padding: 1px 3px; font-size: .77rem; }
.booth-item .tier { font-size: .66rem; }
.offer .portrait { background: var(--panel); }

body[data-style=matcha] .stall-window {
  --cloth: #789477; --canvas: #eee7c8;
  --frame: #aa8965; --rim: #84664c; --bench: #b79770; --face: #d3bb99;
}
body[data-style=matcha] .stall-backdrop, body[data-style=matcha] .booth-banner {
  background:
    repeating-linear-gradient(0deg,transparent 0 10px,#a4b79044 10px 20px),
    repeating-linear-gradient(90deg,transparent 0 10px,#a4b79044 10px 20px),
    linear-gradient(130deg,var(--paper2),#e2e3c5);
}
body[data-style=matcha] .stall-counterfront { background: repeating-linear-gradient(0deg,#ad8b6c 0 1px,#c6a780 1px 5px,#cbb18b 5px 8px); }
body[data-style=matcha] .stall-valance {
  height: 5%; mask: none; border-radius: 0 0 3px 3px;
  border-bottom: 2px solid #8b8361; box-shadow: 0 3px 4px #5e563832;
}
body[data-style=moon] .stall-window {
  --frame: #9588ad; --rim: #655678; --canvas: #9fe9dd;
  --cloth: #9680ae; --bench: #8e86a8; --face: #716484;
}
body[data-style=moon] .stall-backdrop, body[data-style=moon] .booth-banner {
  background:
    radial-gradient(circle at 8px 9px,#fff9de 1px,transparent 1.6px) 0 0/41px 49px,
    radial-gradient(circle at 22px 27px,#d2cdf1 1px,transparent 1.7px) 0 0/63px 53px,
    linear-gradient(150deg,#383653,color-mix(in srgb,var(--pbg) 38%,#594568));
}
body[data-style=moon] .stall-backdrop::before { border-color:#cdadf3; background:#b6a5da15; box-shadow:0 0 8px #db9cee95,inset 0 0 6px #ddace980; }
body[data-style=moon] .stall-crest { background:#514663; color:#fcdedb; box-shadow:0 0 0 1px #e6daf4,0 0 8px #bca9e6; }
body[data-style=moon] .stall-canopy { background:linear-gradient(0deg,#675e7d,#9685a7 47%,#665376); border-top:2px solid #bfabce; }
body[data-style=moon] .stall-valance { mask:none; height:2.6%; background:linear-gradient(#e9f5fb,#a2eadd 60%,#7fa5ac); box-shadow:0 3px 9px #a1ece59c; }
body[data-style=moon] .stall-counterfront { background: repeating-linear-gradient(100deg,#695a7d 0 16px,#716582 16px 18px); border-top-color:#b4eee2; box-shadow:0 -2px 8px #adfddc88; }
body[data-style=moon] .booth-banner { color:var(--ink); border-bottom-color:#a7eade; }
body[data-style=moon] .booth-specialty { color:#e9deef; }
@media(max-width:880px) and (min-width:651px) {
  .market-stalls { gap:10px; }
  .stall-label { padding:10px; gap:4px; }
  .stall-browse .ico { display:none; }
}
@media(max-width:650px) {
  .market-stalls { grid-template-columns:1fr; gap:12px; }
  .market-stall { display:grid; grid-template-columns:minmax(0,58%) 1fr; border-radius:15px; }
  .market-stall .stall-window { min-height:136px; aspect-ratio:1.58; height:100%; }
  .stall-label { padding:10px 12px; flex-direction:column; align-items:flex-start; justify-content:center; gap:11px; }
  .stall-label b { font-size:1.22rem; }
  .stall-label small { line-height:1.25; }
  .stall-browse { padding:7px 9px; }
  .fair-sign-intro { align-items:flex-start; gap:9px; }
  .fair-sign-icon { width:31px; height:34px; }
  .fair-sign-icon .ico { width:19px; height:19px; }
  .sign-slip { padding:8px; gap:6px; }
  .sign-half { flex-direction:column; align-items:flex-start; gap:3px; }
  .sign-half b { font-size:.86rem; }
  .booth-plinth { height:58px; }
  .booth-item .booth-plinth .toy { max-height:52px; }
  .booth-tray:has(> :nth-child(5)) { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
