/* Smocza Matematyka — App.money components (js/core/money.js, doc: docs/api/money.md):
 * purse (Sakiewka), drawer (kasetka), counter (lada) with the price strip, counting-up number line,
 * grosze square, value scale, price tag. All selectors are prefixed .money-.
 */

/* ---------- flights (ghosts live in #overlay) ---------- */

#overlay > .money-ghost {
  position: absolute;
  z-index: 85;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  filter: drop-shadow(0 8px 6px rgba(30, 20, 10, 0.28));
}

/* ---------- a money piece (purse & counter) ---------- */

.money-item {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: left 0.34s cubic-bezier(0.3, 0.7, 0.35, 1), top 0.34s cubic-bezier(0.3, 0.7, 0.35, 1),
    width 0.34s ease, height 0.34s ease;
}
.money-item.is-new {
  transition: none;
}
.money-item.is-hidden {
  visibility: hidden;
}
.money-face {
  display: flex;
  transform: translateY(var(--lift, 0px)) rotate(var(--rot, 0deg)) scale(var(--s, 1));
  transition: transform 0.22s ease, opacity 0.25s ease, filter 0.25s ease;
}
.money-item:active .money-face {
  --lift: 3px;
}
.money-item .mat-note {
  border-radius: 6px;
}
.money-item.is-selected {
  z-index: 20 !important;
}
.money-item.is-selected .money-face {
  --lift: -14px;
  filter: drop-shadow(0 14px 10px rgba(30, 20, 10, 0.35));
}
.money-item.is-selected .mat {
  box-shadow: 0 0 0 5px var(--gold), 0 0 0 11px rgba(242, 183, 5, 0.35);
}
.money-item.is-hint .mat {
  /* static ring stays visible when motion is reduced (animations are cut to 0.01 ms) */
  box-shadow: 0 0 0 5px var(--gold);
  animation: money-hint 1.3s ease-in-out infinite;
}
.money-item.is-err .mat {
  box-shadow: 0 0 0 5px var(--err);
  animation: money-err 1s ease-in-out infinite;
}
.money-item.is-counted .money-face {
  opacity: 0.4;
  filter: saturate(0.4);
}
.money-item.is-counted::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232a2238' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 22px no-repeat;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}
.money-purse.is-bank-mode .money-item.is-breakable .money-face {
  animation: money-wobble 1.1s ease-in-out infinite;
}
.money-purse.is-bank-mode .money-item.is-breakable .mat {
  /* pieces the bank can change (also visible without motion) */
  box-shadow: 0 0 0 4px var(--accent), 0 0 0 9px rgba(123, 92, 214, 0.3);
}
.money-purse.is-locked .money-item,
.money-counter.is-locked .money-item {
  cursor: default;
}
/* value labels under the pieces (purse option labels / setLabels, rung 2): the drawing sits above the label */
.money-purse.has-labels .money-item {
  padding-bottom: 32px;
}
.money-vlabel {
  position: absolute;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);
  padding: 0 10px 1px;
  border-radius: 10px;
  background: #fffaf0;
  border: 2px solid var(--gold-deep);
  box-shadow: 0 2px 0 rgba(90, 50, 20, 0.25);
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
  animation: money-vlabel-in 0.3s ease both;
}
.money-item.is-pile-under .money-vlabel {
  display: none;
}
@keyframes money-vlabel-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(6px);
  }
}

@keyframes money-hint {
  0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 0 0 3px rgba(242, 183, 5, 0.95); }
  50% { box-shadow: 0 0 0 3px var(--gold), 0 0 0 16px rgba(242, 183, 5, 0); }
}
@keyframes money-err {
  0%, 100% { box-shadow: 0 0 0 4px var(--err); transform: scale(1); }
  50% { box-shadow: 0 0 0 12px rgba(240, 140, 46, 0.25); transform: scale(1.06); }
}
@keyframes money-wobble {
  0%, 100% { transform: rotate(0deg) scale(var(--s, 1)); }
  25% { transform: rotate(-5deg) scale(var(--s, 1)); }
  75% { transform: rotate(5deg) scale(var(--s, 1)); }
}

/* ---------- purse (Sakiewka): a soft leather pouch ---------- */

.money-purse {
  position: relative;
  border-radius: 34px;
  background:
    radial-gradient(ellipse 70% 40% at 30% 18%, rgba(255, 220, 170, 0.22), rgba(255, 220, 170, 0) 70%),
    radial-gradient(ellipse at 50% 120%, #5e3a1d 0%, rgba(94, 58, 29, 0) 60%),
    linear-gradient(170deg, #a8733f 0%, #8d5c30 55%, #774a25 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 236, 200, 0.25),
    inset 0 -12px 26px rgba(40, 20, 5, 0.35),
    0 6px 0 rgba(70, 40, 15, 0.45),
    0 14px 28px rgba(42, 34, 56, 0.25);
}
.money-purse::before {
  /* stitching */
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 28px;
  border: 3px dashed rgba(255, 230, 186, 0.5);
  pointer-events: none;
}
.money-purse-head {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 8px;
  color: #fff1d6;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(60, 30, 10, 0.45);
  pointer-events: none;
}
.money-purse-cord {
  width: 46px;
  height: 14px;
  border-radius: 7px;
  background: repeating-linear-gradient(115deg, #e9c27f 0 5px, #c99545 5px 10px);
  box-shadow: 0 2px 0 rgba(60, 30, 10, 0.35);
}
.money-purse-area {
  position: absolute;
}
.money-purse.is-headless .money-purse-head {
  display: none;
}
.money-purse.is-scatter .money-purse-area {
  border-radius: 20px;
}
.money-chip {
  position: absolute;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 72px;
  min-width: 176px;
  padding: 0 20px;
  border: 0;
  border-radius: 36px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 5px 0 #553c9e, 0 10px 18px rgba(42, 34, 56, 0.35);
}
.money-chip.show {
  display: inline-flex;
  animation: pop-in 0.2s ease;
}
.money-chip:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 #553c9e;
}
.money-bank {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  height: 72px;
  border: 0;
  border-radius: 24px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 700;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 5px 0 rgba(60, 35, 15, 0.45);
}
.money-bank.is-on {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 0 #553c9e, 0 0 0 5px rgba(123, 92, 214, 0.35);
}
.money-bank.is-glow {
  /* a steady gold ring (also without motion) + a soft pulse around it */
  box-shadow: 0 5px 0 rgba(60, 35, 15, 0.45), 0 0 0 5px var(--gold);
  animation: money-bank-glow 1.2s ease-in-out infinite;
}
.money-bank.is-on.is-glow {
  animation: none;
}
@keyframes money-bank-glow {
  0%, 100% { box-shadow: 0 5px 0 rgba(60, 35, 15, 0.45), 0 0 0 5px var(--gold), 0 0 0 5px rgba(242, 183, 5, 0.7); }
  50% { box-shadow: 0 5px 0 rgba(60, 35, 15, 0.45), 0 0 0 5px var(--gold), 0 0 0 20px rgba(242, 183, 5, 0); }
}

/* ---------- drawer (kasetka / szuflada kasy) ---------- */

.money-drawer {
  position: relative;
  box-sizing: border-box;
  padding: 10px 14px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #94653a 0%, #7a4f2a 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 236, 200, 0.22),
    inset 0 -6px 0 rgba(50, 28, 10, 0.3),
    0 6px 0 rgba(60, 35, 15, 0.4),
    0 12px 22px rgba(42, 34, 56, 0.2);
}
.money-drawer-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  height: 100%;
}
/* rows: 2 — two rows of compartments, 24 px apart (heights set inline) */
.money-drawer.is-rows-2 .money-drawer-row + .money-drawer-row {
  margin-top: 24px;
}
.money-slot {
  position: relative;
  flex: none;
  border: 0;
  padding: 0;
  height: 100%;
  border-radius: 16px;
  background: linear-gradient(180deg, #ecdcb9 0%, #f7ecd3 100%);
  box-shadow: inset 0 5px 10px rgba(80, 50, 20, 0.35), inset 0 -2px 0 rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s ease;
}
.money-slot:active {
  transform: translateY(3px);
}
.money-slot.is-off {
  opacity: 0.38;
  filter: grayscale(0.7);
}
.money-slot.is-hint {
  box-shadow: inset 0 5px 10px rgba(80, 50, 20, 0.35), 0 0 0 5px var(--gold);
  animation: money-slot-glow 1.2s ease-in-out infinite;
}
@keyframes money-slot-glow {
  0%, 100% { box-shadow: inset 0 5px 10px rgba(80, 50, 20, 0.35), 0 0 0 5px var(--gold), 0 0 0 5px rgba(242, 183, 5, 0.7); }
  50% { box-shadow: inset 0 5px 10px rgba(80, 50, 20, 0.35), 0 0 0 5px var(--gold), 0 0 0 18px rgba(242, 183, 5, 0); }
}
.money-slot-pile {
  position: relative;
  display: block;
  transform: scale(var(--s, 1));
}
.money-slot-layer {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
}
.money-slot-layer.is-b2 {
  transform: translate(5px, 7px);
  filter: brightness(0.82);
}
.money-slot-layer.is-b1 {
  transform: translate(2.5px, 3.5px);
  filter: brightness(0.9);
}

/* ---------- counter (lada) + price strip (pasek ceny) ---------- */

.money-counter {
  position: relative;
}
.money-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}
.money-paid {
  position: absolute;
  left: 18px;
  top: 4px;
  height: 52px;
  padding: 0 18px;
  border-radius: 26px;
  background: var(--panel);
  border: 3px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.money-paid.is-right {
  left: auto;
  right: 18px;
}
.money-paid-num {
  color: var(--ink);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.money-strip-tag {
  position: absolute;
  top: 0;
  transition: left 0.35s ease;
  z-index: 2;
}
.money-strip-track {
  position: absolute;
  bottom: 0;
  height: 68px;
}
.money-strip-frame {
  position: absolute;
  left: -6px;
  top: 0;
  bottom: 0;
  box-sizing: border-box;
  border: 4px dashed var(--ink-soft);
  border-radius: 18px;
  background: #fffdf7;
  box-shadow: inset 0 3px 6px rgba(42, 34, 56, 0.1);
  transition: width 0.35s ease, border-color 0.3s, box-shadow 0.3s;
}
.money-strip-segs {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 48px;
  pointer-events: none;
}
.money-seg {
  position: absolute;
  top: 0;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font);
  font-weight: 700;
  font-size: 24px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.14), inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  transition: left 0.35s ease, width 0.35s ease;
}
.money-seg.is-new {
  transition: none;
}
.money-seg.is-note .money-seg-label {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.money-strip-gap {
  position: absolute;
  top: 10px;
  height: 48px;
  border-radius: 12px;
  display: none;
  pointer-events: none;
}
.money-counter.is-under .money-strip-gap {
  display: block;
}
.money-counter.chk-under .money-strip-gap {
  background: repeating-linear-gradient(135deg, rgba(240, 140, 46, 0.4) 0 10px, rgba(240, 140, 46, 0.18) 10px 20px);
  box-shadow: 0 0 0 4px var(--err), 0 0 18px 6px rgba(240, 140, 46, 0.55);
  animation: money-gap 1.2s ease-in-out infinite;
}
.money-counter.chk-under .money-strip-frame {
  border-color: var(--err);
}
.money-strip-excess {
  position: absolute;
  top: 4px;
  height: 60px;
  border-radius: 0 16px 16px 0;
  display: none;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0 9px, rgba(240, 140, 46, 0.28) 9px 18px);
  box-shadow: inset 0 0 0 4px var(--err);
  transition: left 0.35s ease, width 0.35s ease;
}
.money-counter.is-over .money-strip-excess {
  display: block;
}
.money-counter.chk-over .money-strip-excess {
  animation: money-excess 1s ease-in-out infinite;
}
.money-counter.mode-overpay .money-strip-excess {
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0 9px, rgba(255, 255, 255, 0.12) 9px 18px);
  box-shadow: inset 0 0 0 4px var(--accent);
}
.money-strip-shine {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
}
.money-counter.chk-exact .money-strip-frame {
  border-style: solid;
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(242, 183, 5, 0.3), inset 0 3px 6px rgba(42, 34, 56, 0.1);
}
.money-counter.chk-exact .money-strip-shine {
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 246, 200, 0.95) 50%, rgba(255, 255, 255, 0) 70%) no-repeat;
  background-size: 40% 100%;
  animation: money-shine 1.1s ease-out 2;
}
@keyframes money-gap {
  0%, 100% { box-shadow: 0 0 0 4px var(--err), 0 0 10px 2px rgba(240, 140, 46, 0.4); }
  50% { box-shadow: 0 0 0 4px var(--err), 0 0 24px 10px rgba(240, 140, 46, 0.6); }
}
@keyframes money-excess {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.55; transform: scaleY(1.12); }
}
@keyframes money-shine {
  0% { opacity: 1; background-position: -60% 0; }
  100% { opacity: 1; background-position: 160% 0; }
}

.money-lada {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 26px 26px 18px 18px;
  background:
    repeating-linear-gradient(90deg, rgba(120, 70, 20, 0.05) 0 2px, rgba(120, 70, 20, 0) 2px 31px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, rgba(255, 255, 255, 0) 1px 13px),
    linear-gradient(180deg, #f0d29f 0%, #e2b778 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), 0 10px 22px rgba(42, 34, 56, 0.2);
}
.money-lada-edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #c48c4c 0%, #a87039 100%);
  box-shadow: inset 0 3px 0 rgba(255, 230, 190, 0.35);
  pointer-events: none;
}
.money-lada-area {
  position: absolute;
}
.money-outline {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: left 0.34s ease, top 0.34s ease;
}
.money-outline-shape {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px dashed rgba(93, 84, 112, 0.55);
  background: rgba(255, 255, 255, 0.32);
  color: rgba(93, 84, 112, 0.8);
  font-family: var(--font);
  font-weight: 700;
  font-size: 22px;
  transform: scale(var(--s, 1));
}
.money-outline.is-coin .money-outline-shape {
  border-radius: 50%;
}
.money-outline.is-note .money-outline-shape {
  border-radius: 10px;
}
.money-outline.is-ghost .money-outline-shape {
  border-color: var(--err);
  color: var(--err);
  background: rgba(255, 233, 212, 0.55);
  animation: money-ghost 1.4s ease-in-out infinite;
}
.money-outline.is-filled .money-outline-shape {
  opacity: 0;
}
@keyframes money-ghost {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ---------- counting-up number line (oś doliczania) ---------- */

.money-countup {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.money-line {
  position: relative;
  flex: none;
}
.money-line-svg {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
}
.money-line-base {
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
}
.money-line-beyond {
  stroke: var(--ink-soft);
  stroke-width: 5;
  stroke-dasharray: 1 13;
  stroke-linecap: round;
  opacity: 0.55;
}
.money-line-tick {
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linecap: round;
}
.money-line-tick.is-major {
  stroke-width: 4;
}
.money-line-tick.is-end {
  stroke-width: 6;
}
.money-line-ticklabel {
  font-family: var(--font);
  font-weight: 700;
  font-size: 22px;
  fill: var(--ink-soft);
  text-anchor: middle;
}
.money-line-endlabel {
  font-family: var(--font);
  font-weight: 700;
  font-size: 28px;
  fill: var(--ink);
  text-anchor: middle;
}
.money-line-endlabel.is-goal {
  fill: var(--gold-deep);
}
.money-line-ticklabel.is-covered,
.money-line-ticklabel.is-crowded,
.money-line-endlabel.is-covered {
  visibility: hidden;
}
.money-line-pole {
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
}
.money-line-pennant {
  fill: var(--gold);
  stroke: var(--gold-deep);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.money-countup.is-done .money-line-flag {
  animation: money-flag 1s ease-in-out 2;
  transform-box: fill-box;
  transform-origin: 0% 100%;
}
.money-countup.is-bump .money-line-flag {
  animation: money-bump 0.6s ease;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.money-line-arc {
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 5;
  stroke-linecap: round;
}
.money-line-arc.is-small {
  stroke-width: 4;
}
.money-line-arc.is-over {
  stroke: var(--err);
  stroke-dasharray: 10 10;
}
.money-line-arrow {
  fill: var(--gold-deep);
}
.money-line-arrow.is-over {
  fill: var(--err);
}
.money-line-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.money-line-prog {
  position: absolute;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffd54a, var(--gold));
  box-shadow: 0 0 0 2px var(--gold-deep);
  transition: width 0.45s ease;
}
.money-line-dot {
  position: absolute;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2b0 0%, var(--gold) 55%, var(--gold-deep) 100%);
  border: 4px solid var(--ink);
  transition: left 0.45s ease;
}
.money-line-pill {
  position: absolute;
  transform: translateX(-50%);
  padding: 2px 18px 4px;
  border-radius: 22px;
  background: var(--gold-soft);
  border: 3px solid var(--gold);
  font-family: var(--font);
  font-weight: 700;
  font-size: 28px;
  white-space: nowrap;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: left 0.45s ease;
}
.money-countup.is-done .money-line-pill {
  background: var(--gold);
  border-color: var(--gold-deep);
}
.money-line-cap {
  position: absolute;
  padding: 3px 9px;
  border-radius: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  font-family: var(--font);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.money-line-cap.is-goal {
  color: var(--gold-deep);
  border-color: var(--gold);
}
.money-line-label {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
.money-line-label.is-hidden {
  visibility: hidden;
}
.money-line-label.is-gone {
  opacity: 0;
}
@keyframes money-flag {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}
@keyframes money-bump {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-9deg); }
  65% { transform: rotate(6deg); }
}

/* ---------- 100-grosze square ---------- */

.money-gsq {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.money-gsq-frame {
  fill: #fffaf0;
  stroke: var(--ink-soft);
  stroke-width: 3;
}
.money-gsq-dot {
  fill: rgba(201, 150, 69, 0.08);
  stroke: rgba(160, 118, 50, 0.45);
  stroke-width: 1.5;
  stroke-dasharray: 2 2;
}
.money-gsq-dot.is-on {
  fill: #dfa94c;
  stroke: #9d6c22;
  stroke-dasharray: none;
}
.money-gsq-label {
  font-family: var(--font);
  font-weight: 700;
  font-size: 26px;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- value scale (SIZE_NOT_VALUE) ---------- */

.money-scale {
  position: relative;
}
.money-scale-svg {
  position: absolute;
  left: 0;
  top: 0;
}
.money-scale-foot,
.money-scale-post {
  fill: #8d6440;
}
.money-scale-foot {
  stroke: #6e4a2a;
  stroke-width: 2;
}
.money-scale-beam {
  fill: #a87a4e;
  stroke: #6e4a2a;
  stroke-width: 2;
}
.money-scale-pivot {
  fill: var(--gold);
  stroke: var(--gold-deep);
  stroke-width: 3;
}
.money-scale-string {
  stroke: #6e4a2a;
  stroke-width: 2.5;
  fill: none;
}
.money-scale-pan {
  position: absolute;
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.money-scale-coin {
  height: 96px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: -10px;
  position: relative;
  z-index: 1;
}
.money-scale-stack {
  display: flex;
  align-items: flex-end;
  transform: scale(var(--k, 1));
  transform-origin: 50% 100%;
}
.money-scale-piece {
  display: flex;
  flex: none;
}
.money-scale-value.is-sum {
  font-size: 30px;
}
.money-scale-dish {
  width: 140px;
  height: 22px;
  border-radius: 0 0 70px 70px / 0 0 22px 22px;
  background: linear-gradient(180deg, #d9b27a, #a87a4e);
  box-shadow: 0 4px 0 rgba(70, 40, 15, 0.3);
}
.money-scale-value {
  margin-top: 10px;
  padding: 2px 14px;
  border-radius: 16px;
  background: var(--panel);
  border: 3px solid var(--line);
  font-family: var(--font);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
}
.money-scale-pan.is-heavy .money-scale-value {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 0 5px rgba(242, 183, 5, 0.3);
}

/* ---------- price tag ---------- */

.money-tag {
  display: inline-block;
  filter: drop-shadow(0 0 0.8px #9c8458) drop-shadow(0 0 0.8px #9c8458) drop-shadow(0 4px 0 rgba(42, 34, 56, 0.16));
}
.money-tag-body {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 4px 22px 4px 46px;
  background: linear-gradient(180deg, #fffdf5 0%, #fbf1d9 100%);
  clip-path: polygon(24px 0, 100% 0, 100% 100%, 24px 100%, 0 50%);
  border-radius: 0 12px 12px 0;
}
.money-tag-hole {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: #cdb88f;
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.3);
}
.money-tag-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}
.money-tag-main {
  font-family: var(--font);
  font-weight: 700;
  font-size: 34px;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.money-tag-alt {
  font-family: var(--font);
  font-weight: 700;
  font-size: 24px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.money-tag.is-lg .money-tag-body {
  min-height: 76px;
  padding: 6px 28px 6px 54px;
}
.money-tag.is-lg .money-tag-main {
  font-size: 46px;
}
.money-tag.is-lg .money-tag-alt {
  font-size: 28px;
}
