:root {
  --red: #ec2738;
  --red-dark: #a91525;
  --red-deep: #801320;
  --yellow: #ffd340;
  --yellow-dark: #eea92a;
  --blue: #36a9e1;
  --green-lcd: #b9fb7f;
  --green-dark: #1b5d3c;
  --ink: #241817;
  --paper: #fff7d6;
  --shadow: rgba(55, 22, 16, 0.23);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1040px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 211, 64, 0.5) 0 72px, transparent 73px),
    radial-gradient(circle at 86% 14%, rgba(54, 169, 225, 0.32) 0 92px, transparent 93px),
    linear-gradient(135deg, #8be0ff 0%, #fff48c 48%, #ffb4b2 100%);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

:focus-visible {
  outline: 4px solid #1b5dff;
  outline-offset: 3px;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 32px;
  background: rgba(255, 255, 255, 0.74);
  border-bottom: 6px solid rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 0 rgba(255, 211, 64, 0.8);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 26px;
  font-weight: 900;
}

.brand-badge {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: white;
  background: var(--red);
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--red-dark);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.currency-label {
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.currency-select,
.icon-button {
  border: 3px solid var(--ink);
  background: white;
  box-shadow: 0 5px 0 rgba(36, 24, 23, 0.25);
}

.currency-select {
  min-width: 138px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 900;
}

.icon-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 22px;
}

.main-stage {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(660px, 1fr) minmax(440px, 480px);
  align-items: center;
  gap: 32px;
  padding: 42px 44px 32px;
}

.register-zone {
  --register-scale: 1;
  min-width: 0;
  display: grid;
  place-items: start center;
  min-height: 790px;
  overflow: visible;
}

.register-frame {
  width: 820px;
  height: 790px;
}

.register-canvas {
  width: 820px;
  height: 790px;
  transform: scale(var(--register-scale));
  transform-origin: top left;
}

.cash-register {
  position: relative;
  width: 820px;
  height: 660px;
  border: 8px solid var(--red-deep);
  border-radius: 36px 70px 28px 28px;
  background:
    linear-gradient(118deg, transparent 0 16%, rgba(255, 255, 255, 0.2) 16.2% 17.5%, transparent 17.7% 100%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 32%),
    linear-gradient(180deg, #ff4b57 0%, var(--red) 55%, #c5192b 100%);
  box-shadow:
    inset -24px -22px 0 rgba(100, 10, 20, 0.16),
    inset 20px 18px 0 rgba(255, 255, 255, 0.18),
    0 30px 0 rgba(95, 34, 24, 0.2),
    0 34px 50px var(--shadow);
  overflow: visible;
  transform-origin: 50% 75%;
}

.cash-register::after {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  bottom: -8px;
  height: 96px;
  z-index: 0;
  border: 8px solid #063f96;
  border-top: 0;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(180deg, #1670d6, #0647a9);
  box-shadow: inset 0 14px 0 rgba(255, 255, 255, 0.08);
}

.cash-register.jiggle {
  animation: jiggle 440ms cubic-bezier(.22, 1.6, .42, 1);
}

.cash-register.huge {
  animation: wealthy-wobble 1.4s ease-in-out infinite;
}

.cash-register.strain-billion {
  animation: billionaire-strain 900ms ease-in-out infinite;
}

.cash-register.strain-trillion {
  animation: trillionaire-strain 520ms ease-in-out infinite;
}

.cash-register.strain-quadrillion {
  animation: quadrillion-break 300ms linear infinite;
}

.cash-register.strain-quadrillion::before,
.cash-register.strain-quadrillion::after {
  content: "";
  position: absolute;
  z-index: 9;
  pointer-events: none;
  background: #5a1721;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.cash-register.strain-quadrillion::before {
  left: 23%;
  top: 28%;
  width: 9px;
  height: 156px;
  transform: rotate(-28deg);
  border-radius: 20px;
}

.cash-register.strain-quadrillion::after {
  right: 17%;
  bottom: 26%;
  width: 124px;
  height: 9px;
  transform: rotate(13deg);
  border-radius: 20px;
}

.register-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 34px;
  padding: 108px 58px 20px;
}

.receipt-slot {
  position: absolute;
  left: 64px;
  top: 120px;
  width: 176px;
  height: 112px;
  border: 6px solid var(--red-deep);
  border-radius: 18px;
  background: #5a1721;
  box-shadow: inset 0 8px 0 rgba(0, 0, 0, 0.22);
  overflow: visible;
}

.receipt-slot::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 9px;
  height: 12px;
  border-radius: 999px;
  background: #321016;
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.3);
}

.receipt-tape {
  position: absolute;
  left: 24px;
  bottom: 20px;
  width: 126px;
  min-height: 214px;
  max-height: 300px;
  padding: 10px 9px 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  color: #28322f;
  border: 2px solid #d5d5d5;
  border-bottom: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(0, 0, 0, 0.04) 8px 9px, transparent 9px 17px),
    linear-gradient(180deg, #fffef4, #f6f1d8);
  box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.13);
  transform: rotate(-2deg);
  clip-path: polygon(0 0, 9% 2%, 18% 0, 27% 2%, 36% 0, 45% 2%, 54% 0, 63% 2%, 72% 0, 81% 2%, 90% 0, 100% 2%, 100% 100%, 0 100%);
}

.receipt-tape span {
  display: block;
  font-family: "Courier New", monospace;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.1;
  white-space: normal;
  overflow-wrap: anywhere;
  border-top: 1px dotted rgba(40, 50, 47, 0.24);
  padding-top: 3px;
}

.display-housing {
  position: relative;
  z-index: 8;
  width: 432px;
  padding: 14px;
  border: 8px solid #4a5450;
  border-radius: 14px;
  background: linear-gradient(180deg, #424b48, #313a37);
  box-shadow: inset 0 7px 0 rgba(255, 255, 255, 0.12), 0 9px 0 var(--red-dark);
}

.display-label {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.lcd-display {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 10px 14px;
  overflow: hidden;
  color: var(--green-dark);
  border: 5px solid #2e7b4b;
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(27, 93, 60, 0.08) 0 2px, transparent 2px 6px),
    var(--green-lcd);
  font-family: "Courier New", monospace;
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  text-align: right;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}

.button-bank {
  position: absolute;
  z-index: 9;
  right: 72px;
  top: 260px;
  display: grid;
  grid-template-columns: repeat(4, 58px);
  gap: 10px;
  width: auto;
  padding: 14px;
  border: 7px solid #0744a5;
  border-radius: 18px;
  background: linear-gradient(180deg, #0754bd, #073d9a);
  box-shadow: inset 0 7px 0 rgba(255, 255, 255, 0.12), 0 10px 0 rgba(0, 0, 0, 0.16);
}

.button-bank button {
  height: 46px;
  border: 4px solid rgba(36, 24, 23, 0.28);
  border-radius: 13px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.28);
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.button-bank button:hover {
  transform: translateY(-2px);
}

.button-bank button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.calc-key.number,
.calc-key.equals {
  color: #1d1b1a;
  background: linear-gradient(180deg, #ffffff, #e8eef4);
}

.calc-key.operator {
  background: linear-gradient(180deg, #ffe86a, #ffbd25);
}

.calc-key.action {
  grid-column: span 2;
  color: white;
  background: linear-gradient(180deg, #ff4a56, #c91528);
  font-size: 18px;
  letter-spacing: 0;
}

.calc-key.open {
  grid-column: span 2;
}

.drawer-window {
  --drawer-offset: 0px;
  --drawer-tilt: 0deg;
  position: absolute;
  z-index: 6;
  left: 24px;
  right: 420px;
  bottom: -168px;
  height: 238px;
  border: 9px solid #063f96;
  border-radius: 22px 22px 14px 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 16% 84%, rgba(0, 0, 0, 0.16)),
    linear-gradient(180deg, rgba(13, 86, 180, 0.25), rgba(5, 55, 145, 0.84));
  overflow: visible;
  cursor: pointer;
  transform: translateY(var(--drawer-offset)) rotate(var(--drawer-tilt));
  transition: transform 520ms cubic-bezier(.18, 1.18, .32, 1), box-shadow 520ms ease;
}

.drawer-window:focus-visible {
  outline: 5px solid #1b5dff;
  outline-offset: 8px;
}

.drawer-closed .drawer-window {
  --drawer-offset: -132px;
  box-shadow: 0 18px 0 rgba(6, 63, 150, 0.28);
}

.drawer-closed .drawer-lip {
  transform: translateY(8px);
}

.drawer-moving .drawer-window {
  animation: drawer-slide-bounce 540ms cubic-bezier(.18, 1.18, .32, 1) both;
}

.strain-billion .drawer-window {
  --drawer-offset: 3px;
  --drawer-tilt: -0.25deg;
}

.strain-trillion .drawer-window {
  --drawer-offset: 7px;
  --drawer-tilt: 0.7deg;
}

.strain-quadrillion .drawer-window {
  --drawer-offset: 14px;
  --drawer-tilt: -1.4deg;
}

.drawer-closed.strain-billion .drawer-window {
  --drawer-offset: -126px;
}

.drawer-closed.strain-trillion .drawer-window {
  --drawer-offset: -121px;
}

.drawer-closed.strain-quadrillion .drawer-window {
  --drawer-offset: -112px;
}

.strain-quadrillion .drawer-lip {
  transform: translateY(9px) rotate(1deg);
}

.strain-quadrillion .display-housing {
  transform: rotate(1.2deg) translateY(4px);
}

.strain-quadrillion .receipt-slot {
  transform: rotate(-2deg) translateY(8px);
}

.strain-quadrillion .button-bank button:nth-child(2),
.strain-quadrillion .button-bank button:nth-child(7) {
  transform: translateY(8px) rotate(4deg);
}

.strain-quadrillion .button-bank button:nth-child(4) {
  transform: translate(5px, 13px) rotate(-8deg);
}

.drawer-back {
  position: absolute;
  z-index: 1;
  inset: 14px 14px 44px;
  border: 5px solid rgba(3, 37, 103, 0.9);
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(3, 37, 103, 0.78) 22% 25%, transparent 25% 44%, rgba(3, 37, 103, 0.72) 44% 47%, transparent 47% 63%, rgba(3, 37, 103, 0.72) 63% 66%, transparent 66% 82%, rgba(3, 37, 103, 0.72) 82% 85%, transparent 85%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0)),
    #0b3f93;
  box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.22);
}

.empty-note {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  color: rgba(255, 255, 255, 0.38);
  font-size: 48px;
  font-weight: 900;
}

.drawer-lip {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 58px;
  border: 8px solid #063f96;
  border-radius: 8px 8px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, #1473d7, #0646a5);
  box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.09);
}

.drawer-handle {
  position: absolute;
  left: 50%;
  bottom: 9px;
  width: 176px;
  height: 30px;
  transform: translateX(-50%);
  border: 5px solid #063f96;
  border-radius: 18px;
  background: #0a2b6f;
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.36);
}

.money-scene {
  position: absolute;
  z-index: 6;
  inset: 18px 18px 42px 18px;
  overflow: hidden;
  pointer-events: none;
  perspective: 520px;
}

.stuffed-bill-scene {
  position: absolute;
  z-index: 7;
  inset: 18px 18px 34px 18px;
  overflow: hidden;
  pointer-events: none;
}

.strain-trillion .money-scene {
  inset: 18px 18px 42px 18px;
}

.strain-quadrillion .money-scene {
  inset: 18px 18px 42px 18px;
}

.wealth-effects {
  position: absolute;
  inset: -250px -110px -60px;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
}

.confetti-bit {
  position: absolute;
  top: -28px;
  width: 9px;
  height: 18px;
  border: 1px solid rgba(36, 24, 23, 0.18);
  border-radius: 3px;
  opacity: 0.92;
  animation: confetti-fall var(--fall-speed) linear infinite;
  animation-delay: var(--fall-delay);
}

.champagne-spray {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff7b0;
  box-shadow:
    14px -24px 0 #fff7b0,
    -18px -34px 0 #ffffff,
    30px -54px 0 #ffe36c,
    -34px -62px 0 #fff7b0,
    8px -84px 0 #ffffff;
  animation: champagne-pop 1.5s ease-out infinite;
  animation-delay: var(--spray-delay);
}

.champagne-bottle {
  position: absolute;
  width: 54px;
  height: 108px;
  background: url("assets/champagne-sticker-sm.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 7px rgba(42, 26, 12, 0.28));
  transform-origin: 50% 100%;
  animation: bottle-party 1.8s ease-in-out infinite;
  animation-delay: var(--bottle-delay);
}

.falling-yacht,
.piling-yacht {
  position: absolute;
  width: 1160px;
  height: 400px;
  background: url("assets/yacht-sticker-sm.png") center / contain no-repeat;
  filter: drop-shadow(0 18px 18px rgba(20, 48, 65, 0.24));
}

.falling-yacht {
  top: -76px;
  animation: yacht-fall var(--yacht-speed) linear infinite;
  animation-delay: var(--yacht-delay);
}

.piling-yacht {
  opacity: 0;
  transform: translate(var(--pile-start-x), var(--pile-start-y)) rotate(var(--pile-spin)) scaleX(var(--pile-flip)) scale(0.34);
  animation: yacht-pile-fall 4.8s cubic-bezier(.18, .82, .28, 1.18) forwards, yacht-settled-bob 2.8s ease-in-out infinite;
  animation-delay: var(--pile-delay), calc(var(--pile-delay) + 4.8s);
}

.bill,
.brick,
.coin,
.sparkle {
  position: absolute;
}

.bill {
  width: 38px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(36, 24, 23, 0.28);
  border-radius: 5px;
  background:
    repeating-linear-gradient(90deg, rgba(36, 24, 23, 0.08) 0 2px, transparent 2px 10px),
    radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.66) 0 12px, transparent 13px),
    radial-gradient(ellipse at 80% 50%, rgba(255, 255, 255, 0.66) 0 12px, transparent 13px),
    linear-gradient(135deg, var(--bill-a), var(--bill-b));
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.18);
  color: rgba(36, 24, 23, 0.76);
  font-size: 22px;
  font-weight: 900;
  transform: rotate(var(--rot));
}

.bill::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 18px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 2px solid rgba(36, 24, 23, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 40%, rgba(36, 24, 23, 0.18) 0 5px, transparent 6px),
    radial-gradient(circle at 50% 62%, rgba(36, 24, 23, 0.18) 0 9px, transparent 10px);
}

.drawer-bill {
  transform: rotate(var(--rot)) rotateX(8deg);
  transform-origin: 50% 90%;
}

.drawer-bill.denom-note-base {
  width: 36px;
  height: 72px;
}

.drawer-bill.denom-note-high {
  width: 40px;
  height: 80px;
}

.drawer-bill.denom-note-top {
  width: 44px;
  height: 88px;
  border-width: 3px;
}

.loose-bill {
  filter: drop-shadow(0 7px 5px rgba(0, 0, 0, 0.2));
}

.stuffed-bill {
  transform-origin: 50% 94%;
  filter: drop-shadow(0 9px 5px rgba(0, 0, 0, 0.24));
  transform: translate(var(--stuff-x), var(--stuff-y)) rotate(var(--rot)) skewY(var(--bend));
}

.stuffed-bill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 28% 70%, rgba(255, 255, 255, 0.26));
  mix-blend-mode: multiply;
  opacity: 0.36;
}

.stuffed-bill.stuff-in {
  animation: stuffed-bill-settle 620ms cubic-bezier(.2, 1.38, .38, 1) both;
}

.bill-stack {
  box-shadow:
    0 4px 0 rgba(204, 255, 207, 0.78),
    0 8px 0 rgba(71, 147, 94, 0.5),
    0 14px 13px rgba(0, 0, 0, 0.2);
}

.stack-medium {
  box-shadow:
    0 4px 0 rgba(232, 255, 204, 0.88),
    0 8px 0 rgba(116, 183, 93, 0.7),
    0 12px 0 rgba(67, 130, 74, 0.54),
    0 18px 13px rgba(0, 0, 0, 0.22);
}

.stack-thick {
  transform: rotate(var(--rot)) rotateX(8deg) scale(1.08);
  box-shadow:
    0 4px 0 rgba(232, 255, 204, 0.9),
    0 8px 0 rgba(152, 214, 111, 0.78),
    0 12px 0 rgba(91, 168, 94, 0.65),
    0 16px 0 rgba(54, 123, 79, 0.5),
    0 24px 15px rgba(0, 0, 0, 0.24);
}

.stack-fat,
.stack-vault {
  transform: rotate(var(--rot)) rotateX(8deg) scale(1.16);
  border-width: 3px;
}

.stack-fat {
  box-shadow:
    0 5px 0 rgba(232, 255, 204, 0.92),
    0 10px 0 rgba(152, 214, 111, 0.82),
    0 15px 0 rgba(91, 168, 94, 0.72),
    0 20px 0 rgba(54, 123, 79, 0.56),
    0 29px 16px rgba(0, 0, 0, 0.26);
}

.stack-vault {
  box-shadow:
    0 5px 0 rgba(232, 255, 204, 0.94),
    0 10px 0 rgba(179, 229, 120, 0.86),
    0 15px 0 rgba(124, 194, 91, 0.78),
    0 20px 0 rgba(78, 157, 82, 0.68),
    0 25px 0 rgba(42, 113, 78, 0.56),
    0 35px 18px rgba(0, 0, 0, 0.28);
}

.brick {
  width: 44px;
  height: 92px;
  border: 3px solid rgba(36, 24, 23, 0.3);
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.28) 0 3px, transparent 3px 8px),
    linear-gradient(90deg, transparent 0 33%, rgba(36, 24, 23, 0.2) 33% 39%, transparent 39% 100%),
    linear-gradient(135deg, #64dd7a, #2aa56a);
  box-shadow: 0 10px 12px rgba(0, 0, 0, 0.2);
  transform: rotate(var(--rot));
}

.brick::after {
  content: attr(data-symbol);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.84);
  font-size: 22px;
  font-weight: 900;
}

.coin {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 3px solid #cc8d19;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.78) 0 8px, transparent 9px),
    linear-gradient(135deg, #ffe98d, #e6a624);
  box-shadow: 0 8px 8px rgba(0, 0, 0, 0.16);
  color: #82500d;
  font-size: 14px;
  font-weight: 900;
  transform: rotate(var(--rot));
}

.drawer-coin {
  transform: rotate(var(--rot));
}

.drawer-coin.denom-coin-small {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.drawer-coin.denom-coin-medium {
  width: 34px;
  height: 34px;
  border-color: #c5c9ce;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.78) 0 8px, transparent 9px),
    linear-gradient(135deg, #f7f9fb, #aeb8c2);
  color: #4f5964;
}

.drawer-coin.denom-coin-large {
  width: 40px;
  height: 40px;
  border-color: #ad8d30;
}

.coin-stack {
  box-shadow:
    0 4px 0 rgba(255, 239, 157, 0.9),
    0 8px 0 rgba(150, 111, 28, 0.55),
    0 12px 9px rgba(0, 0, 0, 0.2);
}

.bill.fly-in,
.brick.fly-in,
.coin.fly-in {
  animation: fly-in 560ms cubic-bezier(.2, 1.5, .38, 1) both;
}

.bill.fly-out,
.brick.fly-out,
.coin.fly-out {
  animation: fly-out 760ms cubic-bezier(.55, .02, .9, .5) both;
}

.sparkle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 6px rgba(255, 211, 64, 0.44), 0 0 20px white;
  animation: sparkle 700ms ease-out both;
}

.currency-swap .display-housing {
  animation: currency-display-pop 740ms cubic-bezier(.18, 1.35, .38, 1) both;
}

.currency-swap .money-scene .bill,
.currency-swap .money-scene .brick,
.currency-swap .money-scene .coin,
.currency-swap .stuffed-bill {
  animation: currency-money-flip 760ms cubic-bezier(.2, 1.4, .38, 1) both;
}

.currency-token {
  position: absolute;
  z-index: 80;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--green-dark);
  border: 3px solid rgba(36, 24, 23, 0.36);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.78) 0 9px, transparent 10px),
    linear-gradient(135deg, #fff280, #b9fb7f);
  box-shadow: 0 10px 10px rgba(36, 24, 23, 0.2);
  font-family: "Courier New", monospace;
  font-size: 20px;
  font-weight: 900;
  pointer-events: none;
  animation: currency-token-pop 900ms cubic-bezier(.18, 1.22, .38, 1) both;
}

.control-panel {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 28px;
  border: 7px solid #2b78c5;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 215, 0.9)),
    #fffbe7;
  box-shadow: 0 16px 0 rgba(43, 120, 197, 0.22), 0 24px 34px var(--shadow);
}

.amount-row {
  display: grid;
  gap: 8px;
}

.amount-row label {
  font-size: 21px;
  font-weight: 900;
}

.amount-input-wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
}

.amount-symbol {
  display: grid;
  min-width: 62px;
  place-items: center;
  color: var(--green-dark);
  border: 4px solid var(--ink);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background:
    repeating-linear-gradient(0deg, rgba(27, 93, 60, 0.08) 0 2px, transparent 2px 6px),
    var(--green-lcd);
  font-family: "Courier New", monospace;
  font-size: 25px;
  font-weight: 900;
}

.amount-row input {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  color: var(--green-dark);
  border: 4px solid var(--ink);
  border-radius: 0 10px 10px 0;
  background:
    repeating-linear-gradient(0deg, rgba(27, 93, 60, 0.045) 0 2px, transparent 2px 7px),
    #fbfff2;
  font-family: "Courier New", monospace;
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: right;
  box-shadow: inset 0 4px 0 rgba(0, 0, 0, 0.08);
  caret-color: var(--red);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.amount-row input.digits-long {
  font-size: 23px;
}

.amount-row input.digits-huge {
  font-size: 18px;
}

.amount-row input:focus {
  background:
    repeating-linear-gradient(0deg, rgba(27, 93, 60, 0.07) 0 2px, transparent 2px 7px),
    var(--green-lcd);
}

.amount-row input::selection {
  color: white;
  background: var(--green-dark);
}

.amount-row p,
.tagline {
  margin: 0;
  color: #5d433c;
  line-height: 1.35;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.preset-grid button,
.clear-button {
  min-height: 52px;
  min-width: 0;
  border: 4px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  font-weight: 900;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.1;
  box-shadow: 0 6px 0 rgba(36, 24, 23, 0.22);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.preset-grid button {
  background: linear-gradient(180deg, #fff280, var(--yellow));
}

.clear-button {
  background: linear-gradient(180deg, #ffffff, #ffcaca);
}

.preset-grid button:hover,
.clear-button:hover,
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(36, 24, 23, 0.22);
}

.preset-grid button:active,
.clear-button:active,
.icon-button:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(36, 24, 23, 0.24);
}

.tagline {
  min-height: 72px;
  padding: 14px 16px;
  border: 3px dashed #2b78c5;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

#wealth-flavor,
#buy-examples,
#wealth-count {
  display: block;
}

#buy-examples,
#wealth-count {
  margin-top: 8px;
  color: #4b302d;
  font-weight: 800;
}

#wealth-count {
  color: #6d392f;
}

.footer {
  padding: 18px 32px 24px;
  color: #4b302d;
  text-align: center;
  font-weight: 900;
}

.settings-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  color: var(--ink);
  border: 7px solid #2b78c5;
  border-radius: 20px;
  background: #fffbe7;
  box-shadow: 0 18px 0 rgba(43, 120, 197, 0.22), 0 28px 42px var(--shadow);
}

.settings-dialog::backdrop {
  background: rgba(36, 24, 23, 0.36);
}

.settings-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 215, 0.94)),
    #fffbe7;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-header h2 {
  margin: 0;
  font-size: 26px;
}

.settings-close,
.settings-reset {
  border: 4px solid var(--ink);
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(36, 24, 23, 0.22);
}

.settings-close {
  padding: 9px 13px;
  background: linear-gradient(180deg, #ffffff, #e8eef4);
}

.settings-reset {
  min-height: 50px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff, #ffcaca);
}

.settings-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 4px solid var(--ink);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff280, var(--yellow));
  box-shadow: inset 0 5px 0 rgba(255, 255, 255, 0.28);
}

.settings-toggle strong,
.settings-toggle small {
  display: block;
}

.settings-toggle small {
  margin-top: 4px;
  color: #5d433c;
  line-height: 1.25;
}

.settings-toggle input {
  width: 34px;
  height: 34px;
  accent-color: var(--green-dark);
}

.reduced-motion .cash-register,
.reduced-motion .cash-register.huge,
.reduced-motion .cash-register.strain-billion,
.reduced-motion .cash-register.strain-trillion,
.reduced-motion .cash-register.strain-quadrillion,
.reduced-motion .bill,
.reduced-motion .brick,
.reduced-motion .coin,
.reduced-motion .sparkle,
.reduced-motion .currency-token,
.reduced-motion .champagne-bottle,
.reduced-motion .confetti-bit,
.reduced-motion .piling-yacht {
  animation: none !important;
}

.reduced-motion .drawer-window {
  transition: none;
}

.reduced-motion .wealth-effects {
  display: none;
}

.state-empty .empty-note {
  display: block;
}

.state-small .empty-note,
.state-medium .empty-note,
.state-large .empty-note,
.state-huge .empty-note,
.state-ridiculous .empty-note {
  display: none;
}

.overflow-top {
  transform: translateY(-4px) rotate(var(--rot));
}

@keyframes jiggle {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-1deg) translateY(-5px); }
  50% { transform: rotate(1.2deg) translateY(2px); }
  75% { transform: rotate(-0.7deg) translateY(-2px); }
}

@keyframes wealthy-wobble {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(2px) rotate(.18deg); }
}

@keyframes billionaire-strain {
  0%, 100% { transform: translateX(0) rotate(0deg) scale(1); }
  25% { transform: translateX(-2px) rotate(-0.25deg) scale(1.002); }
  50% { transform: translateX(3px) rotate(0.34deg) scale(1.005); }
  75% { transform: translateX(-1px) rotate(-0.18deg) scale(1.002); }
}

@keyframes trillionaire-strain {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1.002); }
  20% { transform: translate(-4px, 1px) rotate(-0.55deg) scale(1.006); }
  40% { transform: translate(5px, -2px) rotate(0.65deg) scale(1.01); }
  60% { transform: translate(-3px, 2px) rotate(-0.42deg) scale(1.007); }
  80% { transform: translate(3px, -1px) rotate(0.36deg) scale(1.004); }
}

@keyframes quadrillion-break {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1.006); filter: saturate(1.12); }
  10% { transform: translate(-7px, 2px) rotate(-0.9deg) scale(1.012); }
  20% { transform: translate(6px, -3px) rotate(0.85deg) scale(1.018); }
  30% { transform: translate(-3px, 5px) rotate(-0.5deg) scale(1.01); }
  40% { transform: translate(8px, 1px) rotate(1deg) scale(1.016); }
  50% { transform: translate(-5px, -4px) rotate(-0.8deg) scale(1.02); }
  60% { transform: translate(4px, 3px) rotate(0.5deg) scale(1.012); }
  70% { transform: translate(-8px, 0) rotate(-1deg) scale(1.018); }
  80% { transform: translate(5px, -2px) rotate(0.7deg) scale(1.014); }
  90% { transform: translate(-2px, 4px) rotate(-0.35deg) scale(1.011); }
}

@keyframes confetti-fall {
  0% { transform: translate(0, -20px) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate(var(--drift), 820px) rotate(var(--spin)); opacity: 0.96; }
}

@keyframes champagne-pop {
  0% { opacity: 0; transform: translateY(0) scale(0.35); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-90px) scale(1.35); }
}

@keyframes bottle-party {
  0%, 100% { transform: rotate(var(--bottle-rot)) translateY(0); }
  50% { transform: rotate(calc(var(--bottle-rot) * -1)) translateY(-9px); }
}

@keyframes stuffed-bill-settle {
  0% { opacity: 0; transform: translate(var(--stuff-x), -120px) rotate(calc(var(--rot) + 36deg)) scale(0.76) skewY(0deg); }
  78% { opacity: 1; transform: translate(var(--stuff-x), calc(var(--stuff-y) - 7px)) rotate(var(--rot)) scale(1.04) skewY(var(--bend)); }
  100% { opacity: 1; transform: translate(var(--stuff-x), var(--stuff-y)) rotate(var(--rot)) scale(1) skewY(var(--bend)); }
}

@keyframes yacht-fall {
  0% { transform: translate(0, -70px) rotate(var(--yacht-rot)); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate(var(--yacht-drift), 860px) rotate(calc(var(--yacht-rot) + 80deg)); opacity: 1; }
}

@keyframes yacht-pile-fall {
  0% {
    opacity: 0;
    transform: translate(var(--pile-start-x), var(--pile-start-y)) rotate(var(--pile-spin)) scaleX(var(--pile-flip)) scale(0.34);
  }
  12% {
    opacity: 1;
  }
  72% {
    transform: translate(0, 10px) rotate(var(--pile-rot)) scaleX(var(--pile-flip)) scale(0.34);
  }
  84% {
    transform: translate(0, -8px) rotate(calc(var(--pile-rot) * .72)) scaleX(var(--pile-flip)) scale(0.34);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(var(--pile-rot)) scaleX(var(--pile-flip)) scale(0.34);
  }
}

@keyframes yacht-settled-bob {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -4px;
  }
}

@keyframes fly-in {
  0% { opacity: 0; transform: translate(var(--from-x), -260px) rotate(var(--from-rot)) scale(0.7); }
  76% { opacity: 1; transform: translate(0, 8px) rotate(var(--rot)) scale(1.06); }
  100% { opacity: 1; transform: translate(0, 0) rotate(var(--rot)) scale(1); }
}

@keyframes fly-out {
  0% { opacity: 1; transform: translate(0, 0) rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: translate(var(--from-x), -210px) rotate(var(--from-rot)) scale(.65); }
}

@keyframes sparkle {
  0% { opacity: 0; transform: scale(0.2); }
  35% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: translateY(-32px) scale(0.4); }
}

@keyframes drawer-slide-bounce {
  0% { filter: saturate(1); }
  45% { filter: saturate(1.16); }
  72% { filter: saturate(1.08); }
  100% { filter: saturate(1); }
}

@keyframes currency-display-pop {
  0% { filter: hue-rotate(0deg) saturate(1); transform: scale(1) rotate(0deg); }
  35% { filter: hue-rotate(70deg) saturate(1.4); transform: scale(1.045) rotate(-1deg); }
  70% { filter: hue-rotate(-20deg) saturate(1.25); transform: scale(0.99) rotate(0.6deg); }
  100% { filter: hue-rotate(0deg) saturate(1); transform: scale(1) rotate(0deg); }
}

@keyframes currency-money-flip {
  0% { filter: hue-rotate(0deg) saturate(1); transform: rotate(var(--rot)) rotateX(8deg) scale(1); }
  42% { filter: hue-rotate(120deg) saturate(1.65); transform: rotate(calc(var(--rot) + 16deg)) rotateY(72deg) rotateX(14deg) scale(1.12); }
  100% { filter: hue-rotate(0deg) saturate(1); transform: rotate(var(--rot)) rotateX(8deg) scale(1); }
}

@keyframes currency-token-pop {
  0% { opacity: 0; transform: translate(0, 30px) rotate(0deg) scale(0.28); }
  28% { opacity: 1; }
  72% { opacity: 1; transform: translate(var(--token-x), -74px) rotate(var(--token-rot)) scale(1.08); }
  100% { opacity: 0; transform: translate(calc(var(--token-x) * 1.18), -116px) rotate(calc(var(--token-rot) * 1.5)) scale(0.72); }
}

@media (max-width: 1360px) {
  .main-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  body {
    min-width: 0;
  }

  .main-stage {
    padding: 28px 22px 24px;
    overflow-x: hidden;
  }

  .top-bar {
    flex-wrap: wrap;
  }

  .register-zone {
    min-height: 790px;
  }

  .register-top {
    gap: 34px;
    padding: 108px 58px 20px;
  }

  .receipt-slot {
    left: 64px;
    top: 120px;
    width: 176px;
    height: 112px;
  }

  .display-housing {
    width: 432px;
  }

  .button-bank {
    left: auto;
    right: 72px;
    top: 260px;
    width: max-content;
    grid-template-columns: repeat(4, 58px);
    gap: 10px;
  }

  .button-bank button {
    height: 46px;
  }

  .drawer-window {
    left: 24px;
    right: 420px;
    bottom: -168px;
    height: 238px;
  }

  .control-panel {
    max-width: 720px;
    width: 100%;
    justify-self: center;
  }
}

@media (max-width: 860px) {
  .register-zone {
    --register-scale: 0.94;
    min-height: 743px;
  }

  .register-frame {
    width: 771px;
    height: 743px;
  }
}

@media (max-width: 800px) {
  .register-zone {
    --register-scale: 0.86;
    min-height: 679px;
  }

  .register-frame {
    width: 706px;
    height: 679px;
  }
}

@media (max-width: 700px) {
  .register-zone {
    --register-scale: 0.74;
    min-height: 585px;
  }

  .register-frame {
    width: 607px;
    height: 585px;
  }
}

@media (max-width: 600px) {
  .register-zone {
    --register-scale: 0.62;
    min-height: 490px;
  }

  .register-frame {
    width: 508px;
    height: 490px;
  }
}

@media (max-width: 520px) {
  .top-bar {
    gap: 16px;
    padding: 14px 20px;
  }

  .brand {
    font-size: 24px;
  }

  .brand-badge {
    width: 42px;
    height: 42px;
  }

  .top-actions {
    width: 100%;
  }

  .currency-select {
    flex: 1;
    min-width: 0;
  }

  .register-zone {
    --register-scale: 0.52;
    min-height: 411px;
  }

  .register-frame {
    width: 426px;
    height: 411px;
  }

  .control-panel {
    padding: 20px;
    border-width: 5px;
    border-radius: 18px;
  }

  .amount-symbol {
    min-width: 52px;
    font-size: 22px;
  }

  .amount-row label {
    font-size: 19px;
  }
}

@media (max-width: 440px) {
  .register-zone {
    --register-scale: 0.44;
    min-height: 348px;
  }

  .register-frame {
    width: 361px;
    height: 348px;
  }
}

@media (max-width: 400px) {
  .main-stage {
    padding-left: 16px;
    padding-right: 16px;
  }

  .top-bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    font-size: 22px;
  }

  .preset-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .register-zone {
    --register-scale: 0.4;
    min-height: 316px;
  }

  .register-frame {
    width: 328px;
    height: 316px;
  }
}

@media (max-width: 360px) {
  .register-zone {
    --register-scale: 0.36;
    min-height: 284px;
  }

  .register-frame {
    width: 295px;
    height: 284px;
  }
}
