:root{
  --bg:#07110a;
  --panel:rgba(0,0,0,.35);
  --text:#e9ffe9;
  --muted:#b7d7bf;
  --btn:#1b3a24;
  --btn2:#295a36;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
}
*{ box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
html,body{ margin:0; height:100%; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
#app{ position:relative; width:100%; height:100%; overflow:hidden; }
canvas{ display:block; width:100% !important; height:100% !important; }

#hud{
  position:absolute; left:0; right:0; top:0;
  display:flex; justify-content:space-between; align-items:flex-start;
  padding: env(safe-area-inset-top) 10px 8px 10px;
  z-index:10; pointer-events:none;
}
.hud-left{ display:flex; gap:8px; flex-wrap:wrap; pointer-events:none; }
.hud-right{ display:flex; gap:8px; pointer-events:auto; }

.pill{
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--text);
  backdrop-filter: blur(6px);
}

.btn{
  pointer-events:auto;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, var(--btn2), var(--btn));
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.btn:active{ transform: translateY(1px) scale(0.99); }
.btn.ghost{ background: rgba(255,255,255,.06); box-shadow: none; }
.btn.big{ padding: 14px 16px; border-radius: 18px; font-size: 16px; min-width: 150px; }

#joyArea{
  position:absolute; left: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: 150px; height: 150px;
  z-index:10; pointer-events:auto;
}
#joyBase{
  position:absolute; inset:0;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(6px);
}
#joyStick{
  position:absolute; left:50%; top:50%;
  width: 62px; height: 62px;
  margin-left:-31px; margin-top:-31px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.14);
  transform: translate(0,0);
}

#actions{
  position:absolute;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  display:flex; flex-direction:column; gap: 10px;
  z-index:10; pointer-events:auto;
}

.modal{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  display:flex; align-items:center; justify-content:center;
  padding: 16px;
  z-index: 20;
}
.hidden{ display:none !important; }

.modal-card{
  width:min(520px, 100%);
  background: rgba(10,20,12,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 14px;
}
.modal-title{ font-size: 18px; font-weight: 900; margin-bottom: 6px; }
.modal-subtitle{ color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.modal-question{ font-size: 16px; font-weight: 800; margin-bottom: 12px; }

.answers{ display:flex; flex-direction:column; gap: 10px; }
.answer{
  width:100%; text-align:left;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-weight: 800;
}
.answer:active{ transform: translateY(1px) scale(0.99); }

.modal-footer{
  display:flex; justify-content:space-between; gap: 10px; align-items:center;
  margin-top: 12px;
}
.feedback{ min-height: 20px; color: var(--muted); font-weight: 700; }

.toast{
  position:absolute;
  left: 50%;
  bottom: calc(180px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 12px;
  border-radius: 999px;
  z-index: 30;
  box-shadow: var(--shadow);
  font-weight: 800;
}
