body {
  font-family: "Trebuchet MS", sans-serif;
  background: linear-gradient(180deg, #1d2410, #12160c);
  color: #f4f2e4;
  text-align: center;
  margin: 0;
  padding: 16px 15px 40px 15px;
}

h1 {
  font-size: 2.3rem;
  margin: 0 0 12px 0;
  color: #f6dc5e;
  letter-spacing: 1px;
  text-shadow: 0 0 20px rgba(246, 220, 94, 0.35);
}

/* ---- The money bar ---- */
.bar {
  max-width: 960px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 246, 200, 0.07);
  border: 1px solid #4a4a2a;
  border-radius: 12px;
  padding: 10px 18px;
}

.cash { text-align: left; }
.cash b { display: block; font-size: 2rem; color: #c9f77f; line-height: 1.1; }
.cash span { font-size: 0.82rem; color: #97a583; }

.rate { text-align: left; }
.rate b { font-size: 1.25rem; color: #f6dc5e; }
.rate span { display: block; font-size: 0.85rem; color: #97a583; margin-top: 2px; }
.rate span b { font-size: 0.85rem; color: #d9e8b8; }

.buttons { display: flex; gap: 8px; align-items: center; }

.stage { position: relative; max-width: 960px; margin: 0 auto; }

canvas {
  max-width: 100%;
  height: auto;
  display: block;
  border: 3px solid #4a4a2a;
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  background: #78a8d0;
  cursor: pointer;
}

.hidden { display: none; }

/* ---- Shop ---- */
.panel {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(600px, 94%);
  max-height: 92%;
  overflow-y: auto;
  background: rgba(20, 24, 12, 0.97);
  border: 2px solid #8a8a3a;
  border-radius: 14px;
  padding: 18px 22px 22px 22px;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.panel h2 { margin: 0 0 10px 0; color: #f6dc5e; font-size: 1.5rem; }
.panel h3 {
  margin: 16px 0 6px 0; color: #c9f77f; font-size: 1rem;
  border-bottom: 1px solid #3a4423; padding-bottom: 4px;
}

.amounts { color: #97a583; font-size: 0.9rem; margin-bottom: 6px; }
.amount { padding: 4px 12px; margin-left: 4px; }
.amount.picked { background: #6f7d2a; color: #14180c; font-weight: bold; }

.row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid #2b3319;
}

.row-text { display: flex; flex-direction: column; }
.row-text b { font-size: 1.02rem; }
.row-text .own {
  background: #3a4423; color: #c9f77f; border-radius: 20px;
  padding: 1px 9px; font-size: 0.82rem; margin-left: 4px;
}
.row-text .earn { color: #f6dc5e; font-size: 0.85rem; margin-top: 2px; }
.row-text .blurb { color: #8d9c7c; font-size: 0.82rem; margin-top: 2px; }

.buy { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.buy .wait { font-size: 0.72rem; color: #7d8a6d; }

button {
  font-family: inherit; font-size: 0.95rem;
  padding: 8px 16px; border-radius: 8px;
  border: 2px solid #8a8a3a; background: #2c3318; color: #f4f2e4;
  cursor: pointer; white-space: nowrap;
}

button:hover:not(:disabled) { background: #3e4a20; }
button:disabled { opacity: 0.35; cursor: default; }
button.small { padding: 5px 12px; font-size: 0.85rem; }
button.quiet { border-color: #4a4a2a; color: #8d9c7c; }
button.picked-row { box-shadow: 0 0 0 2px #c9f77f; }

.close { width: 100%; margin-top: 14px; }
.tip { color: #7d8a6d; font-size: 0.85rem; }

#shop-badge { color: #c9f77f; font-weight: bold; }
#up-count { color: #c9f77f; font-size: 0.85rem; font-weight: normal; }

#message { height: 22px; font-size: 1rem; color: #f6dc5e; margin: 12px 0 4px 0; }
.help { color: #7d8a6d; font-size: 0.88rem; max-width: 900px; margin: 0 auto; }
footer { margin-top: 16px; color: #55603f; }

/* ---- Back button to the arcade menu ---- */
.arcade-back {
  position: fixed; top: 12px; left: 12px; z-index: 9999;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(20, 27, 46, 0.85); border: 1px solid #3a4568;
  color: #e8ecf8; font-family: system-ui, sans-serif;
  font-size: 0.9rem; font-weight: 600; text-decoration: none;
  backdrop-filter: blur(4px);
}
.arcade-back:hover { background: #ff6b9d; border-color: #ff6b9d; color: #fff; }
