:root {
  --bg: #0b0d10;
  --card: #14171c;
  --tile: #1c2027;
  --ink: #f3f1ec;
  --soft: rgba(243, 241, 236, 0.6);
  --faint: rgba(243, 241, 236, 0.3);
  --line: rgba(243, 241, 236, 0.1);
  --accent: #e2b04a;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(120% 80% at 50% 0%, #15181d 0%, var(--bg) 60%);
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Mona Sans Variable", "Mona Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 10px 12px;
}

.mb { position: relative; width: min(324px, 100%); padding: 14px; border-radius: 26px; background: linear-gradient(180deg, #1a1e24, var(--card)); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 50px -30px rgba(0, 0, 0, 0.9); }

.mb__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 2px; }
.mb__name { min-width: 0; display: grid; }
.mb__name b { font-size: 16px; line-height: 21px; font-weight: 740; font-stretch: 108%; letter-spacing: -0.012em; }
.mb__name span { font-size: 11.500px; line-height: 15px; font-weight: 540; color: var(--soft); white-space: nowrap; }
.mb__total { flex: none; display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.mb__total b { display: block; font-size: 24px; line-height: 26px; font-weight: 760; letter-spacing: -0.02em; transform-origin: 100% 60%; }
.mb__on { display: block; height: 15px; overflow: hidden; font-size: 11.500px; line-height: 15px; font-weight: 560; color: var(--soft); white-space: nowrap; }
.mb__on span { display: block; }
.mb.has-some .mb__on { color: var(--accent); }

.mb__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.mb__tile { position: relative; height: 78px; border-radius: 14px; background: var(--tile); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.05); transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.mb__tile.is-in { background: color-mix(in srgb, var(--accent) 12%, var(--tile)); box-shadow: inset 0 0 0 1.500px color-mix(in srgb, var(--accent) 58%, transparent); }
.mb__hit { position: absolute; inset: 0; z-index: 1; border: 0; border-radius: inherit; background: transparent; cursor: pointer; outline: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.mb__hit:disabled { cursor: default; }
.mb__hit:focus-visible, .mb__less:focus-visible, .mb__go:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
@media (hover: hover) { .mb__tile:not(.is-out) .mb__hit:hover { background: rgba(243, 241, 236, 0.05); } }
.mb__ico { position: absolute; left: 9px; top: 9px; width: 24px; height: 24px; fill: none; stroke: var(--soft); stroke-width: 1.400; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s ease, opacity 0.3s ease; pointer-events: none; }
.mb__tile.is-in .mb__ico { stroke: var(--accent); }
.mb__tile.is-out .mb__ico { opacity: 0.45; }
/* how many have been taken */
.mb__n { position: absolute; right: 7px; top: 7px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #231802; font-size: 11.500px; line-height: 20px; font-weight: 760; text-align: center; font-variant-numeric: tabular-nums; transform: scale(0); pointer-events: none; }
.mb__n b { display: block; font-weight: inherit; }
.mb__what { position: absolute; left: 10px; right: 8px; bottom: 15px; display: grid; pointer-events: none; }
.mb__what b { font-size: 11.500px; line-height: 14px; font-weight: 660; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb__what span { font-size: 11px; line-height: 14px; font-weight: 560; color: var(--soft); font-variant-numeric: tabular-nums; }
/* the two marks say how many are left on the shelf */
.mb__stock { position: absolute; left: 10px; bottom: 7px; display: flex; gap: 3px; pointer-events: none; }
.mb__stock i { display: block; width: 12px; height: 3px; border-radius: 1.500px; background: rgba(243, 241, 236, 0.16); overflow: hidden; }
.mb__stock i::before { content: ""; display: block; height: 100%; border-radius: inherit; background: var(--soft); transform-origin: 0 50%; transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1); }
.mb__stock i.is-gone::before { transform: scaleX(0); }
.mb__less { position: absolute; right: 6px; bottom: 6px; z-index: 2; width: 26px; height: 26px; border: 0; border-radius: 9px; background: rgba(243, 241, 236, 0.1); color: var(--ink); cursor: pointer; outline: none; opacity: 0; transform: scale(0.6); pointer-events: none; transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1), background-color 0.2s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.mb__less svg { display: block; width: 16px; height: 16px; margin: 5px; fill: none; stroke: currentColor; stroke-width: 1.800; stroke-linecap: round; }
.mb__tile.is-in .mb__less { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) { .mb__less:hover { background: rgba(243, 241, 236, 0.2); } }

.mb__go { display: flex; align-items: center; justify-content: center; gap: 0; width: 100%; height: 44px; margin-top: 10px; border: 0; border-radius: 14px; background: var(--accent); color: #231802; font: inherit; font-size: 13.500px; font-weight: 720; font-variant-numeric: tabular-nums; cursor: pointer; outline: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 14px 22px -14px color-mix(in srgb, var(--accent) 80%, transparent); transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.mb__go:disabled { background: #22262d; color: var(--soft); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.mb__go.is-sent:disabled { color: var(--ink); }
.mb__go svg { flex: none; width: 0; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: width 0.3s ease, margin 0.3s ease; }
.mb__go svg path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.35s ease 0.15s; }
.mb__go.is-sent svg { width: 16px; margin-right: 7px; }
.mb__go.is-sent svg path { stroke-dashoffset: 0; }
.mb__gotext { display: block; height: 20px; line-height: 20px; overflow: hidden; }
.mb__gotext span { display: block; white-space: nowrap; }
@media (hover: hover) { .mb__go:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 88%, #ffffff); } }

.ghost { position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -3px 0 0 -5px; transform-origin: 20% 15%; pointer-events: none; opacity: 0; fill: #f3f1ec; stroke: #000000; stroke-width: 1.300; stroke-linejoin: round; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6)); z-index: 6; }
