body {
  font-family: "Trebuchet MS", sans-serif;
  background: #0d1b16;
  color: #e8f0e4;
  text-align: center;
  margin: 0;
  padding: 18px 15px 40px 15px;
}

h1 {
  font-size: 2.4rem;
  margin: 0 0 12px 0;
  color: #7fd6a0;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(127, 214, 160, 0.35);
}

.bag {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.bag b { color: #d8f0c8; }
.bag .coin b { color: #f4cf5e; }

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

canvas {
  max-width: 100%;
  height: auto;
  display: block;
  border: 3px solid #2f5c46;
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  background: #3d7fc4;
  cursor: crosshair;
}

#click-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 20, 14, 0.8);
  border: 1px solid #3e7d5e;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  color: #bfe6cd;
  pointer-events: none;
}

.hidden { display: none; }

/* ---- The bench and stall panels ---- */
.panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92%);
  max-height: 88%;
  overflow-y: auto;
  background: rgba(14, 32, 24, 0.97);
  border: 2px solid #4e8f6b;
  border-radius: 14px;
  padding: 20px 24px 24px 24px;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.panel h2 {
  margin: 0 0 14px 0;
  color: #7fd6a0;
  font-size: 1.5rem;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #26473a;
}

.two { display: flex; gap: 6px; }
.two button { padding: 8px 12px; }

.row-text { display: flex; flex-direction: column; }
.row-text b { font-size: 1.05rem; }
.row-text .need { color: #f4cf5e; font-size: 0.9rem; margin-top: 2px; }
.row-text .blurb { color: #9dbcaa; font-size: 0.85rem; margin-top: 2px; }

button {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 18px;
  border-radius: 8px;
  border: 2px solid #4e8f6b;
  background: #1c3b2d;
  color: #e8f0e4;
  cursor: pointer;
  white-space: nowrap;
}

button:hover:not(:disabled) { background: #2b5943; }

/* The row the controller has highlighted */
button.picked {
  background: #3f7d5f;
  border-color: #9ce8b4;
  box-shadow: 0 0 0 2px rgba(156, 232, 180, 0.35);
}

.pad { color: #6f9a84; margin-top: 6px; }
button:disabled { opacity: 0.35; cursor: default; }

button.small {
  padding: 3px 12px;
  font-size: 0.9rem;
}

button.quiet {
  border-color: #3a5c4a;
  color: #7f9c8b;
}

.panel .tip {
  color: #7f9c8b;
  font-size: 0.85rem;
  margin: 14px 0 4px 0;
}

.close { width: 100%; margin-top: 6px; }

#message {
  height: 24px;
  font-size: 1.05rem;
  color: #f4cf5e;
  margin: 14px 0 4px 0;
}

.help {
  color: #7f9c8b;
  font-size: 0.9rem;
  max-width: 900px;
  margin: 0 auto;
}

footer { margin-top: 18px; color: #4d6b5b; }

/* ---- 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;
}
