/* Rollout 2 local draft: readable treasure totals, bounded reward feedback.
   Load after the existing game styles. No gameplay target geometry changes. */
.treasury {
  grid-template-columns: minmax(0,1.6fr) repeat(3,minmax(0,1fr));
  gap: 10px;
  padding: 10px;
  border-color: #f6d58b7a;
  background: #082a36;
  box-shadow: inset 0 1px 0 #fff1c51a;
}
.treasury > div,
.treasury > div:first-child {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #b2e4d333;
  border-radius: 11px;
  background: #0d3440;
}
.treasury > div:first-child {
  border-color: #f6d58b80;
  background: linear-gradient(135deg,#174b51,#10313c);
}
.treasury span {
  margin-bottom: 7px;
  color: #d5ebe4;
  font: 750 10px/1.35 system-ui,sans-serif;
  letter-spacing: 1px;
}
.treasury strong {
  display: block;
  max-width: 100%;
  color: #fff1b7;
  font-family: ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;
  font-size: clamp(27px,2.7vw,36px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums lining-nums;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 #051e29;
}
.treasury #coins { color: #ffe58a; font-size: clamp(32px,3.2vw,44px); }
.treasury #rate { color: #b8ffe2; }
.treasury #power { color: #fff5c8; }
.treasury #pearls { color: #e4caff; }
/* Optional existing-paint hook for verbose formatted amounts (>12 characters).
   The complete text remains visible; this never changes the value or formatter. */
.treasury strong.is-long-amount,
.treasury #coins.is-long-amount { font-size: clamp(22px,2.2vw,29px); }

/* Existing app already caps the decorative reward nodes. The independent
   translate centers each one without replacing its existing rise/fade animation. */
#floaters > .floater {
  max-width: 72%;
  margin: 0;
  padding: 0 3px;
  color: #fff5a9;
  font-family: ui-rounded,"Arial Rounded MT Bold",system-ui,sans-serif;
  font-size: clamp(34px,4vw,46px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.025em;
  text-align: center;
  font-variant-numeric: tabular-nums lining-nums;
  overflow-wrap: anywhere;
  translate: -50% 0;
  text-shadow: 0 2px 0 #082e3a,1px 0 #082e3a,-1px 0 #082e3a,0 -1px #082e3a;
  pointer-events: none;
}

/* One steady outline during a rapid accepted-tap burst. The controller adds
   .is-tap-feedback to .stage and removes it once the bounded burst ends.
   No repeating animation, scaling, expensive blur, or hit-target movement. */
.stage::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 7;
  border: 3px solid #ffe59b;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 80ms ease-out;
  pointer-events: none;
}
.stage.is-tap-feedback::after { opacity: .88; }
.stage.is-tap-feedback .stage-caption { color: #fff7ca; background: #123d4ddb; }

@media (max-width:690px) {
  .treasury { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 8px; }
  .treasury > div,
  .treasury > div:first-child { padding: 10px; border-radius: 10px; }
  .treasury span { margin-bottom: 5px; font-size: 9px; letter-spacing: .65px; }
  .treasury strong { font-size: clamp(24px,6.2vw,30px); }
  .treasury #coins { font-size: clamp(28px,7.5vw,36px); }
  .treasury strong.is-long-amount,
  .treasury #coins.is-long-amount { font-size: clamp(20px,5.3vw,25px); }
  #floaters > .floater { font-size: clamp(34px,8.8vw,42px); }
  #toast {
    top: calc(max(6px, env(safe-area-inset-top)) + 3rem);
    bottom: auto;
    width: max-content;
    max-width: calc(100% - 24px);
    padding: 10px 14px;
  }
}
@media (max-width:360px) {
  .treasury > div,
  .treasury > div:first-child { padding: 9px 8px; }
  .treasury span { font-size: 8.5px; letter-spacing: .5px; }
}
@media (prefers-reduced-motion:reduce) {
  .stage::after { transition: none; }
}

/* Only the stationary game surface owns rapid-touch gestures. */
#chicken{touch-action:none;-webkit-tap-highlight-color:transparent}
