/* SEED TO RICHES: BLOCK CITY, style.css (no external assets) */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #14181d;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none; overscroll-behavior: none;
}
#wrap { position: fixed; inset: 0; overflow: hidden; background: #14181d; }
#game { position: absolute; inset: 0; display: block; }

/* ---------- top-right utility buttons ---------- */
#topBtns {
  position: absolute; top: calc(8px + env(safe-area-inset-top)); right: 10px;
  display: flex; gap: 8px; z-index: 30;
}
#topBtns button {
  border: 2px solid #ffd166; background: rgba(16,20,26,.82); color: #ffd166;
  font-weight: bold; font-size: 13px; border-radius: 10px;
  padding: 9px 12px; cursor: pointer; min-height: 42px;
}
#topBtns button:active { background: #ffd166; color: #14181d; }
#btnAbout { min-width: 42px; font-size: 17px; }

/* ---------- touch controls ---------- */
#joy {
  position: absolute; left: 18px; bottom: calc(20px + env(safe-area-inset-bottom));
  width: 128px; height: 128px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 2px solid rgba(255,255,255,.28);
  z-index: 25; touch-action: none;
}
#joyKnob {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px;
  margin-left: -28px; margin-top: -28px; border-radius: 50%;
  background: rgba(255,159,26,.85); border: 2px solid #ffd166;
}
#btnInteract {
  position: absolute; right: 20px; bottom: calc(30px + env(safe-area-inset-bottom));
  width: 104px; height: 104px; border-radius: 50%;
  background: rgba(255,140,26,.92); border: 3px solid #ffd166; color: #fff;
  font-weight: bold; font-size: 15px; letter-spacing: .5px; z-index: 25;
  cursor: pointer; touch-action: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
#btnInteract:active, #btnInteract.held { background: #ffd166; color: #7a3b00; text-shadow: none; }

/* ---------- generic panel ---------- */
#panelOverlay {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(8,10,14,.62);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
#panelOverlay.hidden { display: none; }
#panelCard {
  width: min(520px, 100%); max-height: 88%; overflow-y: auto;
  background: #1d232c; border: 3px solid #ff9f1a; border-radius: 16px;
  color: #f2f4f6; box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
#panelHead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
#panelTitle { font-size: 21px; font-weight: bold; color: #ffd166; letter-spacing: .5px; }
#panelClose {
  width: 42px; height: 42px; border-radius: 10px; border: 2px solid #ffd166;
  background: #14181d; color: #ffd166; font-weight: bold; font-size: 16px; cursor: pointer;
}
#panelBody { padding: 4px 16px 18px; font-size: 15px; line-height: 1.45; }
#panelBody p { margin: 6px 0; }
.prow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #262e39; border: 1px solid #39434f; border-radius: 12px;
  padding: 10px 12px; margin: 10px 0;
}
.prow .pinfo { flex: 1 1 auto; min-width: 0; }
.prow .pname { font-weight: bold; font-size: 16px; color: #fff; }
.prow .pdesc { font-size: 13px; color: #b9c2cc; }
.prow .pprice { color: #ffd166; font-weight: bold; }
.pbtn {
  flex: 0 0 auto; min-height: 52px; min-width: 104px; padding: 10px 14px;
  border-radius: 12px; border: 2px solid #ffd166; cursor: pointer;
  background: #ff9f1a; color: #1c1206; font-weight: bold; font-size: 15px;
}
.pbtn:active { background: #ffd166; }
.pbtn.owned { background: #2e7d32; border-color: #81c784; color: #eaffea; }
.pbtn.alt { background: #39434f; color: #f2f4f6; border-color: #6b7885; }
.pbtn:disabled { opacity: .45; cursor: default; }
.pbtnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.pbtnrow .pbtn { min-width: 0; flex: 1 1 30%; min-height: 48px; font-size: 14px; }
.pnote { font-size: 13px; color: #b9c2cc; margin-top: 10px; }
.pbig { font-size: 17px; font-weight: bold; color: #fff; }
.up { color: #69db7c; font-weight: bold; }
.down { color: #ff8787; font-weight: bold; }
.danger { background: #8e2424 !important; border-color: #ff8787 !important; color: #fff !important; }

/* ---------- title screen ---------- */
#titleOverlay {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(10,12,16,.45);
}
#titleOverlay.hidden { display: none; }
#titleCard {
  width: min(560px, 100%); text-align: center; color: #fff;
  background: rgba(20,24,29,.88); border: 3px solid #ff9f1a; border-radius: 20px;
  padding: 26px 22px 20px; box-shadow: 0 14px 50px rgba(0,0,0,.6);
}
#titleKicker { color: #ffd166; font-weight: bold; letter-spacing: 4px; font-size: 15px; }
#titleName {
  font-size: clamp(40px, 10vw, 64px); line-height: 1.02; color: #ff9f1a;
  letter-spacing: 1px; margin: 4px 0 10px; text-shadow: 0 3px 0 #7a3b00;
}
#titleTag { font-size: 16px; line-height: 1.45; color: #e8edf2; }
#btnStart {
  margin: 20px 0 14px; width: min(300px, 80%); min-height: 64px;
  font-size: 24px; font-weight: bold; letter-spacing: 2px;
  background: #ff9f1a; color: #1c1206; border: 3px solid #ffd166; border-radius: 14px;
  cursor: pointer;
}
#btnStart:active { background: #ffd166; }
#titleHow { font-size: 13px; line-height: 1.5; color: #b9c2cc; }
#titleCredit { margin-top: 12px; font-size: 12px; letter-spacing: 2px; color: #ffd166; }
