:root{
  --bg:#f6f8fb;
  --primary:#2b6cb0;
  --accent:#ffb86b;
  --text:#222;
  --muted:#666;
  --max-width:1200px;
  --hp-color: #e53e3e; 
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans TC","Helvetica Neue",Arial;
  background:var(--bg);
  color:var(--text);
  display:flex;
  flex-direction:column;
  min-height:100vh;
  align-items:center;
}
.app-header{width:100%;background:linear-gradient(90deg,#fff,#f0f4ff);padding:16px 12px;text-align:center;box-shadow:0 1px 0 rgba(0,0,0,0.05)}
.app-header h1{margin:0;font-size:1.25rem}
.app-main{width:100%;max-width:var(--max-width);padding:16px}
#canvas-wrap{background:#cfe8ff;border-radius:8px;display:flex;justify-content:center;align-items:center;padding:8px}
canvas{max-width:100%;height:auto;border-radius:6px;background:#fff}
.overlay{position:relative;margin-top:12px;padding:12px;background:#fff;border-radius:8px;box-shadow:0 2px 6px rgba(0,0,0,0.06)}
button{background:var(--primary);color:#fff;border:none;padding:10px 14px;border-radius:6px;cursor:pointer;margin:6px}
button[hidden]{display:none}
#choices button{display:block;width:100%;text-align:left;margin:6px 0;background:#eef6ff;color:var(--text)}

#hp-outer {
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 8px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-weight: bold;
}
.hp-label {
  color: var(--muted);
  font-size: 0.9rem;
  margin-right: 8px;
}
#hp-hearts {
  color: var(--hp-color);
  font-size: 1.2rem;
  letter-spacing: 2px;
}

@media (max-width:720px){
  .app-header h1{font-size:1rem}
  canvas{height:360px}
}
