/* BALKANOPOLY — money: rolling balances and the mechanical number drums.
   (Split out of the one big base.css in v9.7; files load in the order listed in index.html.) */
/* ---- money: rolling balances and the trade money controls ---- */
[data-mkey] {
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.rollup {
  color: var(--good) !important;
}
.rolldown {
  color: var(--bad) !important;
}
.mctl {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  gap: 6px 8px;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}
.mstep {
  height: 40px;
  font: 400 24px/1 var(--disp);
  background: var(--paper3);
  border: 1px solid var(--rule);
  color: var(--ink);
  cursor: pointer;
  touch-action: none;
}
.mstep:active {
  background: #f3dcc8;
}
.mctl.over .odo {
  border-color: var(--bad);
}
.mslider {
  grid-column: 1 / -1;
  position: relative;
  height: 30px;
  cursor: ew-resize;
  touch-action: none;
}
.mslider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--rule) 0 2px, transparent 2px 10%), var(--paper3);
  border: 1px solid var(--rule);
}
.mfill {
  position: absolute;
  left: 0;
  top: 13px;
  height: 6px;
  background: var(--accent);
}
.mthumb {
  position: absolute;
  top: 3px;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8c97a, #b08a3a 60%, #6e5220);
  border: 1px solid #3b2d1d;
  box-shadow: 0 2px 4px rgba(59, 45, 29, 0.4);
}
.mctl.active .mthumb {
  transform: scale(1.15);
}
.mends {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  margin-top: -4px;
}
/* ---- mechanical number drums ---- */
.odm {
  display: inline-flex;
  align-items: stretch;
  gap: 1px;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.odm .cur,
.odm .sep {
  font-style: normal;
  align-self: center;
  padding: 0 1px;
}
/* v9.13.0: drum and digit heights are whole pixels (round()), so a resting digit sits exactly in its window: before,
   fractions of a pixel left digits at different heights, blurry, or showing a sliver of the next digit */
.odm .dr {
  position: relative;
  display: inline-block;
  width: 0.72em;
  height: 1.2em;
  height: round(1.2em, 1px);
  overflow: hidden;
  text-align: center;
}
.odm .st {
  display: block;
}
/* only while rolling: a resting drum is drawn as plain sharp text, not as a moving picture */
.odm.rollup .st,
.odm.rolldown .st {
  will-change: transform;
}
.odm .st b {
  display: block;
  height: 1.2em;
  height: round(1.2em, 1px);
  line-height: 1.2em;
  line-height: round(1.2em, 1px);
  font-weight: inherit;
}
.odm .dr.lead0 {
  opacity: 0.28;
}
/* small counters show no ghost zeros: €860, not €0,860 (the big trade / auction drums keep them) */
.cash.odm .lead0,
.mycash.odm .lead0,
.vpot.odm .lead0 {
  display: none;
}
.cash,
.mycash,
.vpot {
  font-family: var(--mono);
}
.odm .dr.blur .st {
  filter: blur(0.6px);
}
/* small counters (player list, bottom bar, Vacation fund): quiet paper drums */
.cash.odm .dr,
.mycash.odm .dr,
.vpot.odm .dr {
  background: linear-gradient(#0000 0 70%, rgba(59, 45, 29, 0.06));
}
/* the big counters (trade money, auction): black drums with curved shading, brass frame */
.odo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #241a10;
  border: 2px solid #8a7553;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.7),
    0 0 0 1px #3b2d1d;
  padding: 5px 8px;
  color: #f6ecd2;
  font:
    700 24px/1 'Courier New',
    monospace;
  cursor: text;
}
.odo .odm .dr,
.bigmoney .odm .dr {
  background: linear-gradient(#000 0%, #3a2c1d 22%, #4a3826 50%, #3a2c1d 78%, #000 100%);
  border-left: 1px solid #120c06;
  border-right: 1px solid #120c06;
  box-shadow:
    inset 0 6px 6px -4px rgba(0, 0, 0, 0.8),
    inset 0 -6px 6px -4px rgba(0, 0, 0, 0.8);
  color: #f6ecd2;
}
.odo .odm .dr.lead0,
.bigmoney .odm .dr.lead0 {
  opacity: 1;
  color: #6b5539;
}
.odo .odm .dr::after,
.bigmoney .odm .dr::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.55), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.odo .odo-in {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  font-size: 16px; /* stops phones from zooming in when typing */
  border: 0;
  cursor: text;
}
.odo:focus-within {
  border-color: #c9a24a;
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.7),
    0 0 0 2px rgba(201, 162, 74, 0.45);
}
.bigmoney .odm {
  font:
    700 0.9em/1 'Courier New',
    monospace;
  padding: 4px 6px;
  background: #241a10;
  border: 2px solid #8a7553;
  color: #f6ecd2;
}
.odo {
  font-size: 28px;
  padding: 6px 10px;
}
.odo .odm {
  gap: 2px;
}
.odo .odm .dr,
.bigmoney .odm .dr {
  width: 0.8em;
  border-radius: 2px;
}
.odo .rollup,
.odo .rolldown,
.bigmoney .rollup,
.bigmoney .rolldown {
  color: inherit !important;
}
