:root {
  --bank-gold: #f0ca61;
  --bank-dark-gold: #8c6028;
  --bank-felt: #315d51;
  --bank-ink: #2e392f;
}
html,
body {
  overflow-x: hidden;
}

.bank-floor {
  position: relative !important;
  display: block !important;
  width: 100%;
  height: calc(100dvh - 78px);
  min-height: 620px !important;
  overflow: hidden !important;
  background: #29483d !important;
}

.bank-stage {
  --customer-visual-h: clamp(150px, 30vmin, 280px);
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  background: #29483d;
}

.bank-stage .scene-art {
  inset: 0 !important;
  background-size: cover !important;
  background-position: center center !important;
  transform: none !important;
  transition: filter .4s ease !important;
  will-change: auto;
}

.bank-stage .scene-shade {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 27, 20, .03), transparent 55%, rgba(20, 27, 20, .06)),
    linear-gradient(180deg, transparent 65%, rgba(20, 25, 17, .12)) !important;
}

.bank-ambient {
  z-index: 2 !important;
}

/* The player's Peblet sits behind the painted teller rail. */
.bank-teller {
  position: absolute;
  z-index: 4;
  left: 7%;
  top: 23%;
  width: clamp(150px, 19vw, 290px);
  height: 31%;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 10px 8px rgba(28, 26, 18, .3));
}

.bank-teller-stack {
  position: absolute;
  right: 0;
  bottom: 5%;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.bank-teller-stack > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

#bank-teller-image {
  z-index: 2;
  transform-origin: 50% 100%;
  animation: tellerBreathe 4.6s ease-in-out infinite;
}

.bank-teller-accessory {
  display: none;
  z-index: 3;
  object-fit: contain;
}

.bank-teller-accessory.behind {
  z-index: 1;
}

.bank-teller-accessory.visible {
  display: block;
}

/* The customer is always in the viewport, grounded on the visitor side. */
.bank-customer {
  position: absolute !important;
  z-index: 5 !important;
  right: 1.5%;
  bottom: 1.5%;
  width: clamp(250px, 28vw, 430px);
  height: 67%;
  min-height: 0 !important;
  padding: 0 !important;
  display: block !important;
  pointer-events: none;
}

.bank-customer-actor {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  pointer-events: none;
}

.bank-customer #customer {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 0;
  display: block !important;
  width: auto !important;
  height: var(--customer-canvas-h, clamp(193px, 38.5vmin, 359px)) !important;
  max-width: none !important;
  max-height: none !important;
  opacity: 1;
  object-fit: contain;
  object-position: center bottom;
  translate: -50% var(--sprite-foot-gap, 11%);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 14px 9px rgba(24, 30, 20, .4)) drop-shadow(0 0 1px rgba(255, 255, 255, .45)) !important;
  animation: customerBreathe 4.1s ease-in-out infinite;
}

.bank-customer #customer[data-sprite="sunny"] { --customer-canvas-h: clamp(193px, 38.5vmin, 359px); --sprite-foot-gap: 11%; }
.bank-customer #customer[data-sprite="maple"] { --customer-canvas-h: clamp(172px, 34.4vmin, 321px); --sprite-foot-gap: 6.7%; }
.bank-customer #customer[data-sprite="flint"] { --customer-canvas-h: clamp(213px, 42.6vmin, 398px); --sprite-foot-gap: 12.4%; }
.bank-customer #customer[data-sprite="dune"] { --customer-canvas-h: clamp(217px, 43.4vmin, 405px); --sprite-foot-gap: 14.2%; }
.bank-customer #customer[data-sprite="cloud"] { --customer-canvas-h: clamp(208px, 41.5vmin, 388px); --sprite-foot-gap: 11.2%; }

.customer-ground-shadow {
  position: absolute;
  z-index: 1;
  left: 18%;
  right: 18%;
  bottom: 1%;
  height: 7%;
  border-radius: 50%;
  background: rgba(31, 27, 19, .34);
  filter: blur(8px);
}

.bank-customer .bank-speech {
  position: absolute !important;
  z-index: 6;
  top: 0;
  left: -8%;
  right: auto;
  width: 108%;
  padding: clamp(11px, 1.1vw, 17px) clamp(13px, 1.3vw, 20px) !important;
  border: clamp(3px, .26vw, 4px) solid rgba(211, 176, 107, .96) !important;
  border-radius: clamp(18px, 1.7vw, 26px) !important;
  background: rgba(255, 251, 238, .98) !important;
  box-shadow: 0 7px 0 rgba(101, 75, 40, .2), 0 16px 26px rgba(47, 35, 22, .18) !important;
  text-align: center;
  backdrop-filter: blur(5px);
}

.bank-customer .bank-speech::after {
  left: 70%;
  bottom: -22px;
  border-width: 12px;
  border-top-color: rgba(211, 176, 107, .96);
}

.bank-speech p,
.bank-speech span,
.bank-speech small {
  display: block;
  margin: 0;
}

.bank-speech p,
.bank-speech span {
  color: #5d675e !important;
  font-size: clamp(10px, .84vw, 14px);
}

.bank-speech strong {
  display: block;
  margin: 2px 0;
  color: #d6526e !important;
  font-size: clamp(32px, 3.2vw, 50px) !important;
  line-height: 1;
}

.bank-speech small {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px dashed #d3bc91;
  color: #705a3b;
  font-size: clamp(8px, .7vw, 11px);
  font-weight: 900;
  line-height: 1.25;
}

.bank-customer.changing #customer {
  opacity: 0;
  transform: translateX(24%) scale(.93) !important;
}

.bank-customer.changing .bank-speech {
  opacity: 0;
  transform: translateX(12%) !important;
}

.bank-customer.arriving #customer {
  animation: customerArrive .55s cubic-bezier(.2, .9, .25, 1.12), customerBreathe 4.1s .55s ease-in-out infinite !important;
}

.bank-customer.wonder-reacting #customer {
  animation: customerReact .82s ease-in-out !important;
}

/* This replaces the old dashboard card; the section is only an invisible interaction layer. */
.bank-counter-layer {
  position: absolute !important;
  z-index: 10 !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  pointer-events: none;
}

/* The painted tabletop is the drop target; it only glows while being used. */
.counter-cash {
  position: absolute;
  z-index: 14;
  left: 25%;
  bottom: 28%;
  width: 36%;
  height: 24%;
  min-height: 148px;
  border: 0;
  border-radius: 44%;
  background: transparent;
  box-shadow: none;
  filter: none;
  transform: rotate(-.45deg);
  pointer-events: auto;
}

.counter-cash::before {
  content: "";
  position: absolute;
  inset: 7%;
  border-radius: 48%;
  background: radial-gradient(ellipse, rgba(255, 240, 168, 0), transparent 70%);
  opacity: 0;
  transition: opacity .18s ease, background .18s ease;
  pointer-events: none;
}

.counter-cash:hover::before,
.counter-cash.drop-ready::before {
  opacity: 1;
  background: radial-gradient(ellipse, rgba(255, 240, 168, .18), transparent 70%);
}

.counter-readout {
  position: absolute;
  z-index: 3;
  top: 17%;
  left: 50%;
  translate: -50% 0;
  width: auto;
  min-width: clamp(175px, 15vw, 225px);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 6px 9px;
  border: 2px solid #aa7c36;
  border-radius: 4px;
  background: linear-gradient(#283b31, #17271f);
  box-shadow: inset 0 0 0 2px rgba(255, 219, 126, .12), 0 3px 4px rgba(29, 24, 16, .35);
  color: #ffe196;
}

.counter-readout > span {
  color: #caba8a;
  font-size: clamp(9px, .7vw, 11px);
  font-weight: 900;
}

.counter-readout strong {
  color: #fff0af;
  font-family: ui-monospace, "Courier New", monospace;
  font-size: clamp(15px, 1.35vw, 22px);
  line-height: 1;
}

.counter-readout.over {
  border-color: #e17866;
  animation: readoutNudge .3s ease;
}

.counter-readout.over strong:first-of-type {
  color: #ff9c8c;
}

.counter-money {
  position: absolute !important;
  z-index: 4;
  left: 3%;
  right: 3%;
  top: 43%;
  bottom: 5%;
  min-height: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  gap: clamp(3px, .42vw, 7px) !important;
  padding: 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
  transition: transform .4s ease, opacity .3s ease;
}

.counter-money em {
  display: none;
}

.placed-cash {
  position: relative;
  z-index: calc(5 + var(--piece-index));
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 3px 2px rgba(28, 24, 16, .42));
  transform: rotate(var(--piece-angle));
  transform-origin: 50% 70%;
}

.placed-cash.is-arriving {
  animation: cashLand .28s cubic-bezier(.2, .86, .3, 1.2);
}

.placed-cash:hover,
.placed-cash:focus-visible {
  z-index: 40;
  transform: translateY(-4px) rotate(var(--piece-angle));
}

.placed-cash:focus-visible {
  outline: 3px solid #fff0a0;
  outline-offset: 3px;
  border-radius: 6px;
}

.placed-cash .counter-note {
  position: relative;
  width: clamp(58px, 5.4vw, 84px);
  height: clamp(32px, 3.1vw, 48px);
  display: grid;
  place-items: center;
  border: 2px solid rgba(53, 67, 57, .5);
  border-radius: 5px;
  color: #2d403b;
  font-size: clamp(11px, .9vw, 15px);
  font-weight: 1000;
}

.placed-cash .counter-note::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255, 255, 255, .7);
  border-radius: 3px;
}

.placed-cash .counter-note small,
.placed-cash .counter-coin small {
  position: relative;
  display: block;
  margin-top: -4px;
  font-size: .52em;
  letter-spacing: .08em;
}

.counter-note-50 { background: #e7bdcf; }
.counter-note-20 { background: #e8a874; }
.counter-note-10 { background: #8cc9c4; }
.counter-note-5 { background: #deb2df; }

.placed-cash .counter-coin {
  width: clamp(38px, 3.4vw, 53px);
  height: clamp(38px, 3.4vw, 53px);
  display: grid;
  place-items: center;
  border-width: 3px;
  border-style: double;
  border-color: #9b7536;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff6c4 0 8%, #eecf71 31%, #bd9142 80%);
  box-shadow: inset 0 0 0 2px #f8dfa0, 0 3px 0 #896936;
  color: #4c422b;
  font-size: clamp(9px, .75vw, 12px);
}

.placed-cash .counter-coin-1 {
  border-color: #778b91;
  background: radial-gradient(circle at 35% 28%, #fff 0 8%, #d9e2e4 31%, #94a7ad 80%);
  box-shadow: inset 0 0 0 2px #edf3f4, 0 3px 0 #687b80;
}

/* Notes and coins are full-size, loose physical objects rather than controls in a box. */
.bank-cash-source {
  position: absolute !important;
  z-index: 15;
  left: 2%;
  bottom: 2%;
  width: 64%;
  height: 23%;
  display: flex !important;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(7px, .9vw, 15px) !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}

.bank-cash-source > button[data-cash-piece] {
  position: relative !important;
  inset: auto !important;
  flex: 0 0 auto;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  pointer-events: auto;
  touch-action: none !important;
  user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
  filter: drop-shadow(0 6px 4px rgba(37, 25, 14, .38));
  transition: transform .14s ease, filter .14s ease, opacity .14s ease !important;
}

.bank-cash-source > button[data-cash-piece]:active {
  cursor: grabbing;
}

.bank-note {
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(52, 87, 82, .42);
  color: #263e3e;
  cursor: grab;
}

.bank-note::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(255, 255, 255, .72);
  border-radius: 4px;
}

.bank-note span,
.bank-note small {
  position: relative;
  z-index: 2;
  display: block;
  font-weight: 1000;
}

.bank-note small {
  text-transform: uppercase;
  opacity: .72;
}

.bank-note-50 { background: #e7bdcf; }
.bank-note-20 { background: #e8a874; }
.bank-note-10 { background: #8cc9c4; }
.bank-note-5 { background: #deb2df; }

.bank-coin {
  position: relative;
  border: 6px double #a98945;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff6c4 0 8%, #eecf71 30%, #bd9142 78%);
  color: #4c422b;
  cursor: grab;
}

.bank-coin span,
.bank-coin small {
  position: relative;
  z-index: 2;
  display: block;
  font-weight: 1000;
}

.bank-coin small {
  text-transform: uppercase;
}

.bank-coin-1 {
  border-color: #829398;
  background: radial-gradient(circle at 35% 28%, #fff 0 8%, #d9e2e4 30%, #94a7ad 78%);
}

.bank-cash-source > .bank-note {
  width: clamp(78px, 7.6vw, 118px) !important;
  height: clamp(48px, 5vw, 72px) !important;
  padding: 6px 5px !important;
  border-width: 3px !important;
  border-radius: 8px !important;
  box-shadow: 0 5px 0 rgba(44, 56, 45, .4) !important;
  overflow: hidden;
}

.bank-cash-source > .bank-note span {
  font-size: clamp(21px, 2vw, 31px) !important;
  line-height: 1;
}

.bank-cash-source > .bank-note small {
  font-size: clamp(7px, .55vw, 9px) !important;
}

.bank-cash-source > .bank-note::after {
  content: "PEBLET BANK NOTE";
  position: absolute;
  left: 50%;
  bottom: 3px;
  translate: -50% 0;
  color: rgba(37, 54, 48, .62);
  font-size: clamp(5px, .4vw, 7px);
  font-weight: 1000;
  white-space: nowrap;
}

.bank-cash-source > .bank-note-50 { transform: rotate(-3deg); }
.bank-cash-source > .bank-note-20 { transform: rotate(1deg); }
.bank-cash-source > .bank-note-10 { transform: rotate(-1deg); }
.bank-cash-source > .bank-note-5 { transform: rotate(3deg); }

.bank-cash-source > .bank-coin {
  display: grid !important;
  place-items: center;
  width: clamp(58px, 5.2vw, 80px) !important;
  height: clamp(58px, 5.2vw, 80px) !important;
  padding: 0 !important;
  border-width: clamp(4px, .35vw, 6px) !important;
  box-shadow: inset 0 0 0 3px rgba(255, 239, 169, .45), 0 5px 0 #755324, 0 9px 11px rgba(45, 31, 17, .3) !important;
}

.bank-cash-source > .bank-coin span {
  font-size: clamp(18px, 1.6vw, 25px) !important;
  line-height: 1;
}

.bank-cash-source > .bank-coin small {
  font-size: clamp(6px, .5vw, 8px) !important;
}

.bank-cash-source > .bank-coin-1 {
  box-shadow: inset 0 0 0 3px rgba(244, 250, 251, .5), 0 5px 0 #63777c, 0 9px 11px rgba(45, 31, 17, .3) !important;
}

.bank-cash-source > button[data-cash-piece]:hover,
.bank-cash-source > button[data-cash-piece]:focus-visible {
  z-index: 30;
  transform: translateY(-7px) rotate(0) !important;
  filter: drop-shadow(0 9px 5px rgba(37, 25, 14, .38)) brightness(1.07) !important;
}

.bank-cash-source > button[data-cash-piece]:focus-visible {
  outline: 4px solid #fff1a6;
  outline-offset: 4px;
}

.bank-cash-source > button[data-cash-piece].drag-source {
  opacity: .38;
}

.bank-cash-source > button[data-cash-piece].rule-blocked {
  opacity: .25 !important;
  filter: grayscale(.9) !important;
  cursor: not-allowed;
}

.bank-cash-source > button[data-cash-piece].rule-blocked::after {
  content: "×" !important;
  inset: 50% auto auto 50% !important;
  translate: -50% -50%;
  width: 1.3em;
  height: 1.3em;
  display: grid;
  place-items: center;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(89, 52, 42, .9) !important;
  color: white !important;
  font-size: clamp(17px, 1.7vw, 27px) !important;
}

.counter-tools {
  position: absolute;
  z-index: 17;
  left: 64%;
  bottom: 12%;
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.drawer-tool {
  width: clamp(40px, 3.2vw, 50px);
  height: clamp(40px, 3.2vw, 50px);
  display: grid;
  place-items: center;
  padding: 0;
  border: 3px solid #805725;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff1ad 0 8%, #d8a943 42%, #8d6128 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 242, 176, .38), 0 4px 0 #5f421e, 0 7px 9px rgba(45, 29, 16, .3);
  color: #4c321b;
  font-size: clamp(21px, 1.8vw, 28px);
  font-weight: 1000;
  line-height: 1;
  cursor: pointer;
}

.drawer-tool:not(:disabled):hover,
.drawer-tool:not(:disabled):focus-visible {
  transform: translateY(-3px) rotate(-4deg);
  filter: brightness(1.08);
}

.drawer-tool:disabled {
  opacity: .4;
  cursor: default;
}

.drawer-tool:focus-visible,
.customer-handover:focus-visible {
  outline: 4px solid #fff1a1;
  outline-offset: 4px;
}

.customer-handover {
  position: absolute;
  z-index: 18;
  left: 62.5%;
  bottom: 30%;
  width: clamp(92px, 9vw, 128px);
  height: clamp(58px, 6vw, 84px);
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff0c7;
  text-shadow: 0 2px 2px rgba(40, 25, 14, .72);
  cursor: pointer;
  pointer-events: auto;
}

.counter-bell {
  position: relative;
  width: clamp(56px, 5vw, 75px);
  height: clamp(39px, 3.5vw, 53px);
  display: block;
  border: 4px solid #815423;
  border-radius: 60% 60% 18% 18% / 82% 82% 18% 18%;
  background: radial-gradient(circle at 35% 20%, #fff4b1 0 8%, #e8bd55 35%, #a77126 82%);
  box-shadow: inset 0 0 0 2px rgba(255, 242, 177, .35), 0 5px 0 #69431d, 0 9px 10px rgba(43, 26, 13, .32);
  transform-origin: 50% 100%;
}

.counter-bell::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -23%;
  translate: -50% 0;
  width: 24%;
  aspect-ratio: 1;
  border: 2px solid #7d5221;
  border-radius: 50%;
  background: #e4b84d;
}

.counter-bell i {
  position: absolute;
  left: -9%;
  right: -9%;
  bottom: -18%;
  height: 23%;
  border: 3px solid #69431d;
  border-radius: 5px 5px 10px 10px;
  background: #b37b2c;
}

.customer-handover[aria-disabled="true"] {
  opacity: .55;
  cursor: pointer;
}

.customer-handover[aria-disabled="false"] .counter-bell {
  animation: bellReady 1.35s ease-in-out infinite;
  filter: brightness(1.13) saturate(1.14);
}

.customer-handover[aria-disabled="false"]:hover .counter-bell,
.customer-handover[aria-disabled="false"]:focus-visible .counter-bell {
  animation: bellRing .34s ease;
}

.bank-feedback {
  position: absolute;
  z-index: 18;
  right: 2%;
  bottom: 3%;
  width: 29%;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: #ffe5ad !important;
  font-size: clamp(9px, .76vw, 12px);
  line-height: 1.3;
  text-align: center;
  text-shadow: 0 2px 2px rgba(38, 23, 12, .75);
  pointer-events: none;
}

.bank-feedback:not(:empty) {
  padding: 7px 10px !important;
  border: 2px solid rgba(131, 89, 42, .74) !important;
  background: rgba(255, 239, 195, .96) !important;
  color: #6d422e !important;
  text-shadow: none;
  box-shadow: 0 4px 0 rgba(77, 46, 24, .28);
  transform: rotate(.5deg);
}

.bank-feedback.good {
  background: rgba(230, 246, 208, .96) !important;
  color: #3d7048 !important;
}

.bank-stage.handing-over .counter-money {
  opacity: 0;
  transform: translate(95%, -10%) scale(.82);
}

.bank-stage.handing-over .counter-bell {
  animation: bellRing .34s ease 2;
}

.cash-drag-ghost {
  position: fixed !important;
  z-index: 1000 !important;
  left: 0;
  top: 0;
  width: 104px !important;
  height: 62px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  opacity: .96;
  pointer-events: none !important;
  transform: translate(-50%, -50%) rotate(-4deg) !important;
  filter: drop-shadow(0 10px 7px rgba(32, 22, 14, .35));
}

.cash-drag-ghost.bank-coin {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
}

/* Direct background interactions: no visible hotspot boxes. */
.bank-wonder {
  position: absolute;
  z-index: 3;
  display: block;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bank-wonder:focus-visible {
  outline: 4px solid rgba(255, 239, 148, .96);
  outline-offset: 3px;
  background: rgba(255, 235, 135, .08);
}

.bank-wonder::before {
  content: "✦";
  position: absolute;
  left: 50%;
  top: 50%;
  color: rgba(255, 238, 155, .74);
  font-size: clamp(10px, 1vw, 16px);
  text-shadow: 0 0 9px #ffd66c;
  opacity: 0;
  pointer-events: none;
  animation: wonderHint 7s ease-in-out infinite;
}

.bank-wonder::after {
  content: "";
  position: absolute;
  inset: 15%;
  opacity: 0;
  pointer-events: none;
}

.vault-wonder { left: 43%; top: 19%; width: 13%; height: 25%; }
.crystal-wonder { left: 33%; top: 39%; width: 8%; height: 15%; }
.lamp-wonder { left: 58%; top: 0; width: 18%; height: 23%; border-radius: 0 0 50% 50%; }
.plant-wonder { left: 75%; top: 24%; width: 10%; height: 24%; }
.crystal-wonder::before { animation-delay: -2s; }
.lamp-wonder::before { animation-delay: -4s; }
.plant-wonder::before { animation-delay: -6s; }

.vault-wonder.is-opening::after {
  inset: 22%;
  border: 4px dashed rgba(255, 222, 119, .9);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(255, 207, 79, .75), inset 0 0 15px rgba(255, 232, 151, .5);
  opacity: 1;
  animation: vaultTurn .9s ease;
}

.bank-secret-clue {
  margin: 15px 0 18px;
  padding: 15px 16px 17px;
  border: 3px solid #d8ad45;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff6bf, #f7e7ff 62%, #dff5ee);
  box-shadow: 0 6px 0 #b88631, 0 11px 24px rgba(86, 59, 31, .18);
}

.bank-secret-spark { display: block; font-size: 32px; }
.bank-secret-clue h3 { margin: 4px 0 6px; font-size: clamp(21px, 4vw, 27px); line-height: 1.08; }
.bank-secret-clue p { margin: 0 0 12px; font-size: 16px; font-weight: 850; line-height: 1.35; }
.bank-secret-clue button {
  min-height: 52px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(#6f9e82, #47755f);
  box-shadow: 0 5px 0 #305746;
  color: white;
  padding: 10px 18px;
  font-weight: 1000;
  cursor: pointer;
}
.bank-secret-clue button:focus-visible { outline: 4px solid #2c6f82; outline-offset: 3px; }

.bank-practice-door.is-secret-clue::before {
  content: "✦";
  z-index: 2;
  opacity: 1;
  color: #fff4a8;
  font-size: clamp(30px, 4vw, 58px);
  text-shadow: 0 0 10px #fff, 0 0 24px #ffd14d, 0 0 38px #e99931;
  animation: secretVaultSpark 1.05s ease-in-out infinite;
}

.bank-practice-door.is-secret-clue::after {
  inset: -7%;
  border: 5px solid rgba(255, 231, 115, .94);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 215, 88, .18), 0 0 36px #ffd45c, inset 0 0 25px rgba(255, 246, 181, .5);
  opacity: 1;
  animation: secretVaultPulse 1.25s ease-in-out infinite;
}

.bank-stage.secret-cents-clue .coin-glint { opacity: 1; animation-duration: .48s; }

.crystal-wonder.is-active::after {
  inset: 3%;
  border-radius: 45%;
  background: radial-gradient(circle, rgba(209, 152, 255, .8), rgba(142, 85, 207, .25) 43%, transparent 72%);
  opacity: 1;
  animation: crystalWake 1.1s ease-in-out;
}

.lamp-wonder.is-active::after {
  inset: 5% 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 20%, rgba(255, 227, 133, .78), rgba(255, 193, 74, .15) 52%, transparent 72%);
  opacity: 1;
  animation: lampWarmth 1.2s ease-in-out;
}

.plant-wonder.is-active::after {
  inset: 1%;
  border-radius: 45%;
  background:
    radial-gradient(circle at 28% 38%, rgba(255, 237, 137, .9) 0 2%, transparent 3%),
    radial-gradient(circle at 68% 22%, rgba(171, 232, 119, .9) 0 2.5%, transparent 3.5%),
    radial-gradient(ellipse, rgba(124, 199, 102, .25), transparent 64%);
  opacity: 1;
  transform-origin: 50% 90%;
  animation: plantRustle .85s ease-in-out;
}

.bank-stage.wonder-lamps .bank-scene-art { filter: brightness(1.09) saturate(1.05) sepia(.08); }
.bank-stage.wonder-crystal .coin-glint { color: #e7b8ff; text-shadow: 0 0 13px #b56bec; animation-duration: .7s; }
.bank-stage.wonder-vault .coin-glint { opacity: 1; animation-duration: .52s; }

@keyframes tellerBreathe { 50% { transform: scaleX(1.012) scaleY(.992); } }
@keyframes customerArrive { from { opacity: 0; transform: translateX(28%) scale(.92); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes customerBreathe { 50% { transform: scaleX(1.008) scaleY(.994) rotate(.3deg); } }
@keyframes customerReact { 0%, 100% { transform: scale(1) rotate(0); } 28% { transform: scaleX(1.035) scaleY(.97) rotate(-1.2deg); } 62% { transform: scaleX(.985) scaleY(1.018) rotate(1deg); } }
@keyframes cashLand { from { opacity: 0; transform: translateY(-24px) rotate(calc(var(--piece-angle) - 5deg)) scale(.88); } to { opacity: 1; transform: translateY(0) rotate(var(--piece-angle)) scale(1); } }
@keyframes readoutNudge { 33% { transform: translateX(-4px); } 66% { transform: translateX(4px); } }
@keyframes bellReady { 50% { transform: translateY(-2px); filter: drop-shadow(0 0 8px rgba(255, 222, 117, .72)); } }
@keyframes bellRing { 25% { transform: rotate(-8deg); } 55% { transform: rotate(8deg); } 80% { transform: rotate(-3deg); } }
@keyframes wonderHint { 0%, 67%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.65); } 72% { opacity: .8; transform: translate(-50%, -50%) scale(1.1); } 78% { opacity: 0; transform: translate(-50%, -70%) scale(.8); } }
@keyframes vaultTurn { from { transform: rotate(0) scale(.82); opacity: 0; } 25% { opacity: 1; } to { transform: rotate(280deg) scale(1); opacity: 0; } }
@keyframes secretVaultSpark { 0%, 100% { transform: translate(-50%, -50%) scale(.78) rotate(-8deg); } 50% { transform: translate(-50%, -50%) scale(1.18) rotate(8deg); } }
@keyframes secretVaultPulse { 0%, 100% { transform: scale(.88); opacity: .58; } 50% { transform: scale(1.08); opacity: 1; } }
@keyframes crystalWake { 0%, 100% { transform: scale(.6); opacity: 0; } 45% { transform: scale(1.15); opacity: 1; } }
@keyframes lampWarmth { 0%, 100% { opacity: 0; transform: scale(.7); } 45% { opacity: 1; transform: scale(1.08); } }
@keyframes plantRustle { 0%, 100% { transform: rotate(0); opacity: 0; } 25% { transform: rotate(-5deg); opacity: 1; } 55% { transform: rotate(5deg); opacity: .8; } 78% { transform: rotate(-2deg); opacity: .5; } }

@media (max-width: 900px) {
  .bank-floor {
    width: 100% !important;
    height: calc(100dvh - 78px);
    min-height: 650px !important;
    overflow: hidden !important;
  }

  .bank-stage {
    width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    margin: 0;
  }

  .bank-stage .scene-art {
    background-size: cover !important;
    background-position: 44% center !important;
  }

  .bank-teller {
    left: 1.5%;
    top: 13%;
    width: 34%;
    height: 34%;
  }

  .bank-customer {
    top: 1.5%;
    right: 0;
    bottom: auto;
    width: 51%;
    height: 47% !important;
  }

  .bank-customer .bank-speech {
    top: 0;
    left: -10%;
    width: 108%;
    padding: 9px 11px !important;
  }

  .bank-speech strong {
    font-size: clamp(28px, 7vw, 42px) !important;
  }

  .bank-customer #customer { bottom: -2%; }

  .counter-cash {
    left: 6%;
    bottom: 31%;
    width: 88%;
    height: 22%;
    min-height: 142px;
    transform: none;
  }

  .counter-readout {
    width: auto;
    min-width: clamp(170px, 50%, 230px);
  }

  .bank-cash-source {
    left: 2%;
    bottom: 1.5%;
    width: 96%;
    height: 27%;
    flex-wrap: wrap;
    align-content: flex-end;
    align-items: flex-end;
    justify-content: center;
    gap: 7px !important;
    padding-top: 0 !important;
  }

  .bank-cash-source > .bank-note {
    width: clamp(76px, 18vw, 105px) !important;
    height: clamp(46px, 10.5vw, 64px) !important;
  }

  .bank-cash-source > .bank-coin {
    width: clamp(52px, 12vw, 68px) !important;
    height: clamp(52px, 12vw, 68px) !important;
  }

  .counter-tools {
    left: 4%;
    bottom: 32.5%;
  }

  .customer-handover {
    left: auto;
    right: 3%;
    bottom: 33%;
    width: 92px;
    height: 105px;
  }

  .bank-feedback {
    right: 16%;
    bottom: 29%;
    width: 68%;
  }
}

@media (max-width: 570px) {
  .bank-floor {
    height: calc(100dvh - 65px);
    min-height: 660px !important;
  }

  .bank-teller {
    top: 14%;
    width: 37%;
    height: 31%;
  }

  .bank-customer {
    width: 55%;
    height: 46% !important;
  }

  .bank-customer .bank-speech {
    left: -15%;
    width: 114%;
  }

  .bank-speech p,
  .bank-speech span {
    font-size: 9px;
  }

  .bank-speech small { margin-top: 4px; padding-top: 4px; font-size: 8px; line-height: 1.15; }

  .counter-cash {
    bottom: 31%;
    height: 22%;
  }

  .counter-readout {
    top: 17%;
    width: auto;
    min-width: 165px;
    padding: 5px 6px;
  }

  .counter-readout strong {
    font-size: 15px;
  }

  .counter-money {
    top: 42%;
  }

  .placed-cash .counter-note {
    width: 55px;
    height: 31px;
  }

  .placed-cash .counter-coin {
    width: 36px;
    height: 36px;
  }

  .bank-cash-source {
    height: 28%;
  }

  .bank-cash-source > .bank-note {
    width: clamp(72px, 20vw, 92px) !important;
    height: clamp(44px, 12vw, 56px) !important;
  }

  .bank-cash-source > .bank-coin {
    width: clamp(50px, 14vw, 60px) !important;
    height: clamp(50px, 14vw, 60px) !important;
  }

  .bank-cash-source > .bank-note span {
    font-size: 20px !important;
  }

  .bank-cash-source > .bank-note::after {
    display: none;
  }

  .counter-tools {
    bottom: 32%;
  }

  .drawer-tool {
    width: 44px;
    height: 44px;
  }

  .customer-handover {
    right: 1.5%;
    bottom: 32.5%;
  }

  .bank-feedback {
    bottom: 29%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bank-practice-door.is-secret-clue::before,
  .bank-practice-door.is-secret-clue::after { animation: none !important; opacity: 1; }
  .bank-stage *,
  .cash-drag-ghost {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .bank-wonder::before,
  .dust {
    display: none !important;
  }

  .bank-wonder.is-active::after {
    animation: none !important;
    opacity: .78;
  }
}
[data-motion="reduced"] .bank-stage *,
[data-motion="reduced"] .cash-drag-ghost{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
[data-motion="reduced"] .bank-wonder::before,
[data-motion="reduced"] .dust{display:none!important}
[data-motion="reduced"] .bank-wonder.is-active::after{animation:none!important;opacity:.78}

/* Child-test pass: one short, readable action prompt and physical cash stacks. */
.bank-speech .kid-prompt {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px dashed #d3bc91;
  color: #513719;
  font-size: clamp(16px, 1.35vw, 20px) !important;
  font-weight: 1000;
  line-height: 1.18;
}

.piece-meter {
  position: absolute;
  z-index: 6;
  top: calc(17% + 48px);
  left: 50%;
  width: max-content;
  display: grid;
  place-items: center;
  gap: 3px;
  translate: -50% 0;
  color: #51391e;
  font-size: clamp(11px, .95vw, 14px);
  font-weight: 1000;
}

.piece-meter[hidden] { display: none !important; }
.piece-meter > span { display: flex; gap: 4px; }
.piece-meter i {
  width: clamp(12px, 1.05vw, 16px);
  height: clamp(12px, 1.05vw, 16px);
  border: 2px solid #8a6934;
  border-radius: 50%;
  background: #fff1b2;
  box-shadow: 0 2px 0 rgba(75, 49, 21, .32);
}
.piece-meter i.filled { background: #e9b846; }
.piece-meter.over i.filled { background: #df6d5e; }
.piece-meter.ready i.filled { background: #64a972; }

.bank-cash-source > .bank-note-50 { --cash-stack-colour: #b9849c; }
.bank-cash-source > .bank-note-20 { --cash-stack-colour: #c47b45; }
.bank-cash-source > .bank-note-10 { --cash-stack-colour: #579b96; }
.bank-cash-source > .bank-note-5 { --cash-stack-colour: #b47eb6; }
.bank-cash-source > .bank-note {
  box-shadow: -4px 4px 0 var(--cash-stack-colour), -8px 8px 0 rgba(62, 48, 34, .48), 0 9px 12px rgba(45, 31, 17, .3) !important;
}
.bank-cash-source > .bank-coin {
  box-shadow: inset 0 0 0 3px rgba(255, 239, 169, .45), -3px 3px 0 #d2a74e, -6px 6px 0 #8f6829, 0 10px 12px rgba(45, 31, 17, .3) !important;
}
.bank-cash-source > .bank-coin-1 {
  box-shadow: inset 0 0 0 3px rgba(244, 250, 251, .5), -3px 3px 0 #b7c5c8, -6px 6px 0 #667b80, 0 10px 12px rgba(45, 31, 17, .3) !important;
}

.customer-handover {
  left: 58%;
  bottom: 27%;
  width: clamp(112px, 10vw, 148px);
  height: clamp(78px, 7.5vw, 104px);
}
.customer-handover .counter-bell {
  width: clamp(82px, 7vw, 108px);
  height: clamp(57px, 5vw, 76px);
}
.customer-handover[aria-disabled="true"] { opacity: .86; }
.customer-handover[aria-disabled="false"] {
  filter: drop-shadow(0 0 14px rgba(255, 229, 105, .95));
}
.bank-feedback {
  font-size: clamp(15px, 1.25vw, 18px) !important;
  font-weight: 1000;
}

@media (max-width: 850px) {
  .bank-speech .kid-prompt { font-size: clamp(16px, 2.5vw, 19px) !important; }
  .piece-meter { top: calc(17% + 43px); }
  .customer-handover { right: 2%; bottom: 31%; left: auto; width: 108px; height: 94px; }
  .customer-handover .counter-bell { width: 86px; height: 60px; }
  .bank-feedback { right: 18%; bottom: 28%; width: 64%; }
}

@media (max-width: 570px) {
  .bank-speech .kid-prompt { font-size: 16px !important; }
  .piece-meter { top: calc(17% + 40px); font-size: 11px; }
  .customer-handover { right: 0; bottom: 30%; }
}

/* A very small desktop parallax keeps the illustrated room alive while the
   transparent vault, crystal, lamp and plant targets stay underneath every
   character and gameplay control. */
.bank-stage .scene-art {
  inset: -1.2% !important;
  transform: translate(calc(var(--look-x, 0) * -8px), calc(var(--look-y, 0) * -5px)) scale(1.024) !important;
  transition: transform .22s ease-out, filter .5s ease !important;
}

@media (max-width: 900px) and (orientation: portrait) {
  .vault-wonder { left: 50%; top: 15.5%; width: 50%; height: 6.5%; }
  .crystal-wonder { left: 42%; top: 39%; width: 17%; height: 9%; }
  .lamp-wonder { left: 4%; top: 6%; width: 17%; height: 21%; }
  .plant-wonder { display: none; }
}

@media (min-width: 901px), (orientation: landscape) {
  .vault-wonder { left: 50%; top: 19%; width: 13%; height: 25%; }
  .crystal-wonder { left: 41%; top: 39%; width: 8%; height: 15%; }
  .plant-wonder { left: 83%; top: 22%; width: 10%; height: 24%; }
}

@media (prefers-reduced-motion: reduce) {
  .bank-stage .scene-art { transform: scale(1.024) !important; }
}
[data-motion="reduced"] .bank-stage .scene-art{transform:scale(1.024)!important}

/* Keep the painted scene free of extra controls while making every visible
   character a genuine touch surface for the shared character bounce. */
.bank-teller {
  pointer-events: auto;
  cursor: pointer;
}
.bank-customer #customer,
.bank-customer .bank-speech {
  pointer-events: auto;
}
.bank-customer #customer {
  cursor: pointer;
}

/* Keep the three essential money readings as clear as the customer's amount:
   the instruction, the counted total and the child's real account balance. */
.score {
  min-width: max-content;
}
.score strong {
  font-size: clamp(20px, 1.55vw, 25px);
  font-variant-numeric: tabular-nums;
}
.score small {
  font-size: clamp(10px, .78vw, 12px);
  line-height: 1.05;
}
.bank-customer .bank-speech p,
.bank-customer .bank-speech > span {
  font-size: clamp(13px, 1vw, 16px) !important;
  line-height: 1.2;
}
.bank-speech .kid-prompt {
  font-size: clamp(17px, 1.4vw, 21px) !important;
}
.counter-readout {
  min-width: clamp(190px, 16vw, 245px);
  padding: 8px 11px;
}
.counter-readout strong {
  font-size: clamp(19px, 1.55vw, 25px);
  font-variant-numeric: tabular-nums;
}
.counter-readout > span {
  font-size: clamp(11px, .8vw, 13px);
}

@media (max-width: 850px) {
  .bank-customer .bank-speech p,
  .bank-customer .bank-speech > span { font-size: 13px !important; }
  .bank-speech .kid-prompt { font-size: clamp(17px, 2.5vw, 19px) !important; }
  .counter-readout { min-width: 190px; }
  .counter-readout strong { font-size: 20px; }
}

@media (max-width: 570px) {
  .score { gap: 5px; padding: 7px 9px; }
  .score strong { font-size: 19px; }
  .bank-speech .kid-prompt { font-size: 17px !important; }
  .counter-readout { min-width: 180px; }
  .counter-readout strong { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .vault-wonder.is-opening::after { animation: none !important; opacity: .78; }
}
[data-motion="reduced"] .vault-wonder.is-opening::after { animation: none !important; opacity: .78; }
.customer-handover .counter-bell{width:clamp(72px,7vw,104px);height:clamp(58px,6vw,90px);border:0;border-radius:18%;background:none;box-shadow:none;overflow:visible}
.customer-handover .counter-bell::before,.customer-handover .counter-bell i{display:none}
.customer-handover .counter-bell img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;filter:drop-shadow(0 7px 4px rgba(43,26,13,.34))}

/* Ground the service bell on the open section of timber counter beside the teller. */
.customer-handover{left:22%;right:auto;bottom:39%}
@media(max-width:850px){.customer-handover{left:22%;right:auto;bottom:39%}}
@media(max-width:570px){.customer-handover{left:21%;right:auto;bottom:38%}}
