* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #2b1d10;
  color: #2e2016;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

#app {
  width: 960px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}

/* ---------- HUD ---------- */
#hud {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: linear-gradient(#5b3a1a, #3f280f);
  color: #ffe6b0;
  flex-wrap: wrap;
}
#hud .brand { font-size: 20px; font-weight: bold; }
#hud .stat {
  background: rgba(0,0,0,0.25);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 16px;
  white-space: nowrap;
}
#hud .stat span { font-weight: bold; color: #fff; }
#hud .spacer { flex: 1; }

.btn {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #e0a038;
  color: #2e2016;
  cursor: pointer;
  font-weight: bold;
  transition: transform .05s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: rgba(255,255,255,0.15); color: #ffe6b0; }
.btn.big { font-size: 18px; padding: 12px 26px; margin-top: 18px; }

/* ---------- Stage ---------- */
#stage { position: relative; width: 960px; height: 600px; }
#game { display: block; width: 100%; height: 100%; background: #e9d7b8; }

/* ---------- Overlays ---------- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 18, 8, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.overlay.hidden { display: none; }

.panel {
  background: #f3e3c4;
  border: 3px solid #7a4a22;
  border-radius: 14px;
  padding: 28px 34px;
  max-width: 620px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.panel h1 { color: #5b3a1a; margin-bottom: 10px; font-size: 30px; }
.panel .lead { font-size: 16px; margin-bottom: 12px; line-height: 1.5; }

.how { text-align: left; background: rgba(255,255,255,0.5); border-radius: 10px; padding: 14px 18px; margin-top: 8px; }
.how h3 { color: #7a4a22; margin-bottom: 8px; }
.how ul { list-style: none; }
.how li { padding: 5px 0; font-size: 14.5px; line-height: 1.4; }

.summary { text-align: left; margin: 6px 0; }
.summary .row {
  display: flex; justify-content: space-between;
  padding: 8px 4px; border-bottom: 1px dashed rgba(122,74,34,0.4);
  font-size: 17px;
}
.summary .row.total { font-weight: bold; color: #5b3a1a; font-size: 19px; }

/* ---------- Footer ---------- */
#help {
  background: #3f280f;
  color: #d9c39b;
  padding: 8px 14px;
  font-size: 13px;
  text-align: center;
}
