/* Market Scales: brass scales on a market cloth */
.ms-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ms-col { gap: 8px; padding: 8px 10px 6px; }
.ms-ask {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; min-height: 40px; padding: 0 8px;
  font-family: var(--font-display); font-size: 1.12rem; line-height: 1.2; color: var(--parchment); text-align: center;
}
.ms-ask__icon { width: 34px; height: 34px; flex: none; }
.ms-table {
  --sw: 300px; --cols: 1;
  position: relative;
  flex: 1 1 auto; min-height: 0; width: 100%; max-width: 1180px;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 6px 8px;
  padding: 16px 8px;
  border-radius: 18px;
  direction: ltr;
  background:
    repeating-linear-gradient(90deg, #C4532D 0 14px, #E8B04A 14px 19px, #1C1009 19px 23px, #7BA05B 23px 35px, #E8B04A 35px 40px, #1C1009 40px 44px) top / 100% 9px no-repeat,
    repeating-linear-gradient(90deg, #C4532D 0 14px, #E8B04A 14px 19px, #1C1009 19px 23px, #7BA05B 23px 35px, #E8B04A 35px 40px, #1C1009 40px 44px) bottom / 100% 9px no-repeat,
    repeating-linear-gradient(45deg, rgba(232, 176, 74, 0.07) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(-45deg, rgba(232, 176, 74, 0.07) 0 2px, transparent 2px 16px),
    radial-gradient(120% 90% at 50% 40%, #5A3320, #3A2213 70%);
  box-shadow: inset 0 0 0 2px rgba(28, 16, 9, 0.6), 0 10px 26px rgba(0, 0, 0, 0.4);
}
.ms-cell { width: var(--sw); flex: none; }
.ms-scale { display: block; width: 100%; height: auto; overflow: visible; }
.ms-answers { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; direction: ltr; }
.ms-ans {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 64px; height: 64px; padding: 0 6px;
  border: 0; border-radius: 16px;
  background: linear-gradient(#FBEFD9, #E9D2AE);
  box-shadow: inset 0 -4px 0 rgba(140, 90, 40, 0.35), 0 0 0 2px #C4532D, 0 6px 14px rgba(0, 0, 0, 0.35);
  color: #2B1A10; font: 800 1.2rem/1 system-ui, sans-serif;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, opacity 0.2s;
}
.ms-ans:active { transform: translateY(2px) scale(0.97); }
.ms-ans:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.ms-ans.is-num { min-width: 72px; }
.ms-ans__icon { width: 48px; height: 48px; pointer-events: none; }
.ms-ans.is-out { opacity: 0.32; cursor: default; box-shadow: 0 0 0 2px rgba(196, 83, 45, 0.4); }
.ms-ans.is-wrong { animation: ms-shake 0.35s; }
.ms-ans.is-right { box-shadow: inset 0 -4px 0 rgba(60, 100, 30, 0.35), 0 0 0 3px #7BA05B, 0 0 22px 4px rgba(123, 160, 91, 0.7); animation: ms-pop 0.4s cubic-bezier(.3, 1.6, .5, 1); }
.ms-sub { min-height: 26px; font-size: 0.92rem; }
.ms-stars { color: var(--gold); font-size: 1.25rem; letter-spacing: 0.12em; }
@keyframes ms-shake { 20% { transform: translateX(-5px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
@keyframes ms-pop { 50% { transform: scale(1.12); } }
@media (max-height: 640px) {
  .ms-col { gap: 5px; padding-top: 4px; }
  .ms-ask { min-height: 32px; font-size: 1rem; }
  .ms-ans { height: 54px; min-width: 56px; }
  .ms-ans__icon { width: 40px; height: 40px; }
  .ms-table { padding: 12px 6px; }
  .ms-sub { min-height: 20px; }
}
@media (max-width: 359px) { #solved-chip { display: none; } .ms-answers { gap: 7px; } }
@media (prefers-reduced-motion: reduce) { .ms-ans.is-wrong, .ms-ans.is-right { animation: none; } }
