@font-face {
  font-family: Bricolage;
  src: url("./market.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cobalt: #123aab;
  --navy: #102575;
  --ink: #151723;
  --paper: #fff1d8;
  --paper-light: #fff8e8;
  --red: #c92f1c;
  --bright: #f4b642;
  --muted: #60503d;
  --rule: #bdab8f;
  --display: Bricolage, "Arial Narrow", system-ui, sans-serif;
  --grain: radial-gradient(#87522018 0.65px, transparent 0.65px) 0 0 / 5px 5px;
  font-family: Bricolage, system-ui, sans-serif;
  color: var(--ink);
  background: var(--navy);
  font-synthesis: none;
}

*, *::after, *::before { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-width: 290px;
  min-height: 100svh;
  margin: 0;
  background: radial-gradient(#739bee2c .85px, transparent .85px) 0 0 / 9px 9px, linear-gradient(155deg, #2049b1, #102575 70%);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: .99; font-weight: 800; }
button, textarea { font: inherit; }
button, a, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid #f0ad29; outline-offset: 4px; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.masthead { color: var(--paper); border-bottom: 1px solid #eeedec53; background: #11256b; }
.masthead-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 62px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.back-link, .header-button { font-weight: 740; color: inherit; font-size: .91rem; }
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.masthead-title {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .065em;
  font-size: 1.02rem;
}
.masthead-actions { display: flex; gap: 7px; align-items: center; }
.header-button { min-height: 44px; padding: 5px 10px; background: transparent; border: 1px solid transparent; }
.header-button:hover, .header-button[aria-pressed="true"] { border-color: #fbf0d96c; }

.game-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 48px; }
.front, .result, .market-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr); gap: 18px; align-items: start; }
.paper {
  background: var(--grain), var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px var(--ink);
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 15px;
  border: 2px solid var(--ink);
  box-shadow: 2px 3px var(--ink);
  font-weight: 800;
  color: var(--ink);
  background: var(--paper-light);
  line-height: 1.1;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.button:not(:disabled):hover { filter: brightness(1.09); }
.button:not(:disabled):active { box-shadow: 0 1px var(--ink); transform: translate(2px, 2px); }
.button:disabled { color: #665d50; background: #e1d4bb; box-shadow: none; border-color: #817764; }
.button.red { background: var(--red); color: #fff9e8; }
.button.blue { background: var(--cobalt); color: #fff9e8; }
.button.red:disabled, .button.blue:disabled { background: #e1d4bb; color: #665d50; }

.front-poster, .closing-poster {
  position: relative;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px var(--ink);
  overflow: hidden;
}
.poster-copy {
  position: relative;
  background: var(--grain), var(--paper);
  padding: clamp(18px, 3.5vw, 39px) clamp(20px, 4vw, 44px) clamp(19px, 2.6vw, 28px);
  border-bottom: 4px solid var(--ink);
}
.poster-copy h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 7.4vw, 6.7rem);
  letter-spacing: -.067em;
  line-height: .83;
  text-transform: uppercase;
  font-stretch: 84%;
}
.poster-copy em {
  color: var(--red);
  font-style: normal;
}
.poster-copy p { margin-top: 17px; max-width: 38ch; font-size: 1.04rem; line-height: 1.35; font-weight: 680; }
.front-poster img, .scene img, .closing-poster img { width: 100%; height: auto; aspect-ratio: 2; object-fit: cover; }
.front-options { display: grid; gap: 14px; }
.front-options section { padding: clamp(14px, 2.4vw, 24px); }
.front-options h2 { font-size: clamp(1.65rem, 3.1vw, 2.55rem); letter-spacing: -.045em; }
.play-panel .button, .daily-panel .button { display: flex; width: 100%; margin-top: 12px; }
.play-panel .red, .daily-panel .blue { min-height: 53px; font-size: 1.12rem; }
.daily-panel { border-top: 8px solid var(--bright); }
.daily-panel p { margin-top: 9px; font-size: .98rem; line-height: 1.35; }
.record {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 13px;
  padding-top: 9px;
  border-top: 1px dashed var(--rule);
  font-weight: 690;
}
.record strong { color: var(--navy); font-size: 1.1rem; }
.awning-button { justify-self: start; }

.ledger {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.ledger-ticket {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 9.4rem;
  white-space: nowrap;
  padding: 7px 14px 8px;
  background: var(--grain), var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px var(--ink);
  font-weight: 730;
}
.ledger-ticket span { font-size: .88rem; text-transform: uppercase; letter-spacing: .045em; }
.ledger-ticket strong { font-size: clamp(1.4rem, 3vw, 2.25rem); letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-ticket { margin-left: auto; color: var(--ink); }
.timer-ticket.last-call { background-color: var(--red); color: var(--paper-light); }
.daily-tag { color: var(--paper); font-size: .9rem; font-weight: 760; }
.pause-button { min-height: 46px; padding-inline: 12px; }
.street { display: grid; gap: 8px; }
.scene {
  position: relative;
  container-type: inline-size;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.shoppers { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.shopper {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(25px, 8.1cqw, 60px);
  aspect-ratio: 98 / 160;
  transform: translate(-50%, -100%) scale(var(--depth));
  transform-origin: bottom center;
  transition: left .45s ease, top .45s ease, transform .45s ease;
  animation: shopper-arrives .72s ease-out;
}
.shopper::before {
  content: "";
  position: absolute;
  inset: auto 10% -2% 10%;
  height: 8%;
  border-radius: 50%;
  background: #172b685c;
}
.shopper-art {
  position: absolute;
  inset: 0;
  background: url("./shoppers.webp") no-repeat var(--sprite) 50% / 600% 100%;
  transform-origin: bottom;
  animation: shopper-steps .24s ease-in-out 3;
}
.shopper-bubble {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 101%;
  transform: translateX(-50%);
  align-items: center;
  gap: 1px;
  padding: 2px 3px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  background: var(--paper-light);
  color: var(--ink);
  box-shadow: 1px 1px var(--ink);
  white-space: nowrap;
  font-size: clamp(.72rem, 2.2cqw, .98rem);
  font-weight: 800;
  line-height: 1;
}
.shopper-bubble .food-art { width: clamp(13px, 3.4cqw, 24px); }
.shopper[data-front] .shopper-bubble { display: flex; }
.shopper[data-exit] { animation: shopper-leaves .76s ease-in both; }
.shopper[data-exit] .shopper-art {
  scale: -1 1;
  animation-name: shopper-exit-steps;
}
.shopper[data-exit="left"] .shopper-bubble { display: none; }
.shopper[data-exit="sold"] .shopper-bubble { display: flex; background: #fff0a7; }
.scene .street-sign, .scene .receipt { z-index: 3; }
@keyframes shopper-arrives { from { left: var(--entry-x); top: var(--entry-y); opacity: .25; } }
@keyframes shopper-leaves {
  0% { opacity: 1; }
  30% { top: calc(var(--y) + 5%); opacity: 1; }
  100% { left: 108%; top: 100%; opacity: 0; }
}
@keyframes shopper-steps {
  0%, 100% { transform: rotate(1deg); }
  50% { transform: translateY(-5%) rotate(-2deg); }
}
@keyframes shopper-exit-steps {
  0%, 100% { transform: rotate(1deg); }
  50% { transform: translateY(-5%) rotate(-2deg); }
}
.street-sign, .closing-sign {
  position: absolute;
  right: 3%;
  top: 7%;
  transform: rotate(4deg);
  padding: 6px 11px 5px;
  max-width: 45%;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 2px 3px var(--ink);
  color: var(--ink);
  font-size: clamp(.75rem, 1.8vw, 1rem);
  font-weight: 800;
  text-align: center;
  line-height: 1.02;
}
.scene[data-twist]:not([data-twist=""]) .street-sign {
  color: var(--paper-light);
  background: var(--red);
  transform: rotate(-5deg);
}
.scene[data-twist="rival-sale"] .street-sign,
.scene[data-twist="last-bus"] .street-sign,
.scene[data-twist="falling-crate"] .street-sign { color: var(--ink); background: var(--bright); }

.awning-stripe { position: absolute; inset: auto 0 0; height: 8px; border-top: 1px solid var(--ink); }
.awning-stripe, [data-awning="classic"] .awning-swatch {
  background: repeating-linear-gradient(-40deg, #e75032 0 14px, #fff0cf 14px 28px);
}
[data-awning="cobalt"] :is(.awning-stripe, .awning-swatch) {
  background: repeating-linear-gradient(-40deg, #1035aa 0 14px, #d2e8ff 14px 28px);
}
[data-awning="gold"] :is(.awning-stripe, .awning-swatch) {
  background: repeating-linear-gradient(-40deg, #e49219 0 14px, #fff0ac 14px 28px);
}
[data-awning="after-hours"] :is(.awning-stripe, .awning-swatch) {
  background: repeating-linear-gradient(-40deg, #311850 0 14px, #e68cb5 14px 28px);
}
.rain {
  display: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(104deg, transparent 0 11px, #afcaff75 13px, transparent 14px 23px);
  pointer-events: none;
  z-index: 2;
  opacity: .35;
  animation: pluie .64s linear infinite;
}
.scene[data-weather="rain"] .rain { display: block; }
@keyframes pluie { to { background-position: -23px 24px; } }

.receipt {
  position: absolute;
  bottom: 12px;
  left: 10px;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px var(--ink);
  padding: 5px 9px;
  background: var(--paper-light);
  font-size: .9rem;
  font-weight: 800;
  text-align: left;
}
.crowd-band {
  display: flex;
  align-items: baseline;
  gap: 3px 9px;
  flex-wrap: wrap;
  padding: 8px 11px;
  background: var(--paper);
  border: 2px solid var(--ink);
  font-size: .91rem;
  line-height: 1.2;
}
.crowd-band > strong { color: var(--navy); }
.forecast {
  display: flex;
  width: 100%;
  gap: 3px 8px;
  flex-wrap: wrap;
  padding-top: 5px;
  border-top: 1px dashed var(--rule);
}
.forecast strong { color: #992719; }
.tickets { display: grid; gap: 6px; }
.tickets:empty { display: none; }
.event-ticket {
  position: relative;
  padding: 9px 12px 10px 15px;
  border: 2px solid var(--ink);
  border-left: 7px solid var(--bright);
  box-shadow: 3px 3px var(--ink);
  background: radial-gradient(#88315a38 0.65px, transparent 0.65px) 0 0 / 4px 4px, var(--red);
  color: #fff8e5;
  animation: print-in .27s ease-out both;
}
@keyframes print-in { from { opacity: .45; transform: translateX(-12px) rotate(-1.7deg); } to { opacity: 1; transform: none; } }
.ticket-heading { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.ticket-heading h2 { font-size: clamp(1.32rem, 3.1vw, 2.05rem); letter-spacing: -.039em; }
.ticket-heading time {
  padding: 3px 6px;
  background: var(--paper-light);
  color: var(--ink);
  font-size: .91rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.event-ticket p { margin-top: 4px; font-size: .93rem; line-height: 1.18; font-weight: 670; }
.offer-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.offer-actions:empty { display: none; }
.offer-button {
  color: var(--ink);
  background: var(--paper-light);
  min-height: 44px;
  min-width: 92px;
  padding: 5px 9px;
  border: 2px solid var(--ink);
  text-align: left;
  line-height: 1.08;
}
.offer-button:hover:not(:disabled) { background: var(--bright); }
.offer-button:disabled { color: #554d40; background: #efdbba; }
.offer-button small { display: block; margin-top: 3px; font-size: .84rem; }

.queue-panel { padding: 8px 10px 10px; }
.queue-heading, .counter-heading { display: flex; align-items: baseline; gap: 7px; justify-content: space-between; }
.queue-heading h2, .counter-heading h2 { font-size: 1.45rem; letter-spacing: -.032em; }
.queue-heading span, .counter-heading span { color: var(--muted); font-weight: 760; font-size: .88rem; }
.order-slips { display: flex; gap: 7px; margin-top: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.order-slip {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 2px;
  background: var(--paper-light);
  border: 1px dashed var(--rule);
  border-top: 3px solid var(--cobalt);
  padding: 3px 7px 5px;
  min-width: 88px;
  line-height: 1.13;
  font-size: .86rem;
}
.order-slip > span:last-child, .empty-queue { color: var(--muted); font-weight: 660; }
.order-slip[data-status="price"], .order-slip[data-status="stock"] { border-top-color: var(--red); }
.order-slip[data-status="price"] > span:last-child, .order-slip[data-status="stock"] > span:last-child { color: #842e21; }
.empty-queue { font-size: .9rem; }
.order-food { display: flex; gap: 1px; }
.order-food .food-art { width: 24px; }
.counter { padding: 13px; }
.counter-heading { margin-bottom: 9px; }
.food-list { display: grid; gap: 6px; }
.menu-row {
  border: 1px solid #aa9476;
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr);
  gap: 8px;
  padding: 7px;
  align-items: center;
  background: #fff7e7;
}
.menu-row.out .stock-label { background-color: #ecd2bc; color: #723328; }
.food-art {
  display: block;
  aspect-ratio: 1;
  width: 100%;
  background: url("./food.webp") no-repeat 0 50% / 300% 100%;
  mix-blend-mode: multiply;
}
.food-skewers { background-position-x: 50%; }
.food-tea { background-position-x: 100%; }
.product-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; justify-content: space-between; padding-bottom: 4px; }
.product-heading h3, .wholesale-row h3 { font-size: clamp(1.06rem, 2vw, 1.4rem); letter-spacing: -.028em; }
.product-status { display: flex; align-items: center; gap: 4px; }
.price-lock {
  padding: 3px 4px;
  background: #eed79f;
  color: #4f330e;
  font-variant-numeric: tabular-nums;
  font-size: .81rem;
  line-height: 1.12;
  font-weight: 750;
  white-space: nowrap;
}
.stock-label {
  white-space: nowrap;
  padding: 3px 5px;
  background-color: #e7e1c6;
  color: #332c21;
  font-size: .88rem;
  line-height: 1.08;
  font-weight: 730;
}
.stock-label .count { font-variant-numeric: tabular-nums; font-weight: 800; }
.inbound { color: #75291a; font-size: .88rem; font-weight: 700; padding-bottom: 4px; }
.price-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.price-group button {
  min-height: 45px;
  padding: 4px 2px;
  display: grid;
  place-content: center;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: var(--paper-light);
  text-align: center;
  font-size: clamp(.83rem, 2.15vw, .92rem);
  line-height: 1.04;
  font-weight: 720;
}
.price-group button strong { margin-top: 3px; font-size: 1.03rem; }
.price-group button:not(:disabled, [aria-pressed="true"]):hover { background: #ffdea1; }
.price-group button:disabled { background: #f0e8d6; color: #655a49; border-color: #a69a83; }
.price-group button[aria-pressed="true"] { background: var(--cobalt); color: var(--paper-light); box-shadow: inset 0 0 0 1px var(--paper-light); }
.counter-actions { display: flex; gap: 8px; padding-top: 10px; }
.counter-actions .button { flex: 1; font-size: 1.13rem; }

dialog {
  width: min(600px, calc(100% - 26px));
  max-height: calc(100% - 26px);
  padding: 0;
  color: var(--ink);
  background: var(--grain), var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 6px 6px var(--ink);
  overscroll-behavior: contain;
}
dialog::backdrop { background: #081435ce; }
.sheet-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 3px solid var(--ink);
  background: var(--grain), var(--paper-light);
}
.sheet-heading h2 { font-size: clamp(1.65rem, 4.4vw, 2.45rem); letter-spacing: -.049em; }
.close-button {
  flex: 0 0 44px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid var(--ink);
  color: var(--paper-light);
  background: var(--red);
  line-height: 1;
  font-family: system-ui, sans-serif;
  font-size: 1.77rem;
  font-weight: 800;
}
.close-button:hover { filter: brightness(1.12); }
.sheet-body { display: grid; gap: 10px; padding: 16px; line-height: 1.43; }
.sheet-body .button { justify-self: stretch; }
.guide { display: grid; gap: 9px; padding-left: 21px; margin: 0 0 4px; }
.supplier-image { border-bottom: 2px solid var(--ink); }
.supplier-image img { width: 100%; height: clamp(100px, 27vw, 230px); object-fit: cover; object-position: 50% 58%; }
.stockroom-ledger {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 7px;
  border-bottom: 1px dashed var(--rule);
  padding: 8px 12px;
  color: var(--navy);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.stockroom-ledger > strong { font-size: 1.15rem; }
.stockroom .tickets:not(:empty) { margin: 8px 9px 3px; }
.stockroom-food { display: grid; gap: 6px; padding: 8px 9px 10px; }
.wholesale-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--rule);
  background: var(--paper-light);
  padding: 5px 7px;
}
.wholesale-row p { margin-top: 3px; color: var(--muted); font-size: .88rem; font-weight: 690; }
.wholesale-row.delayed { border-color: var(--red); }
.wholesale-row.delayed .wholesale-time { color: #842e21; }
.buy-button { min-width: 98px; padding-left: 7px; padding-right: 7px; }
.awning-list { gap: 8px; }
.awning-option { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 8px; align-items: center; }
.awning-option strong, .awning-option span { display: block; }
.awning-option div span { color: var(--muted); font-size: .88rem; }
.awning-swatch { height: 36px; border: 1px solid var(--ink); }
.awning-option .button { padding: 7px; }
textarea { border: 2px solid var(--ink); background: var(--paper-light); padding: 8px; width: 100%; resize: vertical; }

.closing-poster { min-height: 260px; }
.closing-poster img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; }
.closing-sign { text-transform: uppercase; }
.profit-poster {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  width: fit-content;
  max-width: calc(100% - 28px);
  padding: 9px 14px;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px var(--ink);
  background: var(--grain), var(--paper);
}
.profit-poster h1 { font-size: clamp(1.4rem, 4vw, 2.05rem); letter-spacing: -.045em; }
.profit-amount { display: block; color: var(--red); font-size: clamp(3.2rem, 9vw, 6.5rem); letter-spacing: -.07em; line-height: .98; }
.profit-poster span { color: var(--muted); font-weight: 780; }
.receipt-paper { padding: clamp(14px, 3vw, 24px); }
.receipt-paper h2 { font-size: clamp(1.55rem, 3.2vw, 2.4rem); letter-spacing: -.047em; }
.receipt-paper dl {
  margin: 10px 0;
  padding-block: 8px;
  border-block: 1px dashed var(--rule);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 5px;
  font-size: 1rem;
  line-height: 1.2;
}
.receipt-paper dd { margin: 0; text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.receipt-total { border-top: 1px dashed var(--rule); padding-top: 7px; font-weight: 800; }
.run-details { font-size: .94rem; color: var(--muted); }
.unlock { margin-top: 8px; padding: 6px 8px; background: #ffde94; font-weight: 800; }
.result-actions { display: grid; gap: 8px; padding-top: 13px; }

@media (max-width: 820px) {
  .masthead-inner, .game-shell { width: min(550px, calc(100% - 22px)); }
  .masthead-inner { min-height: 48px; }
  .masthead-title { display: none; }
  .game-shell { padding-top: 12px; padding-bottom: 20px; }
  .front, .result, .market-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .front-options { gap: 10px; }
  .poster-copy { padding: 15px 16px 13px; }
  .poster-copy h1 { font-size: clamp(2.8rem, 10vw, 4.4rem); max-width: 11ch; }
  .poster-copy p { margin-top: 8px; font-size: .97rem; }
  .front-poster img { max-height: 215px; }
  .button { min-height: 46px; }
  .ledger { gap: 5px; margin-bottom: 7px; flex-wrap: wrap; }
  .ledger-ticket { min-width: 0; gap: 4px 6px; padding: 6px; }
  .ledger-ticket span { font-size: .78rem; letter-spacing: 0; }
  .daily-tag { font-size: .82rem; margin-left: 1px; }
  .timer-ticket { margin-left: auto; }
  .pause-button { min-height: 44px; padding-inline: 6px; font-size: .9rem; }
  .street { display: contents; }
  .scene { order: 0; }
  .scene img { min-height: 116px; max-height: min(235px, 23svh); }
  .tickets { order: 1; }
  .crowd-band { order: 2; padding: 5px 7px; }
  .counter { order: 4; padding: 7px; }
  .counter-heading { margin-bottom: 5px; }
  .counter-heading h2, .queue-heading h2 { font-size: 1.26rem; }
  .queue-panel { order: 3; padding: 5px 7px 6px; }
  .queue-heading h2 { font-size: 1.14rem; }
  .order-slip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 4px;
    padding-inline: 4px;
  }
  .order-food { grid-row: span 2; align-items: center; }
  .order-food .food-art { width: 18px; }
  .food-list { gap: 4px; }
  .menu-row { padding: 4px; grid-template-columns: 48px minmax(0,1fr); gap: 5px; }
  .price-group button { min-height: 44px; }
  .counter-actions { padding-top: 6px; }
  .market[data-phase="running"] { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  [data-phase="running"] .counter-actions {
    position: fixed;
    inset: auto 0 0;
    z-index: 2;
    padding: 6px max(calc((100vw - 550px) / 2), 11px) calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid #fff1d86b;
    background: #102575;
  }
  [data-phase="running"] .counter-actions .button { min-height: 44px; }
  .closing-poster img { min-height: 240px; }
  .profit-poster { bottom: 9px; left: 9px; }
}
@media (max-width: 365px) {
  .ledger-ticket { padding-inline: 4px; }
  .daily-tag { order: 4; padding: 2px 3px; width: 100%; }
  .header-button { padding-inline: 6px; }
  .menu-row { grid-template-columns: 43px minmax(0, 1fr); }
  .wholesale-row { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .buy-button { min-width: 78px; flex-direction: column; gap: 1px; }
}
@media (max-height: 800px) {
  .stockroom .supplier-image img { max-height: 124px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
